Skip to content

thread-briefs: count only sidebar threads on the Briefs badge - #17

Merged
trotterdylan merged 1 commit into
mainfrom
bb/the-briefs-sidebar-item-shows-2-indicator-but-ev-thr_p7h4wqf8rk
Oct 7, 2026
Merged

trotterdylan merged 1 commit into
mainfrom
bb/the-briefs-sidebar-item-shows-2-indicator-but-ev-thr_p7h4wqf8rk

Conversation

@trotterdylan

Copy link
Copy Markdown
Collaborator

Summary

The Briefs sidebar badge showed "2" while the board showed everything as Done.

  • The badge counted every stored brief with status waiting-on-me, straight off the server's kv scan.
  • Archiving a thread keeps its brief, so an archived thread whose last brief said "waiting on you" kept counting.
  • The board is driven by the sidebar's thread list and never draws such a thread, so the two disagreed.

The badge now counts only signals whose thread is in the sidebar list, the same rule the board uses. Adds a regression test and a README sentence stating the rule.

Test plan

  • npm run typecheck in plugins/thread-briefs
  • npx vitest run: 406 passed, including the new "does not count a thread the sidebar is not showing" case

🤖 Generated with Claude Code

The badge on the Briefs sidebar row counted every stored brief whose
status was waiting-on-me, but archiving a thread keeps its brief, so an
archived thread kept counting while the board — driven by the sidebar's
threads — never drew it. The result was a "2" over a board showing
nothing but Done.

Count only signals whose thread is in the sidebar list, the same rule
the board uses, so the badge and the page it opens agree.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@trotterdylan
trotterdylan merged commit 5cb8b88 into main Oct 7, 2026
10 checks passed
@trotterdylan
trotterdylan deleted the bb/the-briefs-sidebar-item-shows-2-indicator-but-ev-thr_p7h4wqf8rk branch October 7, 2026 14:08
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