fix(app): resume sessions in desktop app#19407
Conversation
Fire session.start for startup, resume, and compaction. Persist one-shot context for the next prompt and add local tests.
Regenerate the JS SDK after adding the session resume endpoint.
…an/session-start-hook
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one related PR: Related PR:
No duplicate PRs found. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #19406
Type of change
What does this PR do?
This wires the desktop app's session page through the existing resume lifecycle so reopening an existing session triggers the same resume hook path that already exists on the server and in the TUI.
The app now syncs first, resumes once per reopened session, and skips that initial resume call for brand-new sessions and fresh forks so only true reopen flows trigger resume. I also added a small shared helper plus focused tests around the one-shot skip and retry behavior.
This depends on #18007 because that PR adds the backend/session lifecycle support that this app-side wiring calls.
How did you verify your code works?
I added focused unit coverage for the new app-side resume helper.
In this checkout, running the app-specific verification commands is still blocked by existing environment issues:
bun test src/pages/session/session-resume.test.tscurrently fails becausepackages/app/happydom.tsimports missing@happy-dom/global-registratorbun typecheckinpackages/appis blocked by existing workspace dependency resolution issues in this checkoutScreenshots / recordings
N/A
Checklist