Skip to content

fix(app): refresh queued inputs when the connection returns - #47573

Merged
Hona merged 2 commits into
anomalyco:v2from
Hona:pending-resync
Sep 6, 2026
Merged

Hona merged 2 commits into
anomalyco:v2from
Hona:pending-resync

Conversation

@Hona

@Hona Hona commented Sep 6, 2026

Copy link
Copy Markdown
Member

When the event stream reconnects, the open session reloads its metadata and transcript through createSessionResolution, which re-runs on the connected transition. Queued inputs (session.pending) were only loaded by the timeline's createResource, keyed on the session ID alone, so after a reconnect the composer kept showing the pre-disconnect queue.

  • createSessionResolution now starts the pending read alongside the message read, so every connected transition refreshes transcript and queue together.
  • sync.run dedupes the concurrent call from the timeline resource, so mounting a session still issues one /inbox request.
void store.message.sync(id).catch(() => undefined)
void store.pending.sync(id).catch(() => undefined)

Copilot AI lite review requested due to automatic review settings September 6, 2026 03:55
@Hona
Hona requested a review from Brendonovich as a code owner September 6, 2026 03:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Hona
Hona enabled auto-merge (squash) September 6, 2026 04:29
@Hona
Hona merged commit 99651b2 into anomalyco:v2 Sep 6, 2026
8 checks passed
@Hona
Hona deleted the pending-resync branch September 6, 2026 05:15
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 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.

2 participants