Trade logistics: remove useless 'Cheapest source', grow 'Supply gaps' to 20+ entries #95

Closed
opened 2026-07-07 06:11:12 +00:00 by coilysiren · 2 comments
Owner

Trim the trade logistics surface: drop the useless "Cheapest source" board and grow "Supply gaps" from ~8 to 20+ entries. Filed from a batch of eco-app feedback Kai handed the director surface. Touches frontend/src/pages/Trade.tsx and src/eco_mcp_app/logistics.py.

  • Remove "Cheapest source." Kai: "the 'Cheapest source' section is useless." Delete the Cheapest source card in Trade.tsx (around the <h3 className="card-title">Cheapest source</h3> block) and stop computing it in logistics.py (the Cheapest source: where to BUY branch and its cheapest_source output field), unless another surface consumes it (check before deleting the compute). Prune the now-dead MCP card copy in server.py / templates/partials/logistics.html that describes it.
  • Grow "Supply gaps" to 20+. Kai: "the 'Supply gaps' section is great - add more entries (it's ~8 right now, I want something in the 20+ range)." Raise whatever caps the gap list in logistics.py (the classify-and-rank pass around the supply-gap builder) so 20+ gaps surface when the data supports it, and make sure Trade.tsx renders them all (or paginates) rather than clipping to ~8. Keep the "who needs it" enrichment from eco-app#77.

Done when

Cheapest source is gone from the /trade page and the MCP card, Supply gaps shows 20+ entries when available, and no surface references the removed board. ward exec test + lint gates green. Update docs/FEATURES.md if the logistics boards changed.

Trim the trade logistics surface: drop the useless "Cheapest source" board and grow "Supply gaps" from ~8 to 20+ entries. Filed from a batch of eco-app feedback Kai handed the director surface. Touches `frontend/src/pages/Trade.tsx` and `src/eco_mcp_app/logistics.py`. - **Remove "Cheapest source."** Kai: "the 'Cheapest source' section is useless." Delete the Cheapest source card in `Trade.tsx` (around the `<h3 className="card-title">Cheapest source</h3>` block) and stop computing it in `logistics.py` (the `Cheapest source: where to BUY` branch and its `cheapest_source` output field), unless another surface consumes it (check before deleting the compute). Prune the now-dead MCP card copy in `server.py` / `templates/partials/logistics.html` that describes it. - **Grow "Supply gaps" to 20+.** Kai: "the 'Supply gaps' section is great - add more entries (it's ~8 right now, I want something in the 20+ range)." Raise whatever caps the gap list in `logistics.py` (the classify-and-rank pass around the supply-gap builder) so 20+ gaps surface when the data supports it, and make sure `Trade.tsx` renders them all (or paginates) rather than clipping to ~8. Keep the "who needs it" enrichment from eco-app#77. ## Done when Cheapest source is gone from the `/trade` page and the MCP card, Supply gaps shows 20+ entries when available, and no surface references the removed board. `ward exec` test + lint gates green. Update `docs/FEATURES.md` if the logistics boards changed.
Owner

