Repository navigation
fix(server): rewind on chats imported from the Claude desktop app - #5
Merged
Merged
Conversation
Owner
Author
|
Full The one failure is |
…ewind points The desktop app writes blocks of a chat's history into its transcript again, so a uuid could appear two or three times and the heal placed nothing. The scanner now keeps the first record per uuid. A chat imported from the middle of its transcript (its first message a reply) got no turns. Turns now start at the first placed prompt, and that turn records where the transcript before it ends (nativePriorMessageId), so a rewind to the thread start resumes there instead of starting the session over. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ziyadakl
force-pushed
the
fix/imported-rewind
branch
from
October 8, 2026 02:05
b64744b to
7662a1e
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.
Summary
Chats imported from the Claude desktop app had no rewind button, because the import heal recorded no rewind points for them. Two causes, both fixed:
A rewind to that first turn must not throw away the hidden earlier history:
nativeResumeAtis an optional field on the stored provider turn (JSON payload, no migration). Other providers ignore it; only Claude chats are imported.Chats already imported heal on their own:
ImportedRewindHealruns every minute and skips only chats that already have rewind points.Evidence
b1ba5788), 275 of 884 imported prompts had no rewind point. Examples:60491f830/85,d733ff9e2/75,e43fd16c1/67. The server log repeated "matches 2–3 transcript lines" / first-prompt skips every minute.After: same copy, preview build
81ed912b, one heal pass:60491f8385/85,d733ff9e75/75,e43fd16c67/67,7cdea96a37/37. 14 prompts left across 2 chats, being looked at separately.Test Files 6 passed (6) · Tests 269 passed (269).apps/servertypecheck: exit 0.Merge Danger
Door: two-way
Reverting the code is enough. Rewind points the heal already recorded stay in the database; they are ordinary imported runs and older builds read them fine.
Blast Radius: imported-chats
Only chats imported from Claude desktop or Claude CLI, and only their rewind. Native T3 chats and Codex/OpenCode/Pi never set the new field.
temp: build Mac preview…, only exists to build a Mac test archive for this branch. Drop it before merging.🤖 Generated with Claude Code