Skip to content

fix(app): handle session.error events in global sync - #48534

Closed
CannonRS wants to merge 1 commit into
anomalyco:devfrom
mQorva:session-error-sync
Closed

CannonRS wants to merge 1 commit into
anomalyco:devfrom
mQorva:session-error-sync

Conversation

@CannonRS

@CannonRS CannonRS commented Sep 11, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #48530

Type of change

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

What does this PR do?

The global sync reducer now handles session.error events instead of ignoring them. When a session turn fails, the reducer resets the session status to idle and marks the last assistant message with an error and finish: "error". A new optional notifyError callback is threaded into applyDirectoryEvent; the server-sync layer uses it to show a toast with the error message (reusing the existing notification.session.error.* i18n keys).

How did you verify your code works?

  • bun typecheck (tsgo) passes in packages/app.
  • event-reducer.test.ts passes 17/17, including a new test asserting the status reset and assistant error marker on session.error.
  • git diff --check clean; no unrelated changes.

Screenshots / recordings

n/a (server/state behaviour; the toast is the only UI, using existing keys)

Fork

Checklist

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

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
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.

session.error events are ignored by global sync (stuck busy, no error shown)

2 participants