Repository navigation
Description
What's the problem
Part of #2476. Owner priority (2026-10-27): build the opt-in donation feature now, shipping dark. Owner decisions (2026-10-27): placement A, in Advanced › Earnings; presets 0.1 / 0.25 / 0.5 / 1 / 2 / 5 percent; the mockup is approved. The only way for an operator to turn the donation on, see its percentage and cost, and read where it goes is a settings section in the lean UI. None exists, and the current UI must not get one: the lean spec says no PR touches the current UI except to delete it (#3566 rule A1), and the feature must not add a counted control (the appliance budget is exactly 10, rule A2).
Build the section inside the Advanced drawer's Earnings group (#3566 section F: "Behind Advanced: ... Earnings"; nothing inside the drawer is counted), titled "Support Pithead (optional)":
- A switch; presets Off / 0.1 / 0.25 / 0.5 / 1 / 2 / 5 percent (owner, 2026-10-27) and a custom value from 0.1 up to 10, with a live sentence computed from the planner's table, see the time-sentence rule below (Add a pure planner that carves the project slice out of the P2Pool remainder #3696, Document the optional project donation: cost, route, verification and how to stop it #3698).
- A cost line from the
estimatein the state API (Record donation slices and serve a donation block on the state API #3697, Show the expected monthly cost of the project donation before it is enabled #3705): the amount in XMR with its basis ("from your last 30 days of payouts", "estimated", "not available yet"); tiny values read "under 0.001 XMR a month"; fiat only when a price is set. - A status chip from the API
status: Off, Waiting, Donating now (seconds left fromslice_ends_at), Paused: endpoint unreachable, Reduced to N percent. - A "Where it goes" disclosure: recipient, the full project address with a copy button, endpoint kind, route (Tor or direct, following the profile), what the project can and cannot see, that the XMRig developer donation (Let owners support the XMRig developers from each rig's panel (default off) #3731) and the XvB donation are separate, how to verify on chain, how to stop, and that a change takes effect within one 10-minute cycle. The text comes from
docs/donation.md(Document the optional project donation: cost, route, verification and how to stop it #3698). - Under each control, one plain sentence turns the share into time with round numbers (owner, 2026-10-27). Project: "About 1 minute every 50 minutes, roughly 30 minutes a day", from the planner's actual slice length and interval. XMRig: "1 minute in every 100 minutes, roughly 15 minutes a day", XMRig's native N minutes per 100. Rounding: the interval is in minutes up to 120, otherwise in whole hours. The total is per week (nearest 5 minutes) when under 5 minutes a day; otherwise the nearest whole minute under 10, the nearest 5 under 60, and the nearest 10 above (shown as hours and minutes). Examples: 0.1 % is "every 17 hours, roughly 10 minutes a week"; 0.25 % is "every 7 hours, roughly 25 minutes a week"; 5 % is "every 20 minutes, roughly 1 hour 10 minutes a day". A second line gives the hashrate and the XMR a day it costs. A table-driven test covers every preset.
- Changes go through the existing preview-and-confirm gate with the host's plain sentences (Add the donation config keys, off by default, and render them for the dashboard #3693) and the typed APPLY; the page never writes a key without it.
- Hidden entirely when the API says
available: false; read-only with one notice naming the CLI route when the editor is off (#3566section F, "Done when").
What it impacts
Every operator who looks for the setting. With the constants empty it renders nothing, so shipping the code changes nothing a user sees.
How I found it
Read-only scan of origin/develop-v2.1.0 at 02852bd on 2026-10-27 from #3566 (rules A2 to A7 and sections F and G) and the open page issues. Nothing was executed. Unknown: the shell this builds on (#2513, draft PR #3584) and the Settings page (#2530, blocked on the #3557 children) are not merged, so this cannot start until they are; the owner approved the mockup on 2026-10-27 (recorded on #2478); follow it, and the states above are required either way.
How important is it
Medium. It is the user-facing half of an owner-priority feature, but it is blocked on pages that do not exist yet.
Acceptance criteria
- Table-driven frontend tests (
make test-frontend, fixtures underdashboard/tests/frontend/) render each state: unavailable (nothing rendered), off, on and idle, donating with seconds left, fallback, reduced, route Tor, route direct, estimate basespayouts,model,unknown, and editor off (read-only notice). - A test shows the per-platform counted-control fixture still passes (appliance 10, DIY with login 9, DIY without login 2): the section adds zero.
- A test shows no raw config key appears outside the Advanced drawer, and that enabling opens the preview with the host's sentences and cannot be completed without the typed APPLY.
- A Playwright journey (
make test-browser) at 375 px wide and at desktop width: no horizontal scroll, AA contrast in light and dark, keyboard operable, the disclosure opens and the address copies. docs/dashboard.mdgains the matching section; no old-UI file is edited; no explanatory code comments.make test-frontend,make lint-jsandmake lint-file-budgetpass.
Possible solutions
- A section component in the Settings Advanced group that reads the
donationblock and posts through the existing config-change flow (recommended). - A standalone page: simpler to build and breaks the page budget the spec fixes at four.
- Place the switch on the Earnings page as a counted control: more discoverable, and displaces one of the ten controls the owner has assigned.
Activity
pithead-developer commentedon Nov 16, 2026
Blocked on #2530.
Blocked on #3697.
Blocked on #3705.
Dependency marker for the dashboard. The native blocked-by links on this issue already name these open blockers, and the tick removes
blockedwhen every one of them closes.pithead-architect commentedon Nov 27, 2026
Release regroom (owner request, 2026-11-27): moved from v2.1.0 to v2.1.3. Donation UI follows the dark-released backend (2.0.7/2.0.8) and the Advanced pages; second UI chunk.