Skip to content

stewards: title-first sidebar rows and a separate Threads section (BB-48) - #75

Merged
trotterdylan merged 2 commits into
mainfrom
bb/bb-48-title-first-sidebar-rows-threads-section-thr_mvfctu9aif
Oct 24, 2026
Merged

trotterdylan merged 2 commits into
mainfrom
bb/bb-48-title-first-sidebar-rows-threads-section-thr_mvfctu9aif

Conversation

@trotterdylan

Copy link
Copy Markdown
Collaborator

Implements BB-48.

Sidebar rows in the stewards thread list are now title-first: the title takes
the width and truncates last, while the binding key (shown only when the title
does not already name it, and shortened — #612 for a pull request, the key
for a ticket) and the held/blocked badges shrink first. The stage leaves the
row, the chevron no longer carries a child count, and worker/reviewer labels
become a muted W/R tag. One-off threads move out of In flight into a
collapsed "Threads" row, so In flight counts stewarded efforts only;
buildSidebar returns efforts, threads and watches separately.

Merging to bb-plugins main moves the pin, builds a new bb-server image
and stages a restart on every developer's server (quiet window 03:00–05:00
US Eastern, or the owner presses Restart now).

Classification

owner-reviewed: changes the look of the existing sidebar list — rows lose the
key/stage/child count and one-off threads move to a new section — a change to
existing behaviour someone would notice. The reviewer classifies the lane.

What changes

  • plugins/stewards/app.tsx: title-first row layout (meta shrinks and
    truncates first); the key is dropped when the title contains it, otherwise
    shortened, with the full key on the row's title attribute; stage removed;
    child count removed; W/R glyph tags; collapsed "Threads" section below
    In flight.
  • plugins/stewards/sidebar.ts: SidebarTab gains threads; buildSidebar
    partitions stewarded efforts, one-off threads and ops watches.
  • plugins/stewards/DESIGN.md §21: row contents and the Threads section.
  • Tests in sidebar.test.ts and sidebar-app.test.tsx.

Testing

  • npm run typecheck in plugins/stewards: pass.
  • npm test in plugins/stewards: pass (446 tests; plugin is in the CI matrix).
  • Not tested: the 320px visual layout is CSS-only and was not exercised in a
    browser; the tests assert the DOM (no key/stage/count, title attribute,
    shortened key, Threads split).

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Independent review running in bb thread @thread:thr_3i7hqye3u7.

— from bb thread thr_mvfctu9aif

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 1 (GLM 5.3, at aa126ac)

Owner review required: yes — the change restyles an existing page: the stewards sidebar's rows lose the key-when-titled, the stage and the child count, and one-off threads move to a new section, which every user of the list will notice. No bigDecisions entry matches these paths (no store, no contract, no dependency), so the owner decides. @trotterdylan, this one needs your approval.

Suggestions

  • plugins/stewards/app.tsx (keyInTitle): displayTitle.includes(displayKey) matches a substring, so a title ending in …#6123 would wrongly swallow a #612 key and drop it from the row. Anchoring the check (e.g. a RegExp with a (?!\d) lookahead on the captured number) would make the drop exact. Rare in practice — steward titles quote their own binding — so not blocking.

Checked

  • Ran: npm install --include=dev --legacy-peer-deps, npm run typecheck and npm test in plugins/stewards — typecheck clean, 446 tests pass (17 files). The plugin is in the CI matrix (plugins.yaml line 20) and the stewards check on this head is green/in-flight; I ran the suite locally regardless.
  • Verified against ticket:
    • 320px fixture behaviour: title-first row, glyph + title only when the title names the key (Review acme/web#612: … test) — met DOM-side; the CSS-only truncation itself is not browser-exercised, as the PR body states.
    • Shortened key when the title omits it (#612), full key on the row's title attribute — met.
    • held / blocked badges render as today — met (both rendered, stage absent).
    • No child count; chevron still expands and the Expand/Collapse <title> aria-label is unchanged — met.
    • One-offs in a collapsed "Threads N" section under "In flight"; "In flight N" counts efforts only; sidebar.test.ts covers the efforts/threads/watches split — met.
    • Watches, Recently ended and the project-steward row: the sections and their content are unchanged; watch rows inherit the shared row's shrinkable key and title attribute, but ops keys (k8s-namespace/…, dependabot/…, sentry-project/…) never shorten, their stages are always null and their titles don't contain the key, so what a watch row shows is the same as before — met in substance.
    • DESIGN.md §21 describes the row contents — met.
  • Scope: all five changed files are in plugins/stewards; no contract, store, dependency or migration touched. The W/R glyph tags are ticket Change 6, so in scope.
  • Tests would fail if reverted: the stage-absent, #612-shortening, title-attribute, child-count and Threads-split assertions all target the new behaviour with meaningful fixtures (binding() defaults stage: "build").

— from bb thread thr_3i7hqye3u7

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 1 follow-up (f14c1cf):

  • Suggestion — keyInTitle substring match: fixed in f14c1cf. The check is now a regex with a (?!\\d) lookahead, so #612 is not swallowed by #6123; added a test for the boundary. Typecheck clean, 447 tests pass.

No behaviour change beyond the fix, so the round-1 approval stands. This is the owner-reviewed lane; waiting on @trotterdylan.

— from bb thread thr_mvfctu9aif

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 2 (GLM 5.3, at f14c1cf)

Owner review required: yes — same classification as round 1: restyling the existing stewards sidebar rows and sections, no matching bigDecisions entry, so the owner decides. @trotterdylan, this one needs your approval.

Resolved since round 1

  • Suggestion 1 (substring key match): resolved by f14c1cf — titleNamesKey anchors the escaped key with a (?!\d) lookahead, and the new test proves #612 is not swallowed by a #6123 title. The escaping is correct and ticket keys like ENG-1 are handled properly too.

Checked

  • Ran: npm run typecheck and npm test in plugins/stewards on f14c1cf — typecheck clean, 447 tests pass (17 files), including the new boundary test.
  • Diff since aa126ac is exactly the suggested fix plus its test; no scope or behaviour change beyond it, so the round-1 approval carries and this marker repeats it on the new head.
  • Remaining nit, non-blocking: the lookahead only guards digits, so a title containing #612a would still swallow a #612 key — but pull-request numbers are digits only, so this cannot bite in practice.

— from bb thread thr_3i7hqye3u7

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 2: no code change.

  • Nit — #612a would still swallow a #612 key: declined. Pull-request numbers are digits only, so a key can never be followed by a letter; guarding the letter case would add code for a state that cannot occur.

Reviewer approved at f14c1cf (round 2), checks green. Owner-reviewed lane: waiting on @trotterdylan.

— from bb thread thr_mvfctu9aif

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

LGTM

@trotterdylan
trotterdylan merged commit 84fbc9c into main Oct 24, 2026
20 checks passed
@trotterdylan
trotterdylan deleted the bb/bb-48-title-first-sidebar-rows-threads-section-thr_mvfctu9aif branch October 24, 2026 22:55
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Merged: owner-reviewed lane, approved by @trotterdylan on f14c1cf (comment 2026-10-24T22:55:25Z); reviewer verdict=approved at f14c1cf (round 2); checks green. Squash-merged as 84fbc9c.

— from bb thread thr_mvfctu9aif

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