Repository navigation
rewind: web rewind menu moves to useMessageRewind and its own files - #48
Merged
Merged
Conversation
The rewind menu, code restore and Esc-to-stop-or-rewind logic leave Upstream's ChatView.logic.ts, session-logic.ts, state/queries.ts, chatViewSend.ts, useTimelineRewind.ts and MessagesTimeline.logic.ts for useMessageRewind.ts, messageRewind.logic.ts, messageRewindSend.ts and MessageRewindOverlays.tsx. ChatView calls both hooks and renders one overlay element. Tests for the moved functions move with them; the rewind section of composer.md moves to docs/user/rewind.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of ziyadakl/tokenmaxxing#122 (spec pingdotgg#107, rewind step 4 of 5: web).
Summary
The rewind menu, code restore and Esc-to-stop-or-rewind move out of Upstream's web files into the Fork's own files. No behaviour change.
Footprint (Upstream files the Fork edits,
git diff --no-renames --numstat --diff-filter=MD <merge-base> HEAD):ChatView.logic.tsandMessagesTimeline.logic.test.tsstill carry other features' lines (/compact, keep answers).Not moved, on purpose: Upstream's
onRevertToTurnCountstays inuseTimelineRewindbut nothing calls it any more, and Upstream'srewindToMessageandwaitForRevertedMessageare unchanged. Behaviour has to stay identical, so the checkpoint revert on other providers keeps the Fork's wait (waitForRewindOutcome) rather than Upstream's. Deleting the dead Upstream callbacks would put them back in the footprint, and knip rejects an unusedrewindToMessage.rewindToMessageWithChoicetherefore repeats most ofrewindToMessage.Evidence
After: the same files plus the new
messageRewind.logic.test.ts: 12 passed, 326 tests passed. The extra 6 are Upstream's originalwaitForRevertedMessagecases, restored inChatView.logic.test.ts.AttachmentFilePreview.browser.test.tsxandfileEditorDismissal.browser.test.tsxfailed under full-suite load, and both pass alone (134 tests).vp check0 errors,tsc --noEmitfor web clean,vp run knip:checkclean.messageRewindBlockedReason,deriveMessageRewindMenu,planMessageRewind,decideMessageRewindStart,waitForThreadToStop,loadThreadRewindPreview, the session-logic rewind cases andisMessageRewindDisabled. The Fork'swaitForRevertedMessagetests moved underwaitForRewindOutcome(name only).useMessageRewindis the old hook body minus fork-from-run (diffed line by line against the olduseTimelineRewind); no ChatView browser test drives the rewind menu end to end.Merge Danger
Door: two-way. Web only; reverting the commit restores the old files.
Blast Radius: web chat view. The rewind menu, Esc picker and checkpoint revert all run through the new hook, so a mistake would show there first. The server and Claude adapter PRs touch no web file.
🤖 Generated with Claude Code