🔒 Reserved by ward agent --driver claude — container engineer-claude-eco-app-95 on host KAI-DESKTOP-TOWER is carrying this issue (reserved 2026-07-07T06:14:19Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

run seed context — what this run is carrying (ward#609)
  • Resolved: coilyco-gaming/eco-app#95 · branch issue-95 · driver claude · workflow direct-main
  • Run: engineer-claude-eco-app-95 · ward v0.419.0 · dispatched 2026-07-07T06:14:19Z
  • Comment thread: 0 included in the pre-flight read, 0 stripped (ward's own automated comments).

Issue body as seeded:

Trim the trade logistics surface: drop the useless "Cheapest source" board and grow "Supply gaps" from ~8 to 20+ entries. Filed from a batch of eco-app feedback Kai handed the director surface. Touches `frontend/src/pages/Trade.tsx` and `src/eco_mcp_app/logistics.py`.

- **Remove "Cheapest source."** Kai: "the 'Cheapest source' section is useless." Delete the Cheapest source card in `Trade.tsx` (around the `<h3 className="card-title">Cheapest source</h3>` block) and stop computing it in `logistics.py` (the `Cheapest source: where to BUY` branch and its `cheapest_source` output field), unless another surface consumes it (check before deleting the compute). Prune the now-dead MCP card copy in `server.py` / `templates/partials/logistics.html` that describes it.
- **Grow "Supply gaps" to 20+.** Kai: "the 'Supply gaps' section is great - add more entries (it's ~8 right now, I want something in the 20+ range)." Raise whatever caps the gap list in `logistics.py` (the classify-and-rank pass around the supply-gap builder) so 20+ gaps surface when the data supports it, and make sure `Trade.tsx` renders them all (or paginates) rather than clipping to ~8. Keep the "who needs it" enrichment from eco-app#77.

## Done when

Cheapest source is gone from the `/trade` page and the MCP card, Supply gaps shows 20+ entries when available, and no surface references the removed board. `ward exec` test + lint gates green. Update `docs/FEATURES.md` if the logistics boards changed.

Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.419.0).

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent --driver claude` — container `engineer-claude-eco-app-95` on host `KAI-DESKTOP-TOWER` is carrying this issue (reserved 2026-07-07T06:14:19Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh** — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <details><summary>run seed context — what this run is carrying (ward#609)</summary> - **Resolved:** `coilyco-gaming/eco-app#95` · branch `issue-95` · driver `claude` · workflow `direct-main` - **Run:** `engineer-claude-eco-app-95` · ward `v0.419.0` · dispatched `2026-07-07T06:14:19Z` - **Comment thread:** 0 included in the pre-flight read, 0 stripped (ward's own automated comments). **Issue body as seeded:** ``` Trim the trade logistics surface: drop the useless "Cheapest source" board and grow "Supply gaps" from ~8 to 20+ entries. Filed from a batch of eco-app feedback Kai handed the director surface. Touches `frontend/src/pages/Trade.tsx` and `src/eco_mcp_app/logistics.py`. - **Remove "Cheapest source."** Kai: "the 'Cheapest source' section is useless." Delete the Cheapest source card in `Trade.tsx` (around the `<h3 className="card-title">Cheapest source</h3>` block) and stop computing it in `logistics.py` (the `Cheapest source: where to BUY` branch and its `cheapest_source` output field), unless another surface consumes it (check before deleting the compute). Prune the now-dead MCP card copy in `server.py` / `templates/partials/logistics.html` that describes it. - **Grow "Supply gaps" to 20+.** Kai: "the 'Supply gaps' section is great - add more entries (it's ~8 right now, I want something in the 20+ range)." Raise whatever caps the gap list in `logistics.py` (the classify-and-rank pass around the supply-gap builder) so 20+ gaps surface when the data supports it, and make sure `Trade.tsx` renders them all (or paginates) rather than clipping to ~8. Keep the "who needs it" enrichment from eco-app#77. ## Done when Cheapest source is gone from the `/trade` page and the MCP card, Supply gaps shows 20+ entries when available, and no surface references the removed board. `ward exec` test + lint gates green. Update `docs/FEATURES.md` if the logistics boards changed. ``` Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.419.0). </details> <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Owner

WARD-OUTCOME: done - Cheapest source board removed from /trade + MCP card + markdown; supply gaps now render the full 20+ list; test + lint gates green.

Straightforward once I traced the consumers. The one thing that fought back a little was "Cheapest source" not being as dead as it looks: the cheapest compute is still consumed by the /trade drill-down's "cheapest right now" pill (drillSource), so I kept the compute and JSON field and only tore out the standalone board from the SPA panel, the MCP _meta.ui card, and the markdown summary. The issue's own "unless another surface consumes it — check before deleting" hedge is what saved me from a regression there.

The "grow to 20+" half was less about code than about a wrong assumption in the issue: the backend was never capping at ~8, it already delivered up to 40 (TOP_ROWS). The real clip was the frontend LOGI_ROWS = 8 slice. I still gave supply gaps their own env-tunable backend cap (SUPPLY_GAP_ROWS) for clarity and pointed the SPA at a dedicated GAP_ROWS, so the intent is explicit even though the effective backend number didn't change.

Fairly confident — 492 py + 87 fe tests green, lint/typecheck/precommit clean, and I added coverage on both sides (backend surfaces 25 gaps, frontend renders 22). One honest rough edge: "20+ when the data supports it" is unverifiable without a live server that actually has 20+ demanded-but-unsupplied items, so I've only proven the plumbing no longer clips, not that real data fills it. No follow-ups worth filing.

WARD-OUTCOME: done - Cheapest source board removed from /trade + MCP card + markdown; supply gaps now render the full 20+ list; test + lint gates green. Straightforward once I traced the consumers. The one thing that fought back a little was "Cheapest source" not being as dead as it looks: the `cheapest` compute is still consumed by the /trade drill-down's "cheapest right now" pill (`drillSource`), so I kept the compute and JSON field and only tore out the standalone board from the SPA panel, the MCP `_meta.ui` card, and the markdown summary. The issue's own "unless another surface consumes it — check before deleting" hedge is what saved me from a regression there. The "grow to 20+" half was less about code than about a wrong assumption in the issue: the backend was never capping at ~8, it already delivered up to 40 (`TOP_ROWS`). The real clip was the frontend `LOGI_ROWS = 8` slice. I still gave supply gaps their own env-tunable backend cap (`SUPPLY_GAP_ROWS`) for clarity and pointed the SPA at a dedicated `GAP_ROWS`, so the intent is explicit even though the effective backend number didn't change. Fairly confident — 492 py + 87 fe tests green, lint/typecheck/precommit clean, and I added coverage on both sides (backend surfaces 25 gaps, frontend renders 22). One honest rough edge: "20+ when the data supports it" is unverifiable without a live server that actually has 20+ demanded-but-unsupplied items, so I've only proven the plumbing no longer clips, not that real data fills it. No follow-ups worth filing.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/eco-app#95
No description provided.