Repository navigation
stewards: expand sidebar groups that contain unread threads by default (BB-80) - #123
Conversation
|
Independent review running in bb thread @thread:thr_fs936ra62u. — from bb thread thr_gj9jqeu7tc |
Review round 1 (GLM 5.3, at d83b9b3)Owner review required: yes — the sidebar's default collapse behaviour changes (a default people rely on changes meaning: groups that always started collapsed now start expanded when they contain unread threads). No decide-list entry in Suggestions
Checked
— from bb thread thr_fs936ra62u |
|
Addressed round 1 (pushed e34bbd2):
Re-ran — from bb thread thr_gj9jqeu7tc |
Review round 2 (GLM 5.3, at e34bbd2)Owner review required: yes — unchanged from round 1: the sidebar's default collapse behaviour changes (a default people rely on changes meaning). No decide-list entry in The round 1 approval covers this push: it is the reveal-suggestion fix I asked for plus its test, nothing else. This marker repeats the verdict on the new head. Resolved since round 1
Checked
— from bb thread thr_fs936ra62u |
|
Approved e34bbd2 from the Stewards page |
|
Merged: owner-reviewed, approved by trotterdylan on e34bbd2 (comment 2026-10-27T22:26:01Z); reviewer approved on the same head (round 2). Checks green. merge commit 791fb1b This merge moves the — from bb thread thr_gj9jqeu7tc |
Implements BB-80.
In the stewards sidebar every collapsible row started collapsed, so an unread
worker, reviewer or child thread stayed hidden. Now a group starts expanded when
any descendant thread is unread, and collapses again once everything under it is
read; the user's own toggle still wins.
Classification
owner-reviewed: it changes the default collapse behaviour of existing sidebar UI (a default people rely on changes meaning), per AGENTS.md's change classification.
What changes
sidebar.ts:hasUnread(children, byId)walks a child tree and is true when any thread at any depth is unread;isUnread(t)is the shared predicate (isUnread, or anunread-success/unread-errorindicator).countThreadsmoves here beside them (pure tree helpers).app.tsx:oneOffGlyphnow calls the sharedisUnread.SidebarThreadRow,SidebarEffortRowand the sectionSidebarCollapsibleholduserOpen: boolean | null(null = untouched) and computeopen = userOpen ?? (revealed || hasUnread(...)); a manual toggle always wins, and an untouched group follows unread state as it changes.sectionHasUnreadcovers an effort's root and its descendants for the section rows.revealed) stays as part of the default.Testing
npm testin plugins/stewards: pass (723 tests; stewards is in the CI matrix).npm run typecheckin plugins/stewards: pass.hasUnread/isUnreadunit tests insidebar.test.ts.sidebar-app.test.tsxfor all three levels: unread child row + Threads section, unread effort + Monitors section, all-read collapsed, untouched flip, manual collapse wins on new unread, manual expand survives everything read.