Repository navigation
Add All / Group chats / Direct chats / Unread filters to the sidebar (#3114) - #3162
Conversation
All / Group chats / Direct chats / Unread above the wide sidebar list; rooms, Bots and the coding agent, and the marks the rows already draw.
|
Verdict: PASS at 8aa3137 Ran at this tip: Red first, also at this tip: put base Review points
Non-blocking notes (not a reason to hold): |
Fixes #3114
Owner: Dev
Reviewer: Reviewer
Written-by: Dev
Bot: Dev
Tier: T2
What changed
The wide sidebar now has a session filter above the list: All, Group chats, Direct chats, Unread. Only the current chip is
aria-checked=true; the rail draws no chips. The chosen filter decides the rows, the tree (drawn forAll/Direct chats, where a group filter would hide every node), the plugin section (Allonly) and the list's glide key; an empty result is an empty list.core/src/shared/session-list-filter.js(new, +36):SESSION_FILTERS = ['all','group','direct','unread'],sessionStatusOf,sessionIsUnread,matchesSessionFilter. Pure: no React, no DOM, no host call. Noreadchip — it would only be unread's complement.core/test/session-list-filter.test.js(new, +50): the four cases from the slice comment, names unchanged.core/src/client/sidebar.js(+42/−5):SessionFilterradiogroup afterProjectsNav, thestatusMap/unreadIdsmemo,visibleOrder,showMain,showTree, theuseListGlidekey and fourSIDEBAR_CSSrules.core/src/client/i18n.js(+3):'Session filter','Direct chats',Unreadin the ZH table.core/test/new-chat.test.js(1 line): the source assertion that pinnedorder.filter(entry => !(tree && …)now pins the filtered predicate (matchesSessionFilterinvisibleOrder) — the same literal Add staged Teamily-style chat tools and owner-scoped history search #3112 updates.docs/subsystems/core-client.md,docs/subsystems/core-host.md: the filter bar and the pure module (owned_paths; arch-docs).changelog.d/teamily-group-and-session-filter.added.md: the user-visible entry.core/client.js,patches/ds-bot/files/{src/shared/session-list-filter.js,test/session-list-filter.test.js,test/new-chat.test.js},patches/ds-bot/{0001-core-fixes,0003-flybot-api-client,0008-client-bundle}.patch.Size: 15 files,
15 files changed, 1161 insertions(+), 396 deletions(-). That is over the 12-file cap in the brief: 8 handwritten (two subsystem pages and one existing test literal are gate/CI requirements) plus 7 generated mirrors; nothing outside the slice's file list was touched.Taken from #3112 (tip
1969402ce6)core/src/shared/session-list-filter.js6227a29ecc…core/test/session-list-filter.test.js6a02a76752…core/src/client/sidebar.js3fa6f139d0…SessionFilter,statusMap/unreadIds/visibleOrder/showMain/showTree, theuseListGlidekey,FlyBotSectionsgated onAll, the 4 CSS rulescore/src/client/i18n.jse7d7f2c7aa…Not taken from that file:
shouldClearManualUnread/shared/session-unread.js, the icon rail +bt-side-splitlayout, the Channels settings entry, and the empty-state copy (No group chats/No direct chats/No unread chats) — all outside this slice.Red first
Only the test was added; the module was absent:
After the module, the same command:
Verification at the tip
Ran at this tip:
8aa3137a7a4de634352eb0c90dfb7d32333ed1dbgenerate/canonicalneed git and this box has none on PATH: they ran under the git 2.56.1 dugite ships. Before generating, that binary was checked against the committed series ata306e3c362— it reproducespatches/ds-bot/0008-client-bundle.patchbyte for byte (0001 and 0003 too), so this split is what CI'sgeneratewrites.UI: the slice did not include
sidebar-session-filter.test.js, so the DOM assertion ran as a temporary, uncommitted script using the repository's esbuild + fake-React method (#3112's test file): four chips render in the wide sidebar, Group chats leaves only the room row, Direct chats leaves the Bot rows, Unread leaves only the marked row, only the pressed chip hasaria-checked=true, and the narrow rail draws none —# tests 3 / # pass 3 / # fail 0.Not run: a real browser click-through (no browser on this box);
dev/bench.sh(no host change).This slice does not do
grant_requestChinese, the Project Assistant 09:00 digest is never scheduled if Automation tasks were off at project-create #1751 report dedupe backfill, scheduled-task time zones.shouldClearManualUnreadextraction:useMarkedUnreadstays as onmain.No group chats/No direct chats/No unread chats): an empty result is an empty list in this slice.sidebar-session-filter.test.jsUI assertions (the temporary check above is not committed).src/host/message-search.js, authz whitelists), search materialisation budgets/pagination, group/remote/Agent history permission tests.Checkpoint
{ "pr": 3162, "claim": "Dev", "issue": 3114, "summary": "The wide sidebar now offers All / Group chats / Direct chats / Unread above the session list, and the rows, tree, plugin section and glide key follow the chosen filter; the rail draws no chips. Classification is a pure shared module: rooms are group chats, Bots and the coding agent direct chats, and unread reuses the marks rows already draw. Four unit tests pin the filters and both status-map shapes, and the new-chat source assertion pins the filtered predicate. Two subsystem pages, three Chinese keys and a changelog fragment carry the change, with the bundle and patch series regenerated.", "files": ["core/src/shared/session-list-filter.js", "core/test/session-list-filter.test.js", "core/src/client/sidebar.js", "core/src/client/i18n.js", "core/client.js", "core/test/new-chat.test.js", "changelog.d/teamily-group-and-session-filter.added.md", "docs/subsystems/core-client.md", "docs/subsystems/core-host.md", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/0003-flybot-api-client.patch", "patches/ds-bot/0008-client-bundle.patch"], "checks": { "ran": "TZ=UTC npm run verify; build-client --check; ds-bot-patches check and canonical", "result": "green", "at": "8aa3137a7a4de634352eb0c90dfb7d32333ed1db" }, "next": "waiting for the T2 review at this tip; not enqueued" }