fix(code): cmd-z after refocus should not clear subblock#2503
Merged
icecrasher321 merged 1 commit intostagingfrom Dec 21, 2025
Merged
fix(code): cmd-z after refocus should not clear subblock#2503icecrasher321 merged 1 commit intostagingfrom
icecrasher321 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryPrevented Cmd-Z after refocus from clearing the code subblock by tracking whether edits have been made since focus.
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CodeEditor
participant hasEditedSinceFocusRef
participant StoreValue
User->>CodeEditor: Focus on code editor
CodeEditor->>hasEditedSinceFocusRef: Set to false
alt User edits code (onChange, tag select, env var select, or drop)
User->>CodeEditor: Make edit (type, select tag, etc)
CodeEditor->>hasEditedSinceFocusRef: Set to true
CodeEditor->>StoreValue: Update store with new value
end
alt User presses Cmd+Z/Ctrl+Z
User->>CodeEditor: Press Cmd+Z or Ctrl+Z
CodeEditor->>hasEditedSinceFocusRef: Check value
alt hasEditedSinceFocusRef is false
CodeEditor->>CodeEditor: Prevent default (block undo)
Note over CodeEditor: Prevents clearing subblock<br/>after refocus without edits
else hasEditedSinceFocusRef is true
CodeEditor->>CodeEditor: Allow undo operation
Note over CodeEditor: Normal undo behavior<br/>for user edits
end
end
|
Contributor
Greptile's behavior is changing!From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
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
Cmd-z after refocus should not clear subblock. Should be consistent with text input subblocks.
Type of Change
Testing
Tested manually
Checklist