Skip to content

fix(desktop): restore bulk "Archive all sessions" button + align header actions - #141

Merged
OmarB97 merged 1 commit into
mainfrom
fix/restore-bulk-archive
Jun 10, 2026
Merged

fix(desktop): restore bulk "Archive all sessions" button + align header actions#141
OmarB97 merged 1 commit into
mainfrom
fix/restore-bulk-archive

Conversation

@OmarB97

@OmarB97 OmarB97 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Why

The fork-built bulk "Archive all sessions" button (commit 5048f11) disappeared from the sidebar. Root cause: 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. The operator also flagged that the remaining header button wasn't aligned with the "Sessions N/M" count label.

What changed

  • desktop-controller.tsx: pass onArchiveAllSessions={() => archiveAllSessions().then(refreshSessions)} again (the surviving action hook, re-wired).
  • chat/sidebar/index.tsx: re-add the onArchiveAllSessions prop, archiveAllOpen/archiveAllSubmitting state, handleArchiveAll, the restored ArchiveAllSessionsDialog, and the archive button. The Sessions header action is now one flex items-center gap-0.5 row holding the archive button and the group-by-workspace toggle, each in a fixed size-6 slot. Since the header row is items-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.
  • i18n: the dialog/button strings are now localized (the sibling group toggle was already i18n'd; the original feature shipped hardcoded English). Added sidebar.archiveAll* keys to en/zh/ja/zh-hant + types.
  • Archive icon spins while submitting; button is disabled when the list is loading, empty, or a submit is in flight.

How to review

  1. desktop-controller.tsx one-line prop re-wire.
  2. The header headerAction block in index.tsx — confirm the two size-6 slots + flex items-center give the alignment, and the group toggle is byte-unchanged from before aside from being nested in the new flex row.
  3. ArchiveAllSessionsDialog + the new i18n keys.

Evidence

  • Restores behavior from 5048f11 (the original bulk-archive PR); archiveAllSessions in use-session-actions.ts is unchanged and already shipping.

Verification

  • apps/desktop: tsc -b 0 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

  • Visual alignment is verified in the rebuilt app, not by an automated snapshot (desktop has no visual-regression harness) — low risk, the layout mirrors the original shipped feature.
  • No new logic in archiveAllSessions itself — purely restoring the UI entry point and wiring.

Collaborators

  • @OmarB97 (operator)
  • Claude Fable 5 (Claude Code)

…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>
@github-actions

Copy link
Copy Markdown

🔎 Lint report: fix/restore-bulk-archive vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10554 on HEAD, 10554 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5544 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@OmarB97
OmarB97 merged commit b19c7c2 into main Jun 10, 2026
12 of 20 checks passed
@OmarB97
OmarB97 deleted the fix/restore-bulk-archive branch August 2, 2026 16:56
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