Task: Build the structure page
Table of Contents
This page documents a task in the Trade Blotter — the remaining work story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
Build the structure page from doc/prototypes/trades/structure-page.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Trade Blotter — the remaining work |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-31 |
3. Acceptance
- The Members tab links and unlinks a trade with a reason.
- Each change appears in the history.
The prototype's Price tab was a third line here. It is a valuation of the deal, and the product has none, so it is not this task's: Value a trade against a market snapshot carries it.
4. Plan
Most of the page was already built: the tree, the identity card, the legs table, the members picker and the history. What the acceptance still asked for was the reason, and the price.
The reason was the real gap. Both leg writes carried a sentence the route made up on the person's behalf, so the deal's history recorded that a leg moved and never why. The page now states one reason above the legs, and both the link and the unlink carry it: the route refuses either write without one, so the sentence in the history is always the person's.
The price was a third acceptance line and it is not this task's. The prototype's Price tab is a valuation of the deal against a market snapshot, and the product has no valuation at all — not for a trade, a leg, a structure or a portfolio. The line moved to Value a trade against a market snapshot, and the tab states that the deal has not been valued rather than a figure nobody computed.
5. Measurements
Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an evidence/ file beside the
task and name that file in the Command column.
| What | Value | Command | Commit |
|---|---|---|---|
| A leg moves for a stated reason | 10 cases in the structures route, including a write with no reason refused before anything is read, and the reason the person gave reaching the store | npm test --workspace @ores/bff -- --run src/structures.test.ts |
this branch |
| The history carries it | a member write names :bump_parent_version: true, so the deal's own history holds the change |
grep bump_parent_version projects/ores.trading/modeling/ores.trading.structure_member.org |
this branch |
| The suites | BFF 1191 cases, web 2384 of 2385 | npm test --workspace @ores/bff, npm test --workspace @ores/web |
this branch |
| The web case that fails | src/journeys/parts.test.tsx "the tenant form > opens as a summary…", which fails on the tree without this branch's work |
npm test --workspace @ores/web -- --run src/journeys/parts.test.tsx with the branch stashed |
this branch |
6. Notes
7. Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
8. PRs
9. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
10. Result
The Members tab links and unlinks a leg with a reason, and both reach the deal's history.
| What changed | Where |
|---|---|
| The reason is the person's | legBodySchema and unlinkBodySchema carry a commentary the route no longer invents |
| The page asks for it | one reason field above the legs, and neither action is enabled without it |
| The booking path states its own | a leg booked with its trade names the deal it joins |
The unlink column left the deal's own tab: taking a leg out is its own act with its own reason, and two buttons for it in two tabs would mean two reasons.
11. What is not done
The Price tab states that the deal has not been valued. Valuation is not a screen problem and this task does not pretend to solve it: Value a trade against a market snapshot holds the work.
12. What the tree did
src/journeys/parts.test.tsx fails on "opens as a summary, and asks for no
settings, when the profile states its own". It fails on the tree without this
branch's work too, so it belongs to the tenant form change that landed beside
this one.