Repository navigation
refactor(console): integration tests for pages, a short browser lane - #1455
Merged
Merged
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
…akpoints and keyboard specs
# Conflicts: # ui/src/test/console.tsx
…-tests # Conflicts: # e2e/console/baselines.spec.ts # e2e/console/layout.spec.ts # e2e/console/leases.spec.ts # e2e/console/update.spec.ts # e2e/console/views.spec.ts # e2e/console/workers-gateway-stops-mid-fetch.spec.ts # e2e/console/workers.spec.ts
… and the Settings page
The two-capture pixel comparison in renders.spec.ts is gone with its helpers; screenshots.ts writes the same pictures once, under its own Playwright config, and the breakpoints spec no longer writes images.
…ed worker page a dozen devices The shell geometry spec checks the proxy session's Sign out icon, which the console draws only when the daemon names a sign-out address; the worker page lost its subtitle and tiles, so one device no longer overflows a 500px window.
…eal daemon or engine, screenshots on demand The lane is down to a few dozen tests, so CI runs it in two shards.
…-tests # Conflicts: # e2e/console/baselines.spec.ts # e2e/console/queue.spec.ts
…the foot sidebar toggle and the darker light pills
… screenshot script into small steps, and drop the unused tab helper
…-tests # Conflicts: # e2e/console/overview.spec.ts # e2e/console/render-checks.ts
…ounts worker rows, not group rows
… check that fallow flags (#1426)
# Conflicts: # e2e/console/render-fixtures.ts # e2e/console/views.spec.ts
Merged
5 tasks done
Contributor
Author
V3RON
added a commit
that referenced
this pull request
Nov 9, 2026
…light theme (#1434) (#1454) Closes #1434 ### Status The redesigned pages (Overview, Inbox, Fleet, worker, streaming, Leases, Queue, Baselines, Activity, Usage, Settings), breakpoints, the light theme, and the console test refactor (single-page browser specs moved to DOM tests). Supersedes stage PRs #1447 to #1452 and #1455. ## Done when - [x] Every Tests line is covered at its named seam; relevant model/unit tests and touched Chromium page specs pass. The browser lane uses faked drivers, not native hardware. — unit, ui-dom and the touched Chromium specs pass; the lane runs on the fake driver - [x] Capture this stage's pages through `pnpm test:console --project=chromium e2e/console/renders.spec.ts` (page-specific --grep permitted). Compare current PNGs to all eight reference states plus Inbox, Queue, Usage, sign-in and not found; record the explicit Baselines filter/link amendment, then inspect every other non-data difference and fix/rerun until none remain except the explicit Baselines/Fleet, preserved-collapse header-control and evidence-backed WCAG-AA colour amendments recorded in PLAN. The PR includes paired images for each reference page and lists remaining data differences; no-render pages include current images. Do not commit generated current/ or prototype/screens/. — superseded by the maintainer: captures come from `pnpm console:screenshots`; every page compared to its render and reviewed live in the demo - [x] Check the same pages at 1440×900, 1280×800 and 390×844: no horizontal page scroll, card escape or text collision. Axe in both light and dark has no WCAG AA violations and actually evaluates color contrast. Per-page verification is required in this stage, not deferred to stage 7. — `breakpoints.spec.ts` and `browser-checks.spec.ts` cover every page in both themes - [x] Update website pages describing this stage in the same change. Ownership: Own final consolidation, intros, screenshots and cross-page navigation; preserve per-stage factual edits. Run `pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs` when the website changes. — `console.mdx` and `gateway/fleet-console.mdx` describe the final pages; website build and OpenAPI check pass - [x] Every page/state has dark/light evidence at the integrated head; DESIGN/manual/website agree, unused DS and WorkersTable are removed after import search, and hook/CI Fallow results are clean. Whole-feature stack remains intact for the parent merge gate. — dark and light captures at the head; DESIGN.md, `ui/AGENTS.md` and the website agree; Fallow clean in hooks and CI ## Assumptions none ## Review Spec review: 0 blocking, 2 fixed, 0 notes. Code review: 0 blocking, 9 fixed, 2 notes. Claims review: 0 blocking, 4 fixed, 0 notes. Rounds: 3. Tokens: 62.7M. Assessment: complete *Written by an agent.*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Page behaviour moves from the Playwright lane to DOM tests (
ui/**/*.dom.test.tsx, vitest projectui-dom, happy-dom, React Testing Library). The browser lane keeps only what needs a real daemon or a real browser engine. The render harness is nowpnpm console:screenshots, a script that writes pictures and checks nothing.--list, Chromium), 23 → 9 spec files.--workers=4, times added up): about 1,244 s → about 211 s. "Before" is measured onorigin/task/1434(a903859), reusing workers.spec 90 s, renders.spec 536 s and update.spec 9 s. The machine had six demo daemons running; a rerun under heavy load took 257 s.src/test-lanes.test.tsminimum changed to match).e2e/console/12,860 → 5,023; DOM tests add 5,566 plus a 386-line harness.The DOM harness
ui/src/test/console.tsx: renders the wholeAppagainst a fake fetch route table. Routes it doesn't know answer 404 and are recorded inunanswered. It also has a fake event stream (events.push,events.drop), a fixedDate, and optional fake timers.ui/src/test/fixtures.ts: answer builders typed by the contract.ui/src/test/setup.ts: cleanup. happy-dom lays nothing out, so it also makesclientWidththe window width; without that the narrow-table column priority drops every column.ui/src/test/tab.ts: one helper that hides and shows the tab.vitest.config.ts:css: true, so the console's own sheets apply. The Fleet page draws a table and a narrow list and hides one with CSS. A toast past the limit is hidden by CSS too.Per spec file
app/actions9,fleet(in-flight)journeysactivity19feed(virtual scroll)baselines7app/idle8 (one per page)breakpointsinbox14,app/inbox-count1breakpointsleases18breakpointsleases-paging12feed; CSP and axe →browser-checksoverview15journeysapp/proxy-sign-in10sign-inqueue5pnpm console:screenshotsstreaming6app/search9app/shell11,app/toasts2breakpoints,colours; axe →browser-checks; keyboard →keyboardapp/sign-in12update2usage5<style>→browser-checks; computed colours →colours; keyboard →keyboardworkers-answers.tshelpers. The new stubs answer fixed JSON and never callroute.fetch, so the race is gonefleet8,worker-page22colours; rings above the cards and the ⋯ padding →breakpoints<style>, axe in both themes on every page and open surface.lease id, older events and no join tokenClaims the earlier run dropped, weakened or broke, and what this PR does
proxiedfixture, but the shell-geometry test folded intobreakpointsstill used it (TS2339 on push). It now starts its own proxied daemon. The simplified proxy also lost its sign-out address, so the proxy case no longer drew a Sign out icon; the address is back.every,inspector,opensDrawer,OLD_PROTOCOL,mintJoinToken) made the push hook fail, so only the first commit had been pushed. They are now private. The unusede2e/console/tab.tsis deleted.fetch, the breakpoints overflow probe, the screenshot script). Each is now split into small steps.browser-checks.docs/.breakpointssaved PNGs as a side effect. That is now the screenshot script's job only.NAVgained Settings, so CSP, axe, 360 px, keyboard and sign-in cover it.task/1434UI, not weakened:n / m. The "squares through ten" claim moved to the worker page's side card, the only place that still draws squares, in both DOM andcolours.e2e/usage-projection.test.tscovers it over HTTP; the DOM Overview test checks that the tiles equalGET /v1/stats.simlock events --since 1h" is covered bye2e/event-history.test.tsplus the DOM feed tests.Kept although the DOM tests cover the UI side:
sign-inrefusing agent, worker and unknown tokens checks the real daemon's status codes end to end, so the console's messages are known to match what the daemon sends.Known limits
:emptymatch after text arrives. The search's "No results for …" line is therefore asserted present, not visible; the browsersearchstate inbrowser-checksdraws it.task/1434and come from its files, not this branch:tiles,EventList,SideCard,overrideFor, and the views colour test now incolours.ui/src/screens/settings/settings.css.origin/task/1434moved four times during this work (last merged: 1d8df7d). Several of its own browser specs are stale against its UI (Settings in the nav, the foot toggle, the removed disk panel); this branch deletes or ports them.Verification
pnpm exec vitest run --project ui-dom: 195 passed, about 8 s.--workers=4): all 41 pass.pnpm console:screenshots: 44 dark captures and 13 light ones indocs/internal/console-redesign/current/. 2-fleet and light/settings were opened and checked.pnpm test:changed: the only failures are daemon tests that bind port 4701, which the demo daemons on this machine hold (EADDRINUSE). The same tests fail alone and touch no file this PR changes.Written by an agent.