Repository navigation
fix: deleting several sessions in a row from the phone - #88
Merged
Merged
Conversation
…backgrounded A deleted session stays undoable for four seconds, and that window lives only in memory. Deleting several sessions in a row commits each one when the next is deleted, but the last one waits out its window: if Android killed the backgrounded app before then, its close-session was never sent, and the session came back once its local dismissal expired. Going to the background now commits a pending delete at once; its undo toast is out of sight by then anyway. The new runtime test deletes three sessions in a row and checks that each close-session is sent exactly once, that a session list the bridge sent before closing the later ones does not bring them back, and that backgrounding sends the last one. Co-Authored-By: Claude Code <noreply@anthropic.com>
The bridge test closes three running sessions and one still starting in a row: each is ended in the agent host and acknowledged, the next list has none of them, and replies and events the host still had in flight bring none back. The DeepSeek driver test ends sessions that share one harness process together and checks that the process is closed only after the last one. Co-Authored-By: Claude Code <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checks the "delete several sessions one after another" path through all three layers and fixes the one gap it found.
The gap. A deleted session stays undoable for 4 s, and that window lives only in memory. Each delete commits the one before it, but the last one waits out its window. If Android killed the backgrounded app before that, its
close-sessionwas never sent, and the session reappeared once its local dismissal expired (an hour later). The runtime now commits a pending delete as soon as the app is backgrounded (Msg::Pause, already wired fromProcessLifecycleOwner). Its undo toast is out of sight by then anyway.Tests added:
close-sessioneach; a session list the bridge sent before closing the later ones does not bring them back; backgrounding sends the last one well within the window. This test fails without the fix.Verified:
cargo clippy --workspace --all-targets -D warnings;cargo testfor client-core, client-runtime and bridge-core; agent host typecheck and tests.🤖 Generated with Claude Code