💄 style(topic): one-click collapse/expand all topic groups (#15484)

*  feat(topic): add one-click collapse/expand all groups in topic sidebar

Add a toggle button in the topic sidebar header (next to Filter and the
more-actions menu) that collapses or expands all topic groups at once.
It reuses the existing `expandTopicGroupKeys` global status, so it stays
in sync with manual per-group toggling, and hides itself when there are
fewer than two groups (e.g. flat mode).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* 🐛 fix(topic): hide group toggle in flat mode

In flat mode, groupedTopicsForSidebar falls through to time grouping so
the computed group count can exceed one, but List renders FlatMode with
no accordion for the toggle to affect. Hide the control explicitly when
topicGroupMode === 'flat' instead of relying on the group count.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* 💄 style(topic): use 2-corner minimize/maximize icons for group toggle

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Arvin Xu
2026-06-06 01:33:32 +08:00
committed by GitHub
parent 9c4dadda4c
commit 64b7ab2f17
5 changed files with 60 additions and 0 deletions
+2
View File
@@ -135,6 +135,8 @@
"renameModal.title": "Rename Topic",
"searchPlaceholder": "Search Topics...",
"searchResultEmpty": "No search results found.",
"sidebar.collapseAll": "Collapse all groups",
"sidebar.expandAll": "Expand all groups",
"sidebar.title": "Topics",
"taskManager.agent": "Task Agent",
"taskManager.welcome": "Ask me about your tasks",
+2
View File
@@ -135,6 +135,8 @@
"renameModal.title": "重命名话题",
"searchPlaceholder": "搜索话题…",
"searchResultEmpty": "暂无搜索结果",
"sidebar.collapseAll": "折叠所有分组",
"sidebar.expandAll": "展开所有分组",
"sidebar.title": "话题",
"taskManager.agent": "任务助手",
"taskManager.welcome": "问我关于你的任务",