Repository navigation
Description
What to build
Give the Console's Inbox one row presentation interface for local Command records and checked Fleet rows. Prepare an evaluated local Command's facts before presenting it, and build only the representation the request uses. The Day shift should see the same Inbox rows, links and controls, and status readers should keep the same version-2 Document.
Acceptance criteria
- A local Console Inbox HTML request evaluates the owning Inbox once and skips status JSON construction. A JSON request still uses the existing status projection and its existing route and query behavior. The local HTTP and CLI status Documents stay compatible.
- Local Command records reach the recursive presenter as typed facts assembled from the captured Command and its evaluated Inbox item. Remove the local Command's JSON encode/decode and the top-level pass that patches a partial presentation row with state, cause, count, departure, Dismissal and Ready for review facts. The existing checked peer Document supplies the other input to the presenter.
- Preserve row order, recorded finish and estimated-time behavior, grouped Ready for review membership, PR title/checks and subject-link rules, Landing references, Dismissal eligibility and the handling of separately listed dispatched Runs. Keep local Command IDs, selectors, log growth, log links and Session links, including for Other-account Commands.
- Preserve mixed-version peer admission, owner counts and fields, stale badges and control rules, as well as the existing History, Security and reservation rows. Keep Fleet reads and saved Dismissal reconciliation on their existing interfaces.
- Verify the production presentation interface with a local Command tree and a peer Document from the same owning-machine facts. Check shared behavior and the source-specific differences. Keep the Console Inbox, Fleet, Dismissal, historical row and status JSON regressions passing, and update the domain-to-code index with the owning module.
Blocked by
None (can start immediately).
Decisions
- Use the existing captured Inbox evaluation as the source of local row decisions. Prepare a local recorded row from its evaluated Inbox item before presenting it, with the item's exact group, order, Stop and Needs you state, count, cause, departure, Dismissal and GitHub checks. Construct display fields directly from the typed Command and its record. Supply peer rows from the already checked Console Document. This is a private, in-process seam with two existing sources, and lets one recursive presenter own common display rules without duplicating Inbox evaluation or peer decoding.
- Carry each local node's identity and enrichment alongside its facts. Use its canonical selector, existing ID inputs and selector label, captured activity, local log and Session links, and recorded finish provenance. Map dispatched Runs before child Commands and compute descendant Slow markers and dispatched Spec progress before hiding duplicate direct children. Keep local duplicate detection by selector and peer detection by the pre-tag ID. This preserves both today's DOM identity and accounting when a dispatched Run also has its own Inbox row.
- Keep top-level local presentation facts on the evaluated item. Use its existing state wording, Dismissal eligibility over all collapsed members and departure line. For Ready for review, use the exact row's kept GitHub title with the recorded title fallback, and apply kept-answer freshness to a local Ready for review row carrying a pull request. Keep local Landing references based on the recorded subject and account. Keep local Needs you subject replacement and the Ready for review subject override over the base Release presentation. Apply the existing final subject-link check. These choices preserve local actions, link identity and presentation precedence.
- Keep peer-only compatibility rules on the checked peer path. Preserve wire version, raw fields, validation precedence, missing-field defaults and the distinction between group metadata used for state and a named group used for display. Keep peer title lookup and Release subject precedence, peer Landing reference wording and fallback, machine tagging, and GitHub freshness for the peer Ready for review section. Keep transport age and fetch failures distinct from GitHub freshness and preserve the existing scope-based control masking. The owning machine still decides Inbox groups and carries out actions, as in ADRs 0023 and 0026.
- Preserve local legacy and reservation presentation, including their selectors, log paths, historical timing and reservation controls. History and Security can use the typed local record projection without an Inbox item when they need an ungrouped record. Keep their own selection and their existing legacy presentation. This removes the local record JSON round trip without extending live Inbox metadata to historical views.
- Choose HTML or JSON before constructing the response body, after the existing query validation. HTML uses the typed Inbox preparation. JSON keeps the CLI twin's existing version-2 serialization, selectors and
allbehavior. This removes the unused status projection from HTML and keeps rendering independent of status serialization. - Test through the Inbox presentation interface and existing Console and CLI entry points. Use captured faux Command records and their emitted Document for an overlapping case with a separately listed dispatch, a kept Ready for review title/checks, a Dismissal or departure and a recorded finish. Assert changes through visible row behavior, including local links and peer staleness, and retain existing mixed-version and local JSON parity tests. Use the existing Console verification workflow for rendered coverage. These tests catch mapper drift while leaving private struct layout free to change.
- Ship the presentation change and its callers in one Ticket. The change has one presentation seam, existing fixtures and no release dependency. The existing Glossary and ADRs already specify the domain behavior.
Architecture review
Strength Strong · Dependencies in-process
Files
src/console.rs, src/logs/status.rs, src/logs/status/inbox.rs, src/logs/status/rows.rs, src/logs/reading/inbox.rs, tests/console/inbox.rs, tests/console/fleet.rs
Before
flowchart LR
H["Console Inbox HTML"] --> J["Status JSON"]
H --> E["Owning Inbox evaluation"]
J --> E
E --> B["Bare Command JSON"]
B --> P["Row presenter"]
E -. patches presented row .-> R["Console row"]
D["Checked Fleet Document"] --> P
P --> R
classDef leak stroke:#dc2626,stroke-width:2px
class B,J leak
After
flowchart LR
H["Console Inbox HTML"] --> E["Owning Inbox evaluation"]
J["Status JSON"] --> E
E --> F
D["Checked Fleet Document"] --> F
subgraph I["Inbox row presentation"]
F["Prepared row facts"] --> P["Row presenter"]
end
P --> R["Console row"]
classDef deep stroke-width:3px
class I deep
Problem
The HTML route eagerly builds status JSON, and local presentation then turns each bare Command into JSON, decodes it, renders a partial row and applies the evaluated Inbox facts afterwards. Console render call · Local Command preparation · Evaluated row overrides
Solution
Deepen the row presentation module so the local observation and checked peer adapters supply complete row facts at one seam and the HTML path can delete its status JSON work and partial-row repair.
Wins
- Locality for row presentation rules
- One interface for both sources
- Delete redundant local JSON work
Activity