Skip to content

stewards: sidebar redesign with two-line effort rows, four glyphs and Blocked / In flight sections (BB-76) - #105

Merged
trotterdylan merged 2 commits into
mainfrom
bb/bb-76-stewards-sidebar-redesign-thr_5x9z3rffaz
Oct 27, 2026
Merged

trotterdylan merged 2 commits into
mainfrom
bb/bb-76-stewards-sidebar-redesign-thr_5x9z3rffaz

Conversation

@trotterdylan

Copy link
Copy Markdown
Collaborator

Implements BB-76. The stewards sidebar's effort rows become two lines (glyph · key · title; kind · phase · status phrase) with the four-glyph state model, the inline needs-you actions, and the Blocked / In flight / Threads / Monitors / Recently ended sections. The old "Needs you" block is removed; its row actions move into the effort row. stewardsSidebar now carries the status report the row needed (phase, status.actor/nextAction/at, holdBehind, stuck, deployment, and per-worker status).

Merging this rebuilds the bb-server image and stages a restart for every developer's server (at Restart now, or in the 03:00–05:00 ET quiet window). A running thread loses its turn when its server comes up.

Classification

owner-reviewed: the change touches plugins/stewards/server.ts, which is in the decide-enforcement / self-widening paths (decisions.ts), so the project steward's approval is not the gate. It also visibly changes the sidebar's rows, glyphs and sections and removes the Needs you block.

What changes

  • sidebar.ts: pure effortState / effortSection / effortPhrase (every rule and the you › blocked › running › quiet precedence), deploymentPhrase, effortTitle, and compareBlocked / compareInflight; SidebarEffort carries the status fields and the derived state / section / phrase; SidebarTab returns blocked / efforts / threads / monitors.
  • server.ts: stewardsSidebar adds phase, holdBehind, stuck, status, deployment, per-worker status, and a bindingKey on every needs item, so an effort row owns its item.
  • app.tsx: SidebarEffortRow is the two-line row with the inline need block; SidebarNeedsSection and SidebarNeedRow are gone; the four-glyph StewardGlyph (CSS pulse, motion-safe, off under prefers-reduced-motion) is shared by efforts and one-off threads; Watches is renamed Monitors; the picker count is the number of yellow rows. Draft and working-draft one-off rows keep bb's ThreadStatusGlyph; the W/R child tags and the context menu are unchanged.
  • Docs: DESIGN.md §21 and the README sidebar section.

Notes on behaviour:

  • Project-level questions (a question with no binding, key = null) have no effort row and no longer appear in the sidebar; they stay on the Stewards page. Every other needs item carries its binding's key.
  • A deployment watch in the merged state shows the phrase deploying, like deploying itself.

Testing

  • npm test in plugins/stewards: pass (619 tests; the plugin is in the CI matrix).
  • npm run typecheck in plugins/stewards: pass.
  • sidebar.test.ts covers every phrase rule, the glyph precedence, the actor = other → blocked case, the section split, and the new ordering.
  • sidebar-app.test.tsx covers the two-line row, the four glyphs on efforts and one-off threads, the inline need actions (question choices, decide choices, approve-pr, with-user) and the refetch, the Monitors rename, the ops-to-Blocked move, and the picker count.
  • server.test.ts covers the new stewardsSidebar fields.
  • Not tested: the rendered page in a real browser; the components are exercised under jsdom by the plugin's own test harness.

— from bb thread thr_5x9z3rffaz

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Independent review running in bb thread @thread:thr_2wrw9kxk89.

— from bb thread thr_5x9z3rffaz

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 1 (GLM 5.3, at b64ddc9)

Owner review required: yes — the change visibly removes and reshapes existing behaviour someone relies on (the "Needs you" block is gone, rows/glyphs/sections change meaning), and none of the decide: project entries in stewards/project.json match the touched paths (no source-contract.ts, store.ts or package.json changes). @trotterdylan, this one needs your approval.

Suggestions

  1. sidebar.ts:186 (effortPhrase) — when only the steward thread itself is busy (busy: true, runningWorkers: 0 — a steward mid-turn before spawning a worker, or after its last worker finishes), the row shows the blue pulsing ring with the phrase 0 workers running, which reads as a contradiction. Falling through to the deployment/nextAction rules when runningWorkers === 0 (or a distinct "steward running" phrase) would avoid it. Matches the documented rule literally, so not a blocker.
  2. sidebar-app.test.tsx — the old block's suite had a test for the server-refusal path (ok: false message shown in the row, buttons re-enabled); the ported SidebarInlineNeed keeps the code but the test did not come across. The PR body and README claim the refusal is shown in the row — worth re-adding that test.
  3. Project-level questions (bindingKey null) are now invisible in the sidebar entirely (old block listed them); they stay on the Stewards page. This is stated in the PR body as intended — flagging so the owner sees the trade-off when approving.

Checked

  • Ran myself: npm run typecheck and npm test in plugins/stewards — pass (619 tests, 20 files). The plugin is in the CI matrix (.github/workflows/plugins.yaml), so the green check covers it; the in-progress quality_checks (stewards) is a duplicate re-run of a workflow that already succeeded on this head.
  • Verified against ticket (all criteria met):
    • Needs-you effort appears once, top of Blocked (yellow state: you), with its prompt and inline actions; choices go through stewardsAnswerQuestion { choice } / stewardsNeedAction { action: "choose" } (same shapes the board sends), approve/merge through stewardsNeedAction, and success refetches so the row updates without reload. One documented deviation: a pinned blocked row sorts above yellow ones (compareBlocked), so needs-you is top-of-Blocked only among unpinned rows — stated in DESIGN.md §21 and unit tested.
    • blockedOn / hold / open stuck escalation / status.actor = "other" all land in Blocked with the red ring and their rule's phrase, never in In flight (effortState/effortSection, all four rules unit tested).
    • Running workers → In flight, blue motion-safe:animate-pulse ring, phrase counts only workers with worker-table status running (finished workers excluded, tested).
    • Quiet → In flight, grey ring, phrase from nextAction or the deployment state (deployed / deploy failed / merged→deploying, tested).
    • One-off threads use the same StewardGlyph: yellow on unread, blue animated while busy, grey otherwise; drafts/working-drafts keep bb's ThreadStatusGlyph (tested).
    • Line two: kind + phase for tickets/PRs/reviews, kind only for ops (phase is null for ops bindings).
    • Ops bindings sit in collapsed Monitors unless needs-you or blocked (both cases move to Blocked and out of Monitors, tested).
    • No "Needs you" section exists; the picker count is derived from the yellow rows themselves (blocked.filter(state === "you")), so picker and sections cannot disagree.
    • sidebar.test.ts covers every phrase rule (all nine, first-match-wins) and the glyph precedence; sidebar-app.test.tsx covers the inline need actions and the refetch.
    • ThreadActionsContextMenu wraps every row shape (effort rows inline, one-off/child/steward rows via SidebarThreadRow), presence tested.
  • Scope respected: source-contract.ts untouched (diff verified empty), no store migration, no new dependency, no new data stored.

— from bb thread thr_2wrw9kxk89

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 1 suggestions addressed in c43d50d:

  1. 0 workers running — fixed: effortPhrase applies the N worker(s) running rule only when runningWorkers > 0; a busy steward or reviewer with no running worker falls through to the deployment / nextAction / no report yet rules (the ring is still blue). Added unit cases for the busy-with-nextAction and busy-with-nothing cases, and noted it in DESIGN.md §21.
  2. Server-refusal test — fixed: re-added a sidebar-app.test.tsx case where stewardsNeedAction returns ok: false, asserting the message shows in the row and the Approve button is re-enabled.
  3. Project-level questions — acknowledged, no code change: a question with no binding has no effort row and stays on the Stewards page; the trade-off is in the PR body and DESIGN.md §21.

npm test (620) and npm run typecheck pass in plugins/stewards. Lane stays owner-reviewed.

— from bb thread thr_5x9z3rffaz

@trotterdylan

trotterdylan commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review round 2 (GLM 5.3, at c43d50d)

Owner review required: yes — unchanged lane (visible removal/reshaping of existing sidebar behaviour; no decide: project entry matches the touched paths). @trotterdylan, this one needs your approval.

Resolved since round 1

  • Suggestion 1 ("0 workers running" when only the steward is busy): resolved — effortPhrase now gates the count on runningWorkers > 0, so a busy steward/reviewer with no running worker keeps the blue ring but falls through to the deployment / nextAction / "no report yet" phrase; DESIGN.md updated and two unit cases added.
  • Suggestion 2 (missing refusal-path test): resolved — the server-refusal test is back (message shown in the row, buttons re-enabled).
  • Suggestion 3 (project-level questions invisible in the sidebar): acknowledged by the author, no change — left as the documented trade-off for the owner to see.

Checked

  • Diff since b64ddc9 reviewed: exactly the two fixes plus the doc line — no scope or behaviour change beyond what round 1 approved, so the earlier verdict stands across this push.
  • Ran: npm run typecheck and npm test in plugins/stewards — pass (620 tests, 20 files).

— from bb thread thr_2wrw9kxk89

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

LGTM

@trotterdylan
trotterdylan merged commit e8d64a5 into main Oct 27, 2026
20 checks passed
@trotterdylan
trotterdylan deleted the bb/bb-76-stewards-sidebar-redesign-thr_5x9z3rffaz branch October 27, 2026 02:06
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Merged: owner-reviewed, approved by trotterdylan on c43d50d (comment 2026-10-27T02:05:16Z); the independent reviewer's round 2 approved the same sha. merge commit e8d64a5.

This merge to bb-plugins main moves the pin, rebuilds the bb-server image and stages a restart for every developer's server (at Restart now, or in the 03:00–05:00 ET quiet window).

— from bb thread thr_5x9z3rffaz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant