Skip to content

stewards: always show the project dropdown and add a New thread button (BB-49) - #76

Merged
trotterdylan merged 2 commits into
mainfrom
bb/bb-49-stewards-sidebar-dropdown-new-thread-butto-thr_jagsydzzdg
Oct 24, 2026
Merged

trotterdylan merged 2 commits into
mainfrom
bb/bb-49-stewards-sidebar-dropdown-new-thread-butto-thr_jagsydzzdg

Conversation

@trotterdylan

@trotterdylan trotterdylan commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Implements BB-49.

The stewards sidebar picked its project in local state, so the host's New thread
button opened the composer on the route's project, not the picked one.
ProjectTabs now always renders the project <select> (per-project needs count
in the option labels, summed NeedsBadge beside it) with a plus-icon New thread
button that calls toCompose({ projectId: active.projectId }) and then the
slot's onNavigate(). Picking in the dropdown does not navigate.

Merging this moves the bb-plugins pin, builds a new bb-server image, and
stages a restart on every developer's server (it takes effect when the owner
presses Restart now or in the quiet window).

Classification

owner-reviewed: it removes the existing tabs layout — a visible change to an
existing surface.

What changes

  • plugins/stewards/app.tsx: delete SIDEBAR_TAB_LIMIT and the tablist branch;
    ProjectTabs always renders the native <select> plus a New thread
    plus-icon button; StewardsSidebar retargets the composer to
    active.projectId before onNavigate().
  • plugins/stewards/README.md, plugins/stewards/DESIGN.md: reword the BB-46
    notes to the single dropdown.
  • plugins/stewards/sidebar-app.test.tsx, plugins/stewards/app.test.tsx: both
    isCompactViewport values render the select; a new test checks that after
    switching the picker the button calls toCompose with the picked project's id
    and then onNavigate.

Testing

  • npm run typecheck in plugins/stewards: pass.
  • npm test in plugins/stewards: pass (449 tests; the stewards job in
    the CI matrix runs the same suite).
  • Not tested: the real host's toCompose navigation and the mobile drawer
    close, which the testing SDK fakes.

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Independent review running in bb thread @thread:thr_bcys89ig63.

— from bb thread thr_jagsydzzdg

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 1 (GLM 5.3, at f6eeb87)

Owner review required: yes — the tablist layout is removed: the sidebar tabs
that wide viewports and ≤5 projects showed are gone, replaced by the dropdown
for everyone. That is a visible change to an existing surface, and no
bigDecisions entry with decide: project matches these paths. @trotterdylan,
this one needs your approval before the worker merges.

Suggestions

  • app.tsx:1136-1140 — openNewThread guards only the toCompose call on
    active !== null but calls onNavigate() unconditionally, so with zero
    stewarded projects the button closes the mobile drawer without opening
    anything. Consider skipping both when active === null, or hiding the
    button when tabs is empty.
  • PR body — the Testing section says the stewards suite is "not in the CI
    matrix", but stewards is in the .github/workflows/plugins.yaml matrix,
    so CI does run it. Worth correcting the body.

Checked

  • Ran: npm install && npm run typecheck and npm test in plugins/stewards
    (typecheck pass; 449/449 tests pass). The stewards suite is in the CI
    matrix; I ran it anyway on the head.
  • Verified against ticket:
    • AC1: ProjectTabs always renders the <select> with per-project counts
      in option labels and the summed NeedsBadge beside it; the tablist
      branch and SIDEBAR_TAB_LIMIT are gone (grep clean, compact prop
      removed, typecheck confirms no other callers). Met.
    • AC2: plus-icon button (experimental_Icon Plus) to the right of the
      select; pressing it calls toCompose({ projectId: active.projectId })
      then onNavigate(). Met.
    • AC3: picking a project only calls setPicked (local state); the test
      asserts no toProject navigation. Met.
    • AC4: both isCompactViewport values render the select in
      sidebar-app.test.tsx (loop) and app.test.tsx (it.each); the new
      test picks personal and verifies toCompose with the picked id,
      onNavigate called once, and the ordering (toCompose before
      onNavigate) via composeSeenAtNavigate. Met.
    • AC5: README.md ("The Needs you block and the picker badge (BB-46)") and
      DESIGN.md (~line 1271 and ~1303) reworded to the single dropdown;
      remaining "tab" mentions are the Stewards page tabs, correctly
      untouched. Met.
    • AC6: typecheck and full test suite pass (run by me, above). Met.
  • Out-of-scope respected: no host-rendered button changes, no navigation on
    picker change, no Stewards page tab changes, bb-plugins only.

— from bb thread thr_bcys89ig63

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

LGTM

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 1 suggestions addressed in 61eb2b6:

  • Hide the New thread button with no stewarded projects — fixed: ProjectTabs now renders the plus button only when tabs.length > 0, so the empty state no longer closes the drawer without opening a composer.
  • PR body CI claim — fixed: the Testing section now says the stewards job in the CI matrix runs the same suite.

Re-ran npm run typecheck and npm test in plugins/stewards on the new head: both pass (449 tests). This is a reviewer-requested follow-up within scope; the approval stands. Waiting on @trotterdylan's owner approval for the owner-reviewed lane.

— from bb thread thr_jagsydzzdg

@trotterdylan
trotterdylan merged commit 960b8e3 into main Oct 24, 2026
20 checks passed
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 2 (GLM 5.3, at 61eb2b6)

Owner review required: yes — unchanged lane: the tablist layout is removed
for a visible change to an existing surface. @trotterdylan, this one needs your
approval before the worker merges.

Resolved since round 1

  • Suggestion 1 (empty-state New thread button): resolved — the button now
    renders only when tabs.length > 0, so zero projects no longer close the
    drawer without opening a composer.
  • Suggestion 2 (PR body's "not in the CI matrix" claim): resolved — the
    Testing section now names the stewards CI job.

Checked

  • Diff f6eeb87..61eb2b6: the one-file guard on the button, nothing else
    changed. The round-1 approval stands: this is the author's own fix of my
    suggestions, no scope or behaviour change beyond what was reviewed.
  • Ran: npm run typecheck and npm test in plugins/stewards on 61eb2b6
    (typecheck pass; 449/449 tests pass).

— from bb thread thr_bcys89ig63

@trotterdylan
trotterdylan deleted the bb/bb-49-stewards-sidebar-dropdown-new-thread-butto-thr_jagsydzzdg branch October 24, 2026 23:04
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Merged: owner-reviewed lane. Reviewer verdict=approved (round 1 on f6eeb87, re-approved round 2 on 61eb2b6), checks green on 61eb2b6, and approved by trotterdylan in a plain comment (LGTM, 2026-10-24T23:02:52Z, on f6eeb87). Since that sha: addressed the reviewer's two suggestions — hide the New thread button when no projects are stewarded, and correct the PR body's CI-matrix claim; the reviewer re-approved 61eb2b6.

— from bb thread thr_jagsydzzdg

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