Skip to content

fix(sidebar): list every live thread and sink archived ones to the bottom - #36

Merged
zereight merged 1 commit into
mainfrom
fix/thread-list-archived-last
Nov 16, 2026
Merged

zereight merged 1 commit into
mainfrom
fix/thread-list-archived-last

Conversation

@zereight

Copy link
Copy Markdown
Owner

Summary

Sidebar thread list (bot and room):

  1. Show every non-archived thread by default. The old caps (6 own threads, 3 bot-opened) are gone.
  2. Put archived threads last in "Show all" (and while searching). They used to be mixed in by recency.

Why

A bot with 17 threads showed 6 rows plus "Show all 17 threads". Opening it put archived rows (보관됨) between live ones.

Changes

  • shared/thread-order.ts: new fork-only archivedLast() (stable partition; upstream's orderedThreadList in wire.ts is untouched, so upstream merges stay clean).
  • SidebarThreadRow.tsx: visibleSidebarThreads no longer counts rows (open++ < 6, BOT_OPENED_VISIBLE).
  • Sidebar.tsx, SidebarGroupThreadList.tsx: wrap the ordered list in archivedLast.
  • Tests: SidebarThreadRow.test.ts, BotThreads.test.ts updated for the removed caps; new tests for archived-last.

Unchanged on purpose: archived threads stay hidden until "Show all" (the open one is still shown); closed / snoozed threads that need nothing and older routine runs stay folded; burst parts stay on their card.

Before / After

Same fixture (12 live + 2 archived, archived first in the input):

default list Show all order
Before (origin/main) 6 / 12 live z1,z2,t0,t1,…,t11 (archived first)
After 12 / 12 live t0,t1,…,t11,z1,z2 (archived last)

Test

  • npx vitest run src/components/SidebarThreadRow.test.ts src/components/SidebarThreadRow.snooze-expiry.test.ts src/components/BotThreads.test.ts src/components/BulkSelectBar.test.ts → all pass (before the test edits, 16 tests asserted the old caps and failed on the change; they were rewritten).
  • tsc --noEmit and pnpm lint clean.

Note

node scripts/brand-rename.mjs --check on current main lists server/bitwarden.ts and server/routes/logins.ts (added by #34, after the rename). Not touched here.

…ttom

The default thread list capped live threads at six (three for bot-opened
ones), and Show all mixed archived threads in by recency. Now every
non-archived thread is listed, and archived threads come last.
@zereight
zereight merged commit 0ae5352 into main Nov 16, 2026
1 of 2 checks passed
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