Repository navigation
Description
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.tse2e/console/render-fixtures.ts(a labelled lease inleasesBody, 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 insrc/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 intitle; 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 ofsrc/model/search.ts.- Documentation rule 9:
console.mdxsays 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 showsLabel; the page filterfeaturefinds it; the dialog's lease result readsfeature-x · claude-1 · iPhone 17 Proandfeaturefinds it; a long label is cut on one line with the whole label intitle; an unlabelled lease reads as today
Done when
pnpm test:changedpasses, with the B10 cases above.pnpm exec vitest run --project ui-dom ui/src/screens/leases/leases.dom.test.tsxpasses.pnpm typecheckandpnpm lintpass.pnpm console:screenshotsshows the Leases page with a labelled row at desktop and phone width, with no sideways scroll.website/src/content/docs/docs/worker/console.mdxsays 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.
Activity
test: the dialog's lease result reads label, holder and model and is …
feat(console): the search dialog finds a lease by its label (#1757)
fix(console): a lease's label in the Held by cell keeps its own class…
fix(console): the render fixture's lease may carry a label (#1757)
fix(console): the Leases filter's placeholder names the label it matc…
test(console): an unlabelled lease's side-list line and Held by cell …
feat(leasing): an agent names its lease with a label (#1768)
feat(console): the Leases page and search show a lease's label (#1775)