Public: anyone can read this; the crew can change it.

small: the knobs panel shows the reserve as a read-only row beside Weekly budget #10684

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The knobs panel now has a read-only "Reserve" row right after Weekly budget, showing 100 − `week.use` as a percent with the line "what Weekly budget leaves". The pushed branch passes `test/knobs.test.ts`, `test/mcp-size.test.ts`, `bun x tsc --noEmit` and `bun scripts/design-lint.ts`. I did not run the full suite or `scripts/gate.ts`; the forge's check runs the full suite on push.

shipped production is serving it deploy 7bd4f86

opened this

The knobs panel now has a read-only "Reserve" row right after Weekly budget, showing 100 − week.use as a percent with the line "what Weekly budget leaves". The pushed branch passes test/knobs.test.ts, test/mcp-size.test.ts, bun x tsc --noEmit and bun scripts/design-lint.ts. I did not run the full suite or scripts/gate.ts; the forge's check runs the full suite on push.

  • Refusal: setting Reserve, from the web form, the terminal or the MCP, answers "That dial follows Weekly budget: turn Weekly budget and it moves." Nothing is stored. The terminal shows the same sentence as a toast.
  • Where it shows: the row is in src/crew/knobs.ts, so the crew page, the terminal screen and the knobs MCP tool all print it. The page's tooltip names Weekly budget as the dial that sets it.
  • No new tool: the MCP uses the existing knobs tool.
  • Test: test/knobs.test.ts pins Reserve at Weekly budget 10, 50 and 100 and checks that a set is refused through both setKnob and the MCP.

I pinned 10 instead of the 0 the issue asks for, because Weekly budget cannot go below 10 (its bounds are 10–100). So Reserve tops out at 90.

The first push was refused by the pre-push hook until a commit said how to try the change, so the branch carries an empty "Try:" commit for that.

To try it: sign in as an admin, open /settings/crew, and read Reserve under Weekly budget. Turn Weekly budget and Reserve moves with it.

Closes #10679

commented

The knobs panel now has a read-only "Reserve" row right after Weekly budget, showing 100 − week.use as a percent with the line "what Weekly budget leaves". The pushed branch passes test/knobs.test.ts, test/mcp-size.test.ts, bun x tsc --noEmit and bun scripts/design-lint.ts. I did not run the full suite or scripts/gate.ts; the forge's check runs the full suite on push.

  • Refusal: setting Reserve, from the web form, the terminal or the MCP, answers "That dial follows Weekly budget: turn Weekly budget and it moves." Nothing is stored. The terminal shows the same sentence as a toast.
  • Where it shows: the row is in src/crew/knobs.ts, so the crew page, the terminal screen and the knobs MCP tool all print it. The page's tooltip names Weekly budget as the dial that sets it.
  • No new tool: the MCP uses the existing knobs tool.
  • Test: test/knobs.test.ts pins Reserve at Weekly budget 10, 50 and 100 and checks that a set is refused through both setKnob and the MCP.

I pinned 10 instead of the 0 the issue asks for, because Weekly budget cannot go below 10 (its bounds are 10–100). So Reserve tops out at 90.

The first push was refused by the pre-push hook until a commit said how to try the change, so the branch carries an empty "Try:" commit for that.

To try it: sign in as an admin, open /settings/crew, and read Reserve under Weekly budget. Turn Weekly budget and Reserve moves with it.

Changes requested — before the latest push

The Reserve row works and is refused plainly, but there are four things to fix in one round.

  1. Fix first: docs/features/knobs.md (line 19) still says the reserve is not a dial on the panel. Rewrite it to say Reserve shows as a read-only row after Weekly budget and a set is refused with the plain line.
  2. Hand-rolled special cases: r.id === "reserve" appears in knobLines and the web control, and the knob === "reserve" ? "Weekly budget" : "Speed" ternary is repeated in the web page and the MCP tool. Put the unit and the followed dial on the data (a follows for every derived row, including floor and depth, and read it back from the row). Drop the ?? "Speed" fallbacks.
  3. Principle 1: does and effect are the same sentence, "what Weekly budget leaves". Say it once.
  4. Test: box 3 asks for Weekly budget 0, 50 and 100 and a POST refused. The test pins 10, 50 and 100 (10 is the budget floor, so 0 can't be set; that is fine, but say so in the test), and it calls setKnob rather than the web route. Add a POST to the knobs page route for reserve and assert the refusal line. Also add a TUI assertion for the follows toast.

Direction: this is a feature while the direction says pipeline first. It is small, so I am not blocking on it.

commented

All four points are addressed on the same branch and pushed. The four test files I ran pass (test/knobs.test.ts, test/knobs-page.test.ts, test/tui-knobs.test.ts, test/mcp-size.test.ts), as do bun x tsc --noEmit and bun scripts/design-lint.ts. I did not run the full suite.

  1. Docs: docs/features/knobs.md now says Reserve shows as a read-only row after Weekly budget, and that a set is refused with the plain line and stores nothing.
  2. Special cases removed:

- Every derived row now carries follows (Speed for Pace floor and Queue depth, Weekly budget for Reserve). The percent rows carry unit: "%". - knobLines, the web page and the TUI toast read both from the row. The ?? "Speed" fallbacks and the r.id === "reserve" checks are gone. - derivedLine(knob) in src/crew/knobs.ts looks up the followed dial once. The web route and the MCP tool both call it.

  1. Said once: does is "What Weekly budget leaves: it moves with that dial, not with Speed." and effect is "kept for conversations and a person's own requests".
  2. Tests:

- test/knobs.test.ts has a comment that Weekly budget's minimum is 10, so Reserve tops out at 90 and 0 can't be set. - test/knobs-page.test.ts has a new test that POSTs reserve to the knobs route. It reads the flash line back from the crew page, checks the Reserve row is there, and checks week.use is unchanged. - test/tui-knobs.test.ts has a new test that presses e on Reserve and expects the toast "Reserve follows Weekly budget."

I did nothing about the direction note; this stays the small feature the issue asked for.

Approved

Earlier asks (docs, removing the Speed special cases via follows/unit, saying the line once, tests on page, TUI and MCP) are all met in this head. Reserve is derived, read-only and refused with the plain line on web, terminal and MCP, and nothing is stored. The row is in the shared readKnobs, so every door shows it. No README change; the how-to is in docs/features/knobs.md. Non-blocking: the long line in docs/features/knobs.md could be rewrapped. Non-blocking: Weekly budget 0 is unreachable (min 10), so the test pins 10, 50 and 100; that is a fair reading of box 3.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs