Repository navigation
Description
What's the problem
The 2.0.0 RC found four theme and geometry defects that no automated test could catch: shared native dialog text at 1.21:1 on the dark surface (#3378), an enabled password placeholder at 4.107:1 (#3379), an empty-state link left at the browser's default blue, 1.84:1 (#3380), and an SVG zone heading starting left of its viewBox (#3381). All four are closed. The cause is not: browser tests assert DOM and text under one colour scheme, and nothing in the browser suite measures a computed colour, the painted box of SVG text, horizontal overflow or a focus ring.
The new Sovereign UI has the same gap. The lean UI spec #3566 requires AA contrast in light, dark and OS-following themes and no horizontal scroll at 375 px on every page (A5), says the shell is done when "the contrast sweep passes" (B), and ends in "an accessibility sweep passes" (K). No test performs that sweep. Per the owner's 2026-10-27 rulings this issue sweeps the new UI only; the old tabs, header theme switcher and mine-cart strip are not visited and nothing is added to the old frontend.
What it impacts
- Everyone who uses the new dashboard, on the appliance and on DIY with or without a login, on desktop and phone, in light, dark and OS-following themes. Colour and clipping defects reach them first.
- The 2.1.0 acceptance: v2.1.0 lean UI spec: four pages, one profile control, an Advanced drawer #3566 B and K and the verification issue Sovereign: verify complete feature coverage, accessibility and migration #2547 name an automated sweep, and the page issues each claim AA contrast and 375 px. This sweep is the shared proof instead of a manual pass.
- CI: the required browser job has a 15-minute limit that the sweep must fit.
How I found it
- Findings of the RC4 manual pass (eba5c14) behind the four defects above; owner 2026-10-11: every defect an RC cut finds must be caught by automated tests from now on.
- Read on 2026-10-27: no file in dashboard/tests/browser on develop-v2.1.0 calls emulateMedia, getComputedStyle, getBBox or reads scrollWidth, and dashboard/tests/frontend/helpers/contrast.mjs reads old-stylesheet tokens with no DOM.
- The draft shell PR (dashboard: fix #2513 — build the lean UI shell #3584, not merged) carries an inline contrast and overflow check for the shell only: no shared helper, no SVG check, no other view.
- Owner extension 2026-10-12: overflow at phone width, Tab order and focus rings are also unchecked.
- Not confirmed: whether the sweep is needed in all four Playwright projects, since engine defaults for dialogs and placeholders differ and the RC defects were seen in Chromium dark; the runtime of the full matrix on the new UI; how the wizard is reached in a fixture.
How important is it
Medium. It is test infrastructure, not a user-facing defect, but the 2.1.0 cutover (#2547) cannot claim an automated AA check without it, and these four defects reached an RC. It needs the shell and pages to exist, so nothing is urgent before they land. Cost M: the old report measured the browser job at about 6 to 9 minutes against its 15-minute limit before any sweep.
Acceptance criteria
Scope
- New UI only. A new browser test file that matches testMatch in the Playwright config, plus a helper beside it, and no new dependency. Any inline contrast or overflow check in the shell tests is replaced by the helper, so one implementation remains. No explanatory source comments.
Coverage
- One table in the test lists every entry: view, state and how to reach it. Views: the shell, Overview, Machines, Earnings, Settings, every Advanced drawer section, the first-run sync view (Sovereign: build accurate initial sync and runtime recovery screens #2546) and the setup wizard (Sovereign: redesign setup token, role and essential configuration steps #2543). For each, every dialog it opens (including the shared preview-and-confirm dialog and Update Pithead) and its empty, error and disconnected states. A test fails when the shell exposes a page link or Advanced section that the table does not list.
- Views that differ by platform (v2.1.0 lean UI spec: four pages, one profile control, an Advanced drawer #3566 J) are checked on the appliance, DIY with a login and DIY without a login fixtures; Tari-off lines are checked once.
- Modes: Auto under an OS-dark and an OS-light emulation, explicit dark under a light OS and explicit light under a dark OS, the explicit choices set through Advanced > Appearance. Widths: 375 px, tablet and desktop. If the full matrix does not fit the runtime limit, the matrix shrinks, not the checks, and the PR states how.
Checks, applied to every entry
- Text contrast: every element that owns a text node reaches AA against its first opaque ancestor background (4.5:1; 3:1 for large text). Colours given as rgb(), rgba() and color(srgb ...) parse and translucent values are alpha-composited; a value the helper cannot parse fails instead of being skipped.
- Every enabled input's ::placeholder passes the same check; disabled inputs are skipped.
- Every svg text element's getBBox lies inside its svg viewBox, for the Overview chart, the topology map and any gauge, with each state or layer of the topology shown and hidden.
- At 375 px, document scrollWidth is at most innerWidth and no element box extends past the viewport width, on every entry.
- Every control reached by Tab shows a visible :focus-visible indicator. Inside the Advanced drawer and every dialog Tab stays inside, and closing returns focus to the opener. From the Configuration JSON editor, Tab reaches its remaining controls in visual order and the pending-change bar's Discard, and Enter on Discard restores the clean draft.
Negative controls and registration
- One case each, built by injecting the fault into the rendered page rather than editing production styles, and each makes the sweep report it: a dialog paragraph at the browser's default text colour on the dark surface, a bare anchor at the default link blue, an enabled placeholder below 4.5:1, SVG text starting left of its viewBox, content wider than the viewport at 375 px, and a focused control with its outline removed.
- The required browser job runs the file and the PR quotes the passing CI run id. The job's runtime with the sweep stays inside its limit, or the limit is raised in the same PR; the PR states the runtime before and after.
- The test documentation says how a PR that adds a page, dialog or state adds its entry to the table.
Possible solutions
- Playwright plus a page.evaluate helper that returns each failure with selector, ratio and mode, so a red run names the element. Start from the shell test's inline checker. An off-the-shelf engine is out unless it is already installed; the old plan was no new dependency.
- Order: the shell (Sovereign: build navigation, page headers and persistent status #2513) is the first prerequisite; the chart and topology SVG, the dialogs, Settings, the wizard and the sync view arrive with Sovereign: build the contribution overview and attention summary #2515, Sovereign: make the machines view usable for 2, 50 and 100 workers #2517, Sovereign: build estimates with explicit mining assumptions #2525, Sovereign: organize mining and advanced settings without losing fields #2530, Sovereign: build maintenance health and contextual troubleshooting #2540, Sovereign: redesign setup token, role and essential configuration steps #2543 and Sovereign: build accurate initial sync and runtime recovery screens #2546, so the sweep finishes after them. Option: land the helper and the shell entries first and let each page PR add its entry. That is faster but spreads the table across PRs; choose it only if page work stalls.
- Sovereign: verify complete feature coverage, accessibility and migration #2547 should name this sweep as its automated accessibility sweep.
- Unknown: engines needed (see above), the matrix runtime, and the wizard fixture.
Earlier scope, kept as evidence only (superseded 2026-10-27; do not implement from it)
What's the problem
Test debt from 2.0.0 RC testing, for 2.0.1 (owner, 2026-10-11: every defect an RC cut finds must be caught by automated tests going forward).
What slipped
Browser tests assert DOM and text under the default colour scheme. No file in dashboard/tests/browser calls emulateMedia, getComputedStyle or getBBox, and dashboard/tests/frontend/helpers/contrast.mjs:1-3 reads theme tokens with no DOM. RC4 (eba5c14) findings it let through:
- Shared native modals: body text loses theme contrast #3378: shared native dialogs render body text black on the dark surface, 1.21:1 (Backup, Review changes, OS update, Worker details).
- Enabled password placeholder contrast in configuration #3379: an enabled password placeholder is 4.107:1 in Chromium dark.
- Workers Alive empty-state link is unreadable in dark mode #3380: the Workers Alive empty-state link is the UA default blue, 1.84:1. No stylesheet styles plain anchors; others sit at dashboard/mining_dashboard/web/static/system/osupdate.mjs:358, dashboard/mining_dashboard/web/static/system/securityview.mjs:185 and dashboard/mining_dashboard/web/static/config/configview.mjs:375.
- Advanced topology zone heading clips at the left edge #3381: the topology zone heading (dashboard/mining_dashboard/web/static/network/topology.mjs:139, dashboard/mining_dashboard/web/static/styles/topology.css:76-82) starts left of the SVG viewBox and is clipped.
what it impacts
Where it runs
Tier-1 CI: .github/workflows/browser.yml, job "Browser user journeys" (a required context on develop), running all four projects in the Playwright config.
How I found it
Discovery details are not separately established in the existing report; preserve and verify the evidence already recorded.
how important is it
Cost
M. The job takes about 6-9 min today against its 15 min timeout (browser.yml), so budget the sweep inside it or raise the limit. Helper about 100 lines (estimate).
acceptance criteria
Done when
- Red against eba5c14 static assets (PITHEAD_BROWSER_STATIC override, dashboard/tests/browser/fixtures.mjs:8-9) for all four defects, one case each; green on develop with the fixes.
- Negative control: a dialog paragraph left at the UA colour, or a bare anchor, fails the sweep.
- Registered: the file matches testMatch, so the required job runs it. CI run ids quoted.
possible solutions
Test to build
Playwright: new dashboard/tests/browser/theme-contrast.test.mjs (matches testMatch in dashboard/tests/browser/playwright.config.mjs) plus a helper beside it; no new dependency. Three modes (dashboard/mining_dashboard/web/static/styles/theme.css:10-20, :67-68): OS dark with Auto (emulateMedia), explicit dark under a light OS, explicit light. Visit Simple, Advanced, Configuration, Backup, the setup wizard, every modal (dashboard/mining_dashboard/web/static/app/modal.mjs:41) and each empty and error state. Assert:
- Every element owning a text node reaches 4.5:1 against its first opaque ancestor background; handle rgb(), rgba() and color(srgb ...) values and alpha-composite.
- Every enabled input's ::placeholder passes the same check; disabled ones are skipped.
- Every svg text getBBox lies inside its viewBox, with the internal mesh shown and hidden.
Activity
VijitSingh97 commentedon Oct 12, 2026
Extension from the 2.0.0 RC manual-test automation sweep (owner, 2026-10-12: automate what the RC tester did by hand). Add to this issue's test:
run the same view-and-modal walk at a 390x844 viewport (webkit and mobile-chromium projects, dashboard/tests/browser/playwright.config.mjs:23-24) asserting document scrollWidth <= innerWidth and no element box past the viewport; Tab from the JSON editor reaches the file input then Discard, and Enter on Discard restores the clean draft; focused backup buttons show a visible :focus-visible outline. No browser test checks overflow, Tab order or focus rings today. (Malformed raw JSON keeping its error and Save disabled is already covered: dashboard/tests/browser/config.test.mjs:154-173.)
pithead-developer commentedon Oct 21, 2026
Parked in Icebox under the lean roadmap (owner, 2026-10-21): this tests a surface that v2.1.0 reshapes, so writing it now means rewriting it; the feature PRs carry their own tests.
pithead-developer commentedon Nov 16, 2026
Blocked on #2547.
Blocked on #2515.
Blocked on #2530.
Blocked on #2540.
Blocked on #2543.
Parked until the lean UI lands (see the park comment above). The native blocked-by links already hold it, and the tick removes
blockedwhen every listed issue closes. It covers every view, so it now also waits for the cutover in #2547.