feat: Resume all — restart the last stopped setup#13
Open
Wegi wants to merge 1 commit into
Open
Conversation
Stop all now snapshots the running setup (main project+tags and each side project's name/percent/tags) into persisted state, and a new Resume button restarts it with fresh timestamps. Crash/quit recovery snapshots the interrupted setup too, so Resume restores what was actually running. Old state.json files without the new key still decode (optional field, synthesized Codable).
a396e97 to
e5e2fd7
Compare
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.
Closes #5
What
After Stop all, the popover's idle view now shows a Resume button (e.g. "Resume acme + 2 sides") that restarts the exact setup that was running — main project with its tags, plus every side project with its name, percent, and tags — with fresh timestamps.
How
SessionSetupvalue type;stopAll()snapshots it before clearing, persisted as an optionallastSetupfield onPersistedState(missing key in oldstate.jsonfiles decodes tonil— no migration needed).resumeAll()replaysstartMain+addSide, so all existing guards and timestamping apply unchanged — including writing watson's running frame, so a resumed session is visible in the terminal (two-way sync from feat: two-way watson state sync (terminal start/stop) #8).watson stop(the reconcile path from feat: two-way watson state sync (terminal start/stop) #8 that flushes sides only),Tests
SessionStoreResumeTests(TDD, red→green) — 9 tests: snapshot capture, fresh-timestamp resume, no-op when running / without snapshot, persistence across relaunch, legacy state-file compatibility, crash-recovery snapshot, terminal-stop snapshot (via a state-file mock), percent-change before stop. Full suite: 54 tests green.