Repository navigation
Description
Part of #1425.
Scope
Deliver stage 1 of the approved console plan: Overview. This is a reviewable slice of the single feature stack, not permission to merge a partial console into main. The parent Shared values owns every cross-stage value/interface. No issue is claimed or ready until independent spec checking finishes.
In short
The operator gets overview in the approved visual style, with existing identity, session and action semantics. The parent defines render, holder and view-only behavior; quantities below are CSS pixels for layout and milliseconds for request waits unless explicitly stated otherwise.
flowchart LR
O[Operator] --> P["Stage 1 page or shared UI — changed"]
P --> S[Existing state hooks]
S --> M[Pure view models]
P --> D[Shared design components]
S --> A[Existing API and live connection]
If this goes wrong, the operator sees a missing control, a misleading value or content that cannot be read at the selected window size.
Technical spec
Facts
Commit a4e5e7d. Source Facts use this main-reachable commit; the approved design/reference authority remains 3b8c44d, whose source blobs are identical.
| # | Fact | Source |
|---|---|---|
| F1 | Overview imports WorkersTable from the Fleet screen, and renders it. | ui/src/screens/overview/index.tsx:18 |
| F2 | The view hook combines workers, inbox, waiting requests, leases and range figures. | ui/src/state/overview.ts:14-39 |
| F3 | Chart points and peak/current summary are derived from the stats series. | ui/src/model/figures.ts:96-134 |
| F4 | The lane has full-response stubs to avoid ETag 304 bodies. | e2e/console/stub-answers.ts:6-13 |
| F5 | Playwright has named Chromium, Firefox and WebKit projects and a bounded test timeout. | playwright.config.ts:8-22 |
| F6 | Read-resource mapping distinguishes loading, refusal, unsupported and retained data. | ui/src/state/resource.ts:22-46 |
| F7 | API requests use a 10000ms default timeout, counted from request setup. | ui/src/data/api.ts:1-10 |
Modules touched
Searches: rg -n 'overviewOf|WorkersTable|useOverview' ui/src e2e/console src/contract returned 24 matching lines at the Facts commit. Opened the source surrounding the Facts rows and the stage's model/state/screen entry points. Scope is the explicit file ownership below, not a repository-wide redesign.
ui/src/screens/overviewui/src/model/overview.tsui/src/state/overview.tse2e/console/overview.spec.tse2e/console/render-cases/overview.ts (new)website/src/content/docs/docs/worker/console.mdxand other described website pages, only the owned sections below.
Changed callers follow screen → state → model/data and screen → ds. The In short diagram shows those arrows. The task adds no daemon module or new module factory. DS exports are React components with plain props; new hooks reuse the existing providers.
Implement PLAN stage 1 and render 1: attention banner with first issue and remaining count, six linked KPI tiles without sparklines, shared worker tiles in the wall, Leases held area chart, Capacity rings, Queue and Ending soon lists, Requests waiting bars. Range stays in the header; updated is the subtitle. Replace the WorkersTable import with foundation's plain-prop worker visual, never import another screen (F1). State may re-export types and map workers through existing health/slot/load builders. Preserve partial/unknown stats as unavailable, never as zero. For a refused requests read, keep the other Overview cards usable but show Queue as unavailable with its daemon reason and Waiting as unavailable, never an empty-success count; retain the existing unsupported/no-queue fallback for a 501 response (decided in delivery, pending the maintainer). KPI destinations are pinned by the navigation Tests line; Wait p95 uses the existing range-preserving Usage helper. Banner absent at zero. Retain existing range parsing and daemon-sourced stats; no new polling or event feed.
Use existing worker counts and capacity denominators, queue wait ages and lease deadlines. Derive the compact Queue/Ending soon rows in the model; overflow stays inside the card, not the document. Chart summaries and screen-reader numbers remain available. Header and card links must lead to the relevant existing page with the selected range where supported.
Contract and event changes
None. Search: rg -n 'baselineEntrySchema|requesterIdSchema|stream|baseline.save' src/contract src/http and the stage symbol search above. No daemon wire shape, operation, input socket or business event is added. Reuse existing route paths and validation; no protocol bump. The parent Baselines amendment uses only ready/stale list data and a documentation link; no baseline-saving workflow or progress field is added.
Other code on the same state
Searches: rg -n 'leases|workers|inbox|lease-requests' ui/src e2e/console returned 1305 matching lines at the Facts commit. Existing readers/writers are the route-query cache and live invalidation in state/live.tsx and state/queries.ts, session/API connection classification, state/actions.ts per-item in-flight guard, state/router.ts navigation and shared recent feed in state/events.ts. New presentation consumes these owners, never replaces their persistence, timers or duplicate-write rules.
| Component or parallel stage | Interaction and winner |
|---|---|
| Live events and polling | Query/cache remains authoritative; server facts update the view, never fixture or screenshot values in production. Renewal changes use the existing renewal path. |
| Row, inspector, Inbox and search actions | One state/actions runner shares the item key; the first active action wins, later clicks stay disabled until completion. No screen sends its own write. |
| Browser history, page selection and disappearance | URL and latest loaded server identity decide selection; missing subject renders the existing missing/refused state, with no stale action target. |
| Shared recent feed and Activity | Existing recent feed owns drawer/inspector subscriptions; Activity owns its own feed, and stage 6 changes only its hook body. Navigation releases the consumer. |
| Stages 0–7 | Parent Shared values is the ownership contract. Stage 0 APIs are frozen at reviewed baseline; stages 1–6 use disjoint page files/hunks/cases/docs sections; stage 7 integrates serially. A necessary shared API change goes back to the foundation owner and is merged forward before consumers continue. |
| External device/settings drafts and Screens PR | Parent Shared values and Tasks schedule redesign first on the current committed baseline. Redesign owns overlapping DevicesTab/actions, Warm pool and DeviceDrawer hunks throughout this feature; external drafts adapt afterward through normal merge-forward resolution. Stage 4 rechecks actual Screens PR merge-base/head and preserves compatible capture APIs; foundation changes only its owned shell docs. No external task is a prerequisite, claimed, edited or imported. |
Failure modes
| Call | Outcome | What happens | Limit, counted from |
|---|---|---|---|
| Existing route query → API | ok, 200/304 | Render mapped data; 304 retains cached identity. Visual/functional Tests below cover the changed presentation. | Existing default 10000ms from request setup; no new wait |
| Same | error reply / malformed reply | Existing LoadView refusal/unsupported or cached data plus refusal is rendered; no success counts fabricated. Visual Tests include refused/unavailable data. | Same request bound |
| Same | absent worker/device/lease | Existing missing-subject view; clear actionable selection and avoid stale target. Functional cases below cover missing identity where applicable; shared foundation behavior is exercised by existing workers/leases specs. | After bounded request settles, no additional wait |
| Same | network unavailable / throws / no answer | Preserve cache and connection/session handling; do not show connection loss as a page-specific business failure. Existing queries/live/session tests own transport classification; this task adds no transport branch. | Existing API timeout from request setup |
| Existing action runner | ok / refused / no answer / concurrent click | Keep confirm, cancel, daemon message and shared in-flight behavior. Existing actions.spec.ts owns unchanged runner behavior; changed presentation cases below extend that seam, not duplicate it. | Existing action timeoutMs or API default from send; task adds no write |
Presentation/filter/selection state is tab-local; a reload rebuilds from URL and server data. Two tabs read independently and share no new mutable store. The daemon resolves conflicting writes; UI uses the existing runner. A process restart creates no new durable partial state. Existing session/connection tests cover unchanged restart behavior; page Tests exercise remount and selection where changed.
Rules in play
- coding rule 1, “body is the spec”: implement this stage and parent shared decisions, apply the recorded pending-maintainer delivery decisions.
- delivery rules 7/14/15, “checked before it is ready” and “one stack”: independent spec/review gates, reviewed foundation baseline and merge-forward integration, no early main merge.
- documentation rule 9, “same change”: update the owned website section and every other page describing the changed behavior.
- ui/AGENTS.md Layers, “A screen never fetches”: state hooks expose view models; DS receives plain values, no screen-to-screen imports in final code.
- ADR 0011 §§1–5, “No inline script and no <style> element”: bundle assets, retain CSP provider and existing session.
- ADR 0037 §§3–5, “One list of actions per kind of item”: reuse runner, model availability, confirmation, errors and toast semantics.
- ADR 0044 §§1–3, “One query cache”: consume existing keys, clock and feed; no new independent polling.
- ADR 0045 §§1,3–6, “route names a worker and a device”: keep identity/lifetime and existing policy, view-only console.
Tests
Seam: signed-in console browser, model pure exports where explicitly named; extend e2e/console/overview.spec.ts and model the screenshots on e2e/console/views.spec.ts. Do not duplicate unchanged transport or action-runner tests. Copy these parent Behaviours rows, one test per line with cases in a table.
- An operator opens Overview and sees the banner, six KPI tiles, worker wall, capacity rings and compact lists: cases attention zero or many, zero capacity, unknown worker data, twenty slots, long holder or hostname, refused requests with unavailable Queue and Waiting rather than zero, and unsupported requests retaining the existing no-queue fallback.
- An operator changes Overview range and sees the selected stats window in the area and waiting bars with accessible numbers: cases 1h, 6h, 24h, 7d, partial history, no samples and refused stats; extend overview.spec.ts.
- An operator follows Overview links and reaches the relevant page with the correct identity and supported range: cases attention banner, worker tile, ending lease, waiting request and all six KPI links (Leased to Leases, Ready to Fleet, Waiting to Queue, Wait p95 to Usage with selected range, Ending soon to Leases, Workers to Fleet), at default 1h and selected 6h/24h/7d.
- A reviewer inspects stage 1 pages and sees the approved shape with no overflow or accessibility violations: cases 1-overview.png, 1440×900, 1280×800, 390×844, dark and light; compare each dark reference and current PNG, run both-theme axe and list data differences and only the explicit Baselines/Fleet, preserved-collapse header-control and evidence-backed WCAG-AA colour amendments recorded in PLAN.
Done when
- 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.
- Capture this stage's pages through
pnpm test:console --project=chromium e2e/console/renders.spec.ts(page-specific --grep permitted). Compare current PNGs to 1-overview.png; inspect every non-data difference, 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/. - 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.
- Update website pages describing this stage in the same change. Ownership: Own only Overview sections in worker/console.mdx and gateway/fleet-console.mdx. Run
pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjswhen the website changes.
Out of scope
Other stages' owned files/hunks; new device management, warm-target editing, Settings or multi-device Screens behavior; backend/protocol/native capture changes; new input sockets. Apply the parent delivery decisions and document the explicit Baselines amendment; preserve every other reference requirement.
Depends on
Written by an agent.
Activity
github-actions commentedon Nov 7, 2026
Back to
task:draft:.agents/scripts/spec-lint.mjsfound blocking lines. Fix them in the body, then settask:readyagain.V3RON commentedon Nov 7, 2026
Spec updated: reconciled source citations, test ownership/cases and explicit reference exceptions; targeted checks precede readiness.
Written by an agent.
chore(console): drop shared pieces nothing uses now (#1427)
V3RON commentedon Nov 9, 2026
Delivered in #1454 (merged with #1435,
caa5b4e40on main): this stage was built on its own branch and merged into the integrated PR.Written by an agent.