fix(desktop): restore bulk "Archive all sessions" button + align header actions - #141
Merged
Conversation
…header actions The fork-built bulk-archive action (commit 5048f11) vanished from the UI: the desktop-build-restoration (#127) rebuilt ChatSidebar without the onArchiveAllSessions prop, so the controller wiring, the header button, and the confirm dialog were all dropped. Only useSessionActions.archiveAllSessions survived, unreachable. This restores the full surface and fixes its alignment. - ChatSidebar: re-add the onArchiveAllSessions prop + archiveAll dialog state + handleArchiveAll; the controller passes () => archiveAllSessions().then(refreshSessions) again. - Sessions header action is now a single flex row holding the archive button and the group-by-workspace toggle, each in a fixed size-6 slot. The header is items-center justify-between, so both buttons stay vertically centered with the "Sessions" count label and the row height never shifts as buttons show/hide across views, fixing the misalignment. - ArchiveAllSessionsDialog restored, now i18n'd (the sibling group toggle was already i18n'd; the original archive feature shipped hardcoded). Added sidebar.archiveAll* keys to en/zh/ja/zh-hant + types. - Archive icon shows a spinner while submitting; button disabled when loading, empty, or mid-submit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🔎 Lint report:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The fork-built bulk "Archive all sessions" button (commit 5048f11) disappeared from the sidebar. Root cause: the desktop-build-restoration (#127) rebuilt
ChatSidebarwithout theonArchiveAllSessionsprop, so the controller wiring, the header button, and the confirm dialog were all dropped — onlyuseSessionActions.archiveAllSessionssurvived, unreachable. The operator also flagged that the remaining header button wasn't aligned with the "Sessions N/M" count label.What changed
desktop-controller.tsx: passonArchiveAllSessions={() => archiveAllSessions().then(refreshSessions)}again (the surviving action hook, re-wired).chat/sidebar/index.tsx: re-add theonArchiveAllSessionsprop,archiveAllOpen/archiveAllSubmittingstate,handleArchiveAll, the restoredArchiveAllSessionsDialog, and the archive button. The Sessions header action is now oneflex items-center gap-0.5row holding the archive button and the group-by-workspace toggle, each in a fixedsize-6slot. Since the header row isitems-center justify-between, both buttons stay vertically centered with the "Sessions" count label, and the fixed slots keep the row height (and the label baseline) stable as buttons show/hide across views — fixing the misalignment.sidebar.archiveAll*keys to en/zh/ja/zh-hant + types.How to review
desktop-controller.tsxone-line prop re-wire.headerActionblock inindex.tsx— confirm the twosize-6slots +flex items-centergive the alignment, and the group toggle is byte-unchanged from before aside from being nested in the new flex row.ArchiveAllSessionsDialog+ the new i18n keys.Evidence
archiveAllSessionsinuse-session-actions.tsis unchanged and already shipping.Verification
apps/desktop:tsc -b0 errors;vitest src/app/chat src/i18n— 39 passed. Built into the packaged app and swapped onto the running install for visual confirmation of the button + alignment.Risks / gaps
archiveAllSessionsitself — purely restoring the UI entry point and wiring.Collaborators