fix(ui): save note drafts without stale input races - #1050
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Sep 8, 2026
Contributor
Greptile SummaryThis PR hardens note composition against delayed textarea events and fast-save races by associating updates with draft identities and synchronously flushing the focused editor before saving.
Confidence Score: 5/5The PR appears safe to merge; draft identity checks and synchronous store updates address the stale-input race without an established regression. The semantic store applies editor-body updates synchronously before saving, stale callbacks are rejected using unique draft identities, and the changed behavior is covered at composer, review-controller, and PTY levels. Important Files Changed
Sequence DiagramsequenceDiagram
participant E as Draft editor
participant C as Note composer
participant R as Review store
participant P as Event publisher
E->>C: Save(current editor body)
C->>R: Update body(expected draft ID)
alt Draft ID matches
R-->>C: Accepted
C->>R: Consume and save draft
R-->>C: Saved note
C->>P: Publish committed note
else Callback belongs to stale draft
R-->>C: Rejected
C-->>E: Abort save
end
Reviews (1): Last reviewed commit: "test(ui): reject stale draft saves" | Re-trigger Greptile |
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
Stack
mainValidation
bun run format:checkbun run lintbun run typecheckbun run deps:checkbun run changeset:statusbun run test(2,100 passed)bun run test:integration(163 passed, 1 platform skip)bun run test:tty-smoke(10 passed)bun run build:npm && bun run check:pack