mobile: persist thread plan mode across relaunch - #353
Merged
Merged
Conversation
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.
Purpose
Fixes #100 — plan mode state is lost after the app crash/relaunch. Revival of the closed #220 approach, rebuilt on current main. Reported and analyzed by @julianpistorius — thank you for the detailed reproduction and the persistence-direction suggestion.
Key changes
thread_modes.json(shared Rust, one store file — no platform-side parsing).restore_plan_implementation_prompt_from_history, wired intoupsert_thread_snapshotwith a properly scoped existing-thread lookup).Verification
cargo test -p codex-mobile-client -p codex-slingshoton the rebased branch (currentmain0e843080): 806 lib tests + all slingshot suites, 0 failures — includes three new plan-persistence tests (restore-on-cold-hydration, dismissed-prompt stays dismissed, user-turn-after-plan suppresses restore) plus the item-completed / turn fixture repairs.upstream::ItemCompletedNotificationandupstream::Turntest fixtures updated for the upstream struct fields (completed_at_ms,items_view).Notes