Browser UI: the Products tab's "every decision about it" link opens an empty custody chain
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 298
- Forks
- 18
- Avg merge
- 7h 56m
- Merged PRs (30d)
- 337
Description
`engine/ui/src/governor/ProductsScreen.tsx` links each product's custody as `CustodyLink subject={`product:${name}`}`. The engine does not resolve that subject. `rocky audit --for product:revenue_daily` on the fulfillment POC answers `subject_kind: "model"`, `resolved: false`, 0 decisions, while `draft:revenue_daily` resolves to 5.
Why: `commands/audit.rs` classifies a subject as a plan when a ledger row's `plan_id` equals it (or a run id, or a plan file on disk), else as a model. The product loop records its decisions with `plan_id = "draft:"` (rocky-mcp `tools.rs`); `product:` is the row's `product_id`, which custody never consults. So the link the tab offers as "every decision about it" opens a chain with nothing in it, and the page cannot tell that from a product nobody decided on.
Two fixes, not exclusive:
1. **UI, now.** Link to what the engine already answers for a product: the audit tab filtered by product (`GET /api/v1/audit?product=` matches `rocky audit --product `), which is exactly "every decision about it". Keep a custody link only for a subject custody resolves.
2. **Engine, later.** Teach custody a product subject: `product:` resolves through `product_id`, with `subject_kind: "product"` in `AuditOutput` (that is a schema change: `just codegen` + fixtures). Then the tab can link custody again.
Found by the docs lane while writing `guides/browser-ui.md` (#2000); the guide's custody example now uses a subject that resolves.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in engine/ui/src/governor/ProductsScreen.tsx and compare the product link with GET /api/v1/audit?product=. Read commands/audit.rs and rocky-mcp tools.rs to understand the existing subject and plan identifiers; if pursuing the engine option, also inspect AuditOutput, codegen, and fixtures. Done means the Products tab no longer opens an empty custody chain for a product, or product custody resolves consistently if that option is chosen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- api, backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100