Skip to content

v2 client shell: apps/v2 renders the live hierarchy #83

Description

@pseudoseed

Second buildable unit of the Codev v2 UI program (#37), after spec 52 shipped the server events.

What this is

apps/v2 exists and renders the live hierarchy. Nothing else.

One page, at /v2/, that opens the /v2/events stream and draws the site view from the approved design: machine lot, workspace plot, architect header, builder row, with live status and the activity sparkline. It reads. It does not act.

Why this scope

Spec 52's stream has never been consumed by anything. It was tested against fake clients in its own suite and no browser has opened it. The first client is therefore also the first real test of the contract: scoped snapshot, streamId-bound resume, four statuses, tick buckets, counts rollups, gone semantics.

Anything larger buries that. If tiling, terminals and gates all land in the same unit and the tree renders wrong, the cause could be any of them.

In scope

  • New apps/v2 pnpm workspace, fork-owned (FRD Part 0). Zero edits to apps/web, tower.html, apps/vscode, apps/streamdeck.
  • Served from the existing /v2/ mount. No second insertion point in tower-routes.ts — the mount is already there and the next route reuses it.
  • Consumes GET /v2/events via fetch + ReadableStream, not EventSource, which cannot set the codev-tower-key header.
  • Renders FR-1 (containment, not an outline), FR-3 (builder under its spawning architect), FR-4 (live status, pushed), FR-41 (activity sparkline), FR-42 (stalled distinct from idle and gate-waiting).
  • Uses tokens.css and tokens-dark.css as shipped. Colour discipline is binding: rust means a human is needed and is used for gates and nothing else.
  • FR-15: one machine unreachable degrades that subtree only. A dark frame renders as a dark machine, never as an empty tree.

Out of scope

Tiling, terminals, gates UI, multi-machine pairing, the command palette, mobile layouts, theme switching. Each is its own unit. Reading the tree is this one.

The design of record

UX Pilot page SXl8jE8uNyYLwBsG6vsL, 27 designs on main at codev/research/v2-mockups/uxpilot/.

The site view is 01-site.html in codev/research/v2-mockups/, which is real markup with the pattern classes: .plot, .corner, .stake, .spark, .stamp, .grid-bg, .dim-sub, .needs-attn.

Measure a design before scoring it against a breakpoint requirement. Group names are not viewports; that mistake already produced one false finding (FRD rev. 9).

Constraints

  • Additive only. New files under apps/v2/; the /v2/ mount already exists.
  • Do not modify v2-sampler.ts, v2-events.ts, v2-routes.ts or the wire contract. If the contract is wrong, that is a finding to report, not an edit to make.
  • FR-49 applies from the first line: a pane is a viewer. Nothing in the client may destroy a session. This unit has no panes yet, and the ownership rule is established before anything can violate it.
  • Known divergence to carry: dockview's sashWidth stays 4 in JS while its CSS hit region is 44 ([Spike] v2 UI: can a finger drag a dockview split on a real iPad? #62). Not used in this unit; it lands with tiling.

What "done" looks like

Open /v2/ in a browser, see the real hierarchy of this machine, watch a builder spawn and appear without a reload, watch it go stalled after IDLE_WAITING_THRESHOLD_MS, and watch it disappear on afx cleanup. No polling anywhere in the client.

Reference

  • FRD rev. 9: codev/research/codev-v2-ui-frd.md
  • Wire contract: codev/specs/52-v2-server-events.md
  • Server: packages/codev/src/agent-farm/servers/v2-*.ts
  • Auth precedent: apps/web/src/hooks/useSSE.ts (why fetch+stream, not EventSource)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dashboardTower web dashboardenhancementNew feature or requestfork-onlyDeliberately not upstreamed to cluesmith/codev

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions