Skip to content

Console: the Leases page and search show a lease's label #1757

Closed

Description

@V3RON

Part of #1745.

Scope

An operator sees each lease's label in the console: as the first line of the Leases table's "Held by" cell above the holder, in the side list as <label> · <model>, and in the lease drawer as Label. The Leases page filter and the search dialog (⌘K) both find a lease by its label. An unlabelled lease looks as today.

If this goes wrong, an operator would see no label on a labelled lease, a broken row layout at phone width, or a search that misses a label.

Technical spec

Commit fb42676.

Rows

  • Behaviours: B10
  • Interfaces: I9
  • Existing code: X17, X21

Facts

# Fact Source
F1 The console reads leases through the status lease schema, which extends leaseRecordSchema, so I2's label reaches it with no new route src/contract/status-schemas.ts:466, ui/src/model/leases.ts:3, :19
F2 The Leases page's DOM test lists leases with holder, worker and time left, the model for B10 ui/src/screens/leases/leases.dom.test.tsx:52
F3 The search dialog's lease result is built in ui/src/model/search.ts, which has its own unit test ui/src/model/search.ts:66-70, ui/src/model/search.test.ts

Modules touched

Searches: holderDisplay, searchLeaseRows, lease-list-sub, group: "Leases" in ui/src, website/src/content/docs/docs/worker/console.mdx.

  • ui/src/model/ (leases.ts, search.ts, tests)
  • ui/src/screens/leases/ (index.tsx, summary.tsx, the lease drawer, leases.dom.test.tsx)
  • ui/src/test/fixtures.ts
  • e2e/console/render-fixtures.ts (a labelled lease in leasesBody, for the screenshots)
  • website/src/content/docs/docs/worker/console.mdx

Rules in play

  • ui/AGENTS.md "Layers": the label goes into the view model in src/model/; screens only draw it.
  • ui/AGENTS.md "Look": the label is text that can grow, so it is cut on one line with the whole label in title; it never shares a line with a status pill.
  • ui/AGENTS.md "Tests": B10 is a DOM test; the dialog's result text is a unit test of src/model/search.ts.
  • Documentation rule 9: console.mdx says the Leases row and the search show the label.

Tests

The seam is the whole App through ui/src/test/console.tsx (model: ui/src/screens/leases/leases.dom.test.tsx), and ui/src/model/search.ts directly (model: ui/src/model/search.test.ts).

  • B10: a labelled lease's "Held by" cell shows the label above the holder; the side list reads <label> · <model>; the drawer shows Label; the page filter feature finds it; the dialog's lease result reads feature-x · claude-1 · iPhone 17 Pro and feature finds it; a long label is cut on one line with the whole label in title; an unlabelled lease reads as today

Done when

  • pnpm test:changed passes, with the B10 cases above.
  • pnpm exec vitest run --project ui-dom ui/src/screens/leases/leases.dom.test.tsx passes.
  • pnpm typecheck and pnpm lint pass.
  • pnpm console:screenshots shows the Leases page with a labelled row at desktop and phone width, with no sideways scroll.
  • website/src/content/docs/docs/worker/console.mdx says the "Held by" cell shows a lease's label above its holder and that the search box and the search dialog match it.

Out of scope

A waiting request's label, the iOS rename (#1756), and the feature's Non-goals.

Depends on

Written by an agent.

Metadata

Metadata

Assignees

Labels

task:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions