[PR #13632] fix(app): sync chat when returning from background #14746

Open
opened 2026-02-16 18:19:30 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13632

State: open
Merged: No


What does this PR do?

When using opencode web and using it over a mobile phone, connectivity is not getting restored correctly if the phone locks or puts the browser into the background, forcing the user to full refresh the page. By tracking visibility state as well as using the page lifecycle API's freeze and resume allows us to correctly restore connection.

Fixes #7990 point "Maintaining connections while in the background (preventing disconnection)."

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Tests ran on my local environment using bun run dev web and my mobile phone on both mobile and wifi connections, attempting both tests on screen locking as well as browser going into the background.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13632 **State:** open **Merged:** No --- ### What does this PR do? When using `opencode web` and using it over a mobile phone, connectivity is not getting restored correctly if the phone locks or puts the browser into the background, forcing the user to full refresh the page. By tracking visibility state as well as using the page lifecycle API's `freeze` and `resume` allows us to correctly restore connection. Fixes #7990 point "Maintaining connections while in the background (preventing disconnection)." **If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!** ### How did you verify your code works? Tests ran on my local environment using `bun run dev web` and my mobile phone on both mobile and wifi connections, attempting both tests on screen locking as well as browser going into the background.
yindo added the pull-request label 2026-02-16 18:19:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14746