Skip to content

fix(desktop): navigate to root session after archiving instead of subagent - #12798

Closed
bzbetty wants to merge 3 commits into
anomalyco:devfrom
bzbetty:fix/archive-session-navigate-to-root
Closed

bzbetty wants to merge 3 commits into
anomalyco:devfrom
bzbetty:fix/archive-session-navigate-to-root

Conversation

@bzbetty

@bzbetty bzbetty commented Feb 9, 2026

Copy link
Copy Markdown

Summary

Fixes #11222

After archiving the current session with Ctrl+Shift+Backspace, the app would sometimes navigate to a subagent/child session instead of the next root session. This happened because both archiveSession functions (in layout.tsx and session.tsx) selected the next session from the unfiltered session list, which includes subagent sessions (those with parentID set).

Changes

  • packages/app/src/pages/layout.tsx: Filter store.session to exclude subagent and archived sessions before selecting the next session to navigate to
  • packages/app/src/pages/session.tsx: Same fix applied to the archiveSession function here

The deleteSession function in session.tsx already applied this filter correctly — this PR makes archiveSession consistent with that behavior.

…agent

Filter out subagent and archived sessions when selecting the next
session to navigate to after archiving. The deleteSession function
already applied this filter correctly, but archiveSession did not.

Fixes anomalyco#11222
@bzbetty
bzbetty requested a review from adamdotdevin as a code owner February 9, 2026 08:35
@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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.

[Desktop] After archiving current chat with keyboard, wrong session is displayed

1 participant