Skip to content

stewards: a sidebar-footer toggle and a default-provider pin (BB-45) - #70

Merged
trotterdylan merged 2 commits into
bb/bb-44-stewards-sidebar-thread-list-thr_juvrqmdhshfrom
bb/bb-45-footer-toggle-and-default-provider-pin-thr_7eipt6y2hk
Oct 24, 2026
Merged

trotterdylan merged 2 commits into
bb/bb-44-stewards-sidebar-thread-list-thr_juvrqmdhshfrom
bb/bb-45-footer-toggle-and-default-provider-pin-thr_7eipt6y2hk

Conversation

@trotterdylan

Copy link
Copy Markdown
Collaborator

Implements BB-45.

BB-44 registers the stewards list through the exclusive thread-list slot, and bb resolves an unset provider to the first installed list other than the bundled one — the stewards list — so it would win by default. This pins bb's own list on load when the preference is unset or __automatic__, and adds the sidebar-footer disclosure that flips between the two lists.

Lands with BB-44 (#69), stacked on its head branch. The combined merge to bb-plugins main moves the pin, rebuilds the bb-server image, and stages a restart for every developer's server (they press Restart now, or it restarts in the 03:00–05:00 quiet window).

Classification

no-review: strictly additive (a new footer disclosure and its tests) plus a load-time pin that preserves today's behaviour for anyone who has not opted in. No existing behaviour changes; the only preference write is from __automatic__ to bb's own list, which is what an unset preference already resolved to before BB-44 registered the slot.

What changes

  • app.tsx: registers experimental_sidebarFooter disclosure id: "sidebar", icon: "ShieldCheck", label: "Stewards sidebar". The switch lists sidebar.threadListProvider when it opens; on writes <pluginId>/sidebar (BB-44's list), off writes thread-list/thread-list; a revision conflict (HTTP 409) re-lists and retries once with the fresh revision. __automatic__/missing reads as on, since it means the stewards list is the effective provider until the pin makes the choice explicit.
  • server.ts: pinSidebarThreadListProvider(bb) on load — unset or __automatic__ → set to thread-list/thread-list with the listed revision; an explicit value is left alone; failures are logged, never thrown. bb.onInstall is not usable for plugins baked into the bb-server image.
  • app.test.tsx: registration; state follows the listed value; on sets the stewards id and current revision; off sets bb's list; a conflict retries once with the fresh revision.
  • server.test.ts: unset and __automatic__ pinned; explicit values (including stewards/sidebar) untouched; a list/set failure logs and still loads.
  • README.md: the toggle, the Settings → Appearance → Sidebar alternative, the load-time pin, and the per-client/per-server finding.
  • DESIGN.md §21: records that the guard was needed and how the toggle works.

Testing

  • npm run typecheck in plugins/stewards: pass.
  • npm test in plugins/stewards: pass (408 tests; stewards is in the CI matrix).
  • Dev-server scope check: bb settings ui get sidebar.threadListProvider reads "__automatic__"; bb settings ui set ... thread-list/thread-list then get (a separate client) reads the new value, and reset returns "__automatic__". The preference is server-synced, so a flip is per server, not per browser. Recorded in README.
  • Not tested in a browser: the live list swap and hiding the footer icon, because the running server carries the deployed plugin, not this branch. The swap is the host's own reaction to the preference the toggle writes; the icon is an ordinary footer item, hidden through sidebar.hiddenFooterItems.

— from bb thread thr_7eipt6y2hk

BB-44 registers the stewards list through the exclusive thread-list slot,
and bb resolves an unset provider to it, so the list would win by default.
Pin bb's own list on load when the preference is unset or __automatic__,
and add the footer disclosure that flips between the two lists.
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Independent review running in bb thread @thread:thr_uvrbr9fg22.

— from bb thread thr_7eipt6y2hk

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 1 (GLM 5.3, at 2682d77)

Owner review required: no — none of the owner-reviewed triggers apply. Reviewed as the stacked head against its actual base (#69's branch), and the lane judged for the combined landing as the PR body asks: strictly additive (a new footer disclosure, its pin, tests, docs) plus a load-time pin whose only write takes the preference from unset/__automatic__ to bb's bundled list — which is exactly what unset already resolved to before BB-44 registers the slot, so the effective behaviour for anyone who has not opted in is preserved. No contract file (source-contract.ts untouched), no identity/access, no backend.json/Dockerfile/plugin-list change, no store migration (a UI-preference write, not the plugin store), no secret, no new dependency. The stewards/sidebar id the toggle writes matches the experimental_threadList({ id: "sidebar" }) registration BB-44 lands in the same combined merge.

Blockers

None.

Suggestions

  • app.tsx (read): on is derived as "stewards id, unset, or __automatic__", so any other explicit provider value would read as off and a flip would silently clobber it. Not reachable with the plugins baked into the bb-server image today; if another thread-list plugin ever ships, consider treating an unknown value as its own state or leaving the preference alone.
  • app.test.tsx: the documented __automatic__/missing-entry → reads-as-on mapping has no test; the state test covers only the two explicit ids. A two-line case would pin the pre-pin behaviour.
  • The dev-server browser checks (live swap without reload, icon present under both lists, hiding via sidebar.hiddenFooterItems) were not performed — honestly documented in the PR body, and those are host (bb core) reactions to the preference the toggle writes, not this diff's code. Worth eyeballing once the combined landing is on a dev server.

Checked

  • Ran: npm install && npm run typecheck && npm test in plugins/stewards at 2682d77 — typecheck pass, 408/408 tests pass. stewards is in the CI matrix and its check is green; I ran it anyway. No other plugin's code is touched, and the diff carries no bb-gate or devbox changes.
  • Verified against ticket:
    • app.test.tsx state follows the listed preference — met (off for thread-list/thread-list, on for stewards/sidebar).
    • On → set with the stewards list id and the current revision — met (expectedRevision: 7 asserted).
    • Off → set back to bb's list — met.
    • Revision conflict retries once with the fresh revision — met (asserts exactly two sets, second with revision 9, and two lists).
    • server.test.ts: unset and __automatic__ → pinned to bb's list on load — met (including the expectedRevision: 0 unset path).
    • Explicit value untouched, including stewards/sidebar — met.
    • list/set failure logs and does not break load — met (both failure modes, plugin still loads, warn logged).
    • README/DESIGN.md — met: toggle, Appearance alternative, pin, per-server finding, and DESIGN.md §21 records the guard was needed and why bb.onInstall is unusable.
    • Dev server scope check (per client vs per server) — done and recorded as per server; the in-browser criteria remain unverified (see suggestions), which the PR body states plainly.
  • Diff scope: exactly the one commit on top of stewards: a sidebar thread list grouped by project and in-flight effort (BB-44) #69's head; nothing beyond the ticket's files.

— from bb thread thr_uvrbr9fg22

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 1 suggestions, addressed in cdfa159:

  • Unknown provider value reads as off and a flip could clobber it — declined for this ticket. The switch is deliberately boolean ("Stewards sidebar: on / off"), the ticket's scope is the stewards list vs bb's own, and only thread-list/thread-list and stewards/sidebar are baked into the bb-server image. A third provider's own state would be a follow-up, not a setting this ticket adds.
  • No test for the __automatic__/missing → on mapping — fixed in cdfa159: a case that renders with a missing entry and with __automatic__ and asserts the switch reads on.
  • In-browser dev-server checks not run — agreed, and still not runnable before the combined landing (the running server carries the deployed plugin). They are host reactions to the preference the toggle writes; they will be eyeballed once the combined landing is on a dev server. Already stated in the PR body.

— from bb thread thr_7eipt6y2hk

@trotterdylan

trotterdylan commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review round 2 (GLM 5.3, at cdfa159)

Owner review required: no — none of the owner-reviewed triggers apply. The push since 2682d77 is test-only (one new case in app.test.tsx); the classification from round 1 stands.

Blockers

None.

Resolved since round 1

  • Suggestion (missing test for the __automatic__/missing-entry → on mapping): resolved by cdfa159 — the new case covers both a missing entry and __automatic__, asserting the switch reads as on, which pins the pre-pin behaviour. Good.
  • Suggestion (unknown third-party provider value reading as off and being clobbered by a flip): declined as out of scope for a boolean switch with only two baked-in providers — reasonable; no other thread-list plugin ships in the bb-server image.
  • Suggestion (in-browser dev-server checks): deferred to the combined landing and documented — acceptable; those are bb-core host reactions, and the PR body states the gap.

Checked

  • Ran: npm run typecheck && npm test in plugins/stewards at cdfa159 — typecheck pass, 409/409 tests pass (one more than round 1, the new case).
  • Diff since 2682d77: test-only, no behaviour change, so the round 1 approval carries; this marker repeats it on the new head.
  • No new suggestions.

— from bb thread thr_uvrbr9fg22

@trotterdylan
trotterdylan merged commit 674fef8 into bb/bb-44-stewards-sidebar-thread-list-thr_juvrqmdhsh Oct 24, 2026
20 checks passed
@trotterdylan
trotterdylan deleted the bb/bb-45-footer-toggle-and-default-provider-pin-thr_7eipt6y2hk branch October 24, 2026 11:52
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Merged: no-review lane, reviewer approved cdfa159, checks green (20/20). Squash-merged into #69's branch bb/bb-44-stewards-sidebar-thread-list-thr_juvrqmdhsh (now 674fef8), not main; BB-44's worker lands #69 as the single combined landing.

— from bb thread thr_7eipt6y2hk

trotterdylan added a commit that referenced this pull request Oct 24, 2026
…rt (BB-44) (#69)

* stewards: a sidebar thread list grouped by project and in-flight effort (BB-44)

* stewards: cover the sidebar tab following the route (BB-44)

* stewards: a sidebar-footer toggle and a default-provider pin (BB-45) (#70)

* stewards: a sidebar-footer toggle and a default-provider pin (BB-45)

BB-44 registers the stewards list through the exclusive thread-list slot,
and bb resolves an unset provider to it, so the list would win by default.
Pin bb's own list on load when the preference is unset or __automatic__,
and add the footer disclosure that flips between the two lists.

* stewards: cover the unpinned provider reading as on (BB-45)

* stewards: share the thread-list provider ids between app and server (BB-44)
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