Skip to content

fix(gpui): settle screenshot edits before undo and redo - #3489

Draft
himanshu748 wants to merge 1 commit into
CapSoftware:mainfrom
himanshu748:fix/gpui-screenshot-history-interruption
Draft

himanshu748 wants to merge 1 commit into
CapSoftware:mainfrom
himanshu748:fix/gpui-screenshot-history-interruption

Conversation

@himanshu748

@himanshu748 himanshu748 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Undo can ignore the first unfinished slider edit or undo an older change while an annotation is still being dragged. Redo can discard a new edit, and a later mouse release can apply a stale gesture to the restored project.

Finish the active screenshot edit before navigating history. This covers style and annotation sliders, annotation creation/move/resize, and layer reorder. No-op edits preserve the redo branch; creating text through this boundary avoids focusing an editor for an annotation that Undo immediately removes.

Validation: an isolated harness using extracted production methods and real project/history types passes 12 regressions; the same assertions on current main produce 11 failures and one passing control. Nine Linux GPUI keyboard-dispatch regressions were added for native CI, including final save/render snapshots, text focus, pause balance and late releases. Native tests remain unrun locally because the environment lacks ALSA development metadata. The isolated harness stubs GPUI and asynchronous side effects. Workspace/scoped formatting and diff checks pass; cargo check -p cap-desktop-gpui --locked --offline exits 101 because alsa-sys cannot find alsa.pc, and the change applies alongside #3342's geometry fix in scratch validation.

Run the new native tests after the normal desktop dependency setup:

cargo test --manifest-path apps/desktop-gpui/Cargo.toml -p cap-desktop-gpui --bin cap-gpui history_interruption

The scratch compatibility check with #3342 is a clean patch application plus Rust parsing/format validation, not a combined native runtime or pixel test. Native CI subsequently passed on this exact head (b4484a93d9df5830c13ab9d720d9b65ba338b106), tested as merge 29f0e1625d64377f259743be934383b3949ba4bc into base 0a35a8840a4924cd6bbbd5e82900018221e158cf. All nine new keyboard-dispatch regressions passed in Linux GPUI CI, with 1,608 app tests passed and zero failures. The app suites also passed on Windows (1,478), Apple Silicon (1,521) and Intel macOS (1,516). The nine interaction tests are Linux-only. Manual GUI interaction and rendered export pixel comparisons remain unperformed.

@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@himanshu748 is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant