Close tabs and files of archived or deleted sessions - #20
Merged
Conversation
Archiving left the conversation tab open. Deleting a session whose tab also had files promoted those files instead of closing the tab. Route archive and delete through a small workspace helper that drops the session tab when it was the last chat, strips session-scoped changes, and keeps shared splits with other conversations. Co-authored-by: Warexpor <warexpor@gmail.com>
Warexpor
marked this pull request as ready for review
September 4, 2026 21:16
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.
What changed
Archiving a session now closes its workspace tab. Deleting a session closes that tab (and its open files) instead of promoting leftover editors into a session tab. Shared splits that still have another conversation keep their files.
Port of upstream hardbeat920/monocode#70, adapted to this fork’s
App.tsx/workspaceTabGroups(this repo did not havesessionWorkspaceLifecycle.ts).Why
Archive left the tab in place. Delete of a session that shared a tab with files promoted those files oddly.
UI
No chrome redesign. Same archive/delete menus; tab/file cleanup only.
Checklist
npm run check:web— vitest 1208 passed (includingsessionWorkspaceLifecycle.test.ts) andtsc --noEmitnpm run check:rust— not run to completion here (Cargo 1.83 rejected edition2024 crates; this PR does not touch Rust)Web preview (
vite previewat :4173) loads the bundle but does not mount the app without Tauri (__TAURI_INTERNALS__missing duringloadBootWorkspace). Archive/delete persist viainvoke, and unsaved/PTY confirms use the native dialog plugin — those paths need a Tauri desktop session.Did not claim native Windows/Tauri/live session QA.