Skip to content

fix(app): recover deleted session sync races#29347

Open
YOMXXX wants to merge 1 commit into
anomalyco:devfrom
YOMXXX:fix/session-delete-missing-sync
Open

fix(app): recover deleted session sync races#29347
YOMXXX wants to merge 1 commit into
anomalyco:devfrom
YOMXXX:fix/session-delete-missing-sync

Conversation

@YOMXXX
Copy link
Copy Markdown

@YOMXXX YOMXXX commented May 26, 2026

Issue for this PR

Closes #29323

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Handles a deleted-session race in the app directory sync layer. When a stale sync, diff, todo, or history request receives the SDK-wrapped session-not-found 404 after a session has been deleted, directory sync now removes the local session state/caches and resolves instead of surfacing the stale request error to the UI. Other 404s and non-session errors still rethrow.

How did you verify your code works?

  • cd packages/app && PATH="$HOME/.bun/bin:$PATH" bun test src/context/directory-sync-error.test.ts
  • cd packages/app && PATH="$HOME/.bun/bin:$PATH" bun typecheck
  • cd packages/app && PATH="$HOME/.bun/bin:$PATH" bun test --preload ./happydom.ts ./src
  • git diff --check
  • PATH="$HOME/.bun/bin:$PATH" .husky/pre-push

Screenshots / recordings

Not applicable; error handling fix.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@YOMXXX YOMXXX requested a review from adamdotdevin as a code owner May 26, 2026 08:07
@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 26, 2026

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

Potential duplicate 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.

V2 design, after remove session, lead UI break

1 participant