Skip to content

fix: allow deleting remote sessions the host no longer has - #365

Open
damienrj wants to merge 5 commits into
mainfrom
claude/disconnected-session-deletion-4a68f4
Open

damienrj wants to merge 5 commits into
mainfrom
claude/disconnected-session-deletion-4a68f4

Conversation

@damienrj

@damienrj damienrj commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Deleting a disconnected remote session (the "This session is no longer available" state) failed with Session not found: <id> and the row came right back.

Deleting a chat archives it on the backend. When the remote host has already lost the session, the archive call rejects with Goose's session-not-found error. The store then rolled back the optimistic archivedAt, leaving a sidebar row that could never be deleted.

Now chatSessionStore.archiveSession checks for that case. If a remote session's archive fails with isAcpSessionNotFoundError, the store removes the session locally along with its remote session record, and AppShell's archive flow finishes normally. Any other archive failure still rolls back and shows the error.

Only an explicit user archive (the sidebar action) forgets the dropped session. Auto-archive and berdctl session archive leave it in place, so its cached history stays visible instead of being deleted in the background.

Before — deleting the unavailable remote chat fails and the row stays:

no-longer

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@damienrj
damienrj requested a review from a team September 26, 2026 00:06

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

REQUEST_CHANGES: The remote-session cleanup fixes the undeletable row, but removing the session inside the store clears active-session state before AppShell decides whether to navigate home. Supplied GitHub evidence shows the reported checks completed successfully; required checks still govern merge readiness.

Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Comment thread src/features/chat/stores/chatSessionStore.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

REQUEST_CHANGES: the active-session navigation fix can overwrite newer navigation when the remote archive resolves late. The changed AppShell navigation flow also lacks screenshots or a short screen recording. The supplied GitHub check evidence is structurally valid and all captured checks completed successfully; required checks still independently govern merge readiness.

Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 1 blocking screenshot-evidence requirement(s) in this review body.

🤖 Blocking · Screenshots needed

This PR changes Berd’s graphical interface. Please add screenshots or a short screen recording so the visual result can be reviewed. Screenshots are review evidence; they do not replace accessibility, responsive, theme, localization, or behavior validation.

Comment thread src/app/AppShell.tsx Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@damienrj

Copy link
Copy Markdown
Contributor Author
no-longer

@damienrj

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-09-25 at 10 03 13 PM The chat is gone after picking archive.

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

COMMENT: the full exact PR comparison has no new publishable findings, but Atlas identified a product-contract decision about presenting permanent local removal through the existing Archive action. One proposed navigation-race finding is suppressed because it is the same underlying issue as a resolved automation thread with a substantive human reply. Supplied GitHub check evidence is structurally valid and all captured checks completed successfully; required checks still independently govern merge readiness.

Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 1 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

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

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

REQUEST_CHANGES: an older missing-session archive response can still remove a session after a newer unarchive operation has won. The previously reported late-navigation issue is suppressed under its protected resolved thread. Supplied GitHub check evidence is structurally valid and all captured checks completed successfully; required checks still independently govern merge readiness.

Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 1 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Comment thread src/features/chat/stores/chatSessionStore.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

APPROVE: the full exact PR comparison has no new publishable findings or escalations. The only current engineering concern is the same underlying late-navigation issue as a protected resolved thread with a substantive human reply, so it is suppressed. Supplied GitHub check evidence is structurally valid and all captured checks completed successfully; required checks still independently govern merge readiness.

Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 1 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Pending checks: 1 check(s) are not complete.

This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.

This branch has not been deployed

No deployments
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.

2 participants