Skip to content

Studio: simpler Rewind confirm, skipped for conversation-only rewinds - #13676

Merged
shimmyshimmer merged 2 commits into
mainfrom
studio-rewind-dialog-style
Oct 14, 2026
Merged

shimmyshimmer merged 2 commits into
mainfrom
studio-rewind-dialog-style

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

What changed

The Rewind confirm is simpler and only appears when there is a real choice to make.

  • No dialog for a conversation-only rewind. When the turns after the message changed no files (or the chat keeps no file history, e.g. a temporary chat), Rewind opens the message for editing straight away. If the file check fails, the conversation still rewinds and a toast reports the failed check.
  • Only options that can run are shown. The old dialog showed all three radio rows and greyed out the file ones. Now the dialog renders only when files changed, so every option it lists can run.
  • New layout: "Rewind to this message?", a quote of the prompt (full text, clamped to three lines), a Restore dropdown (Conversation and files / Conversation only / Files only), the file summary and conflict lists, then one short note: "Files include code. Programs, packages and files outside this chat's folder are not changed."
  • Strings: new rewind.confirmTitle and rewind.restoreLabel, rewritten rewind.scopeNote, in all 14 locales. Dropped chooseDescription, checking and noFileChanges, which nothing uses any more.

Verification

  • Isolated Studio from this branch with seeded threads:
    • Rewind on a prompt whose turns changed no files: no dialog, the edit composer opens, one dry-run request.
    • The file dry-run response stubbed to 2 changed files: the dialog shows the title, full prompt quote, Restore dropdown with the three options, summary and note.
  • npm run typecheck, npm run build, npm test (12070 pass). chat-rewind.test.ts covers the untruncated quote text and the dialog rules.

Not exercised here: a real file restore (needs a model running tools, not possible on this CPU host). The restore and undo paths are unchanged.

…cker; skip it when only the conversation can rewind
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T02:20:23.079755Z 2082629 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cbe29bc26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +142 to +148
return request !== null && request.threadKey === threadKey ? (
<RewindFlow
key={request.messageId ?? ""}
initialMessageId={request.messageId}
onClose={closeRewind}
/>
) : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Preserve the dialog while its close animation runs

When Cancel, the close button, or a successful rewind calls closeRewind(), request becomes null and this conditional immediately unmounts the Dialog, so Radix never renders its data-closed transition. This regresses every visible rewind-dialog dismissal and defeats the explicit keep-alive behavior in RewindDialogMount (thread.tsx:8658-8669), which remains mounted specifically so closing animations can finish; keep the dialog root mounted and drive its open state false instead.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exit animation only. The flow unmounts with its request on purpose, so every rewind starts from a fresh read of the branch; no state or action is lost.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 20826292a1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

Frontend build + bundle sanity fails on this PR only, at the locale check:

=== it ===
Missing keys (will fall back to en): 1
  - rewind.filesNotRestored
Errors (1):
  - settings.data.library.filesNotRestored exists in overlay but not in en

it.ts has filesNotRestored under settings.data.library rather than under rewind, where en.ts defines it. Moving that entry into the rewind block should clear both lines.

@shimmyshimmer
shimmyshimmer merged commit 2a2ca69 into main Oct 14, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-rewind-dialog-style branch October 14, 2026 08:21
danielhanchen added a commit that referenced this pull request Oct 14, 2026
…earch contract, zoo 2026.10.5 scan baseline (#13701)

* Studio i18n: move the Italian rewind filesNotRestored string into rewind

#13676 added it under settings.data.library, so the overlay parity check
in Frontend CI fails with an overlay key missing from en.

* Tests: lift arrow-function consts like functions in the node harness resolver

#13687 added const skillsForTools = () => ..., which reads the zustand
Skills switch store. The resolver treated it as an eagerly evaluated const
and dropped it because the store cannot be lifted, so the token count
parity harness failed with ReferenceError: skillsForTools is not defined.
An arrow or function expression reads its references only when called.
The parity harness also gets a stand-in Skills switch store.

* Baseline the unsloth-zoo 2026.10.5 findings after review

Five pinned zoo sites moved digest in 2026.10.5. Four have the same matched
code; speculative.py adds two mx.eval calls (MLX array evaluation). The rest
of each file's 2026.10.4 to 2026.10.5 diff adds no network, exec or
process code.

* Studio i18n: translate skills.turnOff in every overlay

#13687 added the Skills switch's Turn off skills label in en only, so the
strict overlay check in Frontend CI fails with it missing from all 13.

* Tests: follow the keyed + menu in the deep research contract

#13679 builds the chat + menu from a keyed list, so the one-shot gate is now
deepResearch: researchAvailable ? ( ... ) : null.

* Tests: shorten the deep research contract comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants