feat(chat): add thread revert support across providers#278
Draft
gianpieropa wants to merge 1 commit intocoollabsio:mainfrom
Draft
feat(chat): add thread revert support across providers#278gianpieropa wants to merge 1 commit intocoollabsio:mainfrom
gianpieropa wants to merge 1 commit intocoollabsio:mainfrom
Conversation
Introduce a hybrid revert system that restores both workspace files and provider conversation state to any prior user message in a chat session. - Add `checkpoints.rs`: git-backed snapshot store capturing workspace state before/after each chat run (`checkpoint_before`/`checkpoint_after`) - Add `get_revert_targets` and `revert_to_message` Tauri commands, registered in both `lib.rs` and `http_server/dispatch.rs` - Wire provider-specific rollback per backend: - Claude: `--resume-session-at` / `--fork-session` anchor flags - Codex: `thread/rollback` for discarded turn count - OpenCode: native `session/:id/revert` via `parentID` anchor - Expose revert action on user messages in `MessageItem` and `ChatWindow`; revert availability is per-run, not global - Add e2e test suite (`revert.spec.ts`) and extend mock fixtures with `get_revert_targets` / `revert_to_message` dynamic handlers - Document the revert model in `architecture-guide.md` and `data-persistence.md`
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.
Summary
Introduce a hybrid revert system that restores both workspace files and provider conversation state to any prior user message in a chat session.
This change:
Details
Revert behavior
Implementation
checkpoints.rs, a git-backed snapshot store capturingcheckpoint_before/checkpoint_afterfor chat runsget_revert_targetsandrevert_to_messageTauri commandssrc-tauri/src/lib.rsandsrc-tauri/src/http_server/dispatch.rsMessageItemandChatWindowProvider support
--resume-session-at/--fork-sessionrewind anchorsthread/rollbackfor the discarded turn countsession/:id/revertwith theparentIDanchorCompatibility
Tests
e2e/tests/revert.spec.tsget_revert_targetsrevert_to_messageDocs updated
docs/developer/architecture-guide.mddocs/developer/data-persistence.mddocs/developer/testing.mdValidation
bun run lintbun run typecheckcargo check --manifest-path src-tauri/Cargo.tomlManual testing
Notes
bun run check:allis still blocked by existing repo-wide Rust clippy failures unrelated to this change.