Repository navigation
fix(native): persist covered-window edits and save before Quit - #29
Draft
gustavonline wants to merge 2 commits into
Draft
gustavonline wants to merge 2 commits into
gustavonline wants to merge 2 commits into
Conversation
Selectively port michaelshimeles/sketch commit 6689318. Retain autosave_due_ui, Theme draft semantics, save handling and this fork's UI. Add a timed no-frame save/reopen regression. No rename, updater, signing or analytics changes.
Menu Quit previously trusted the autosave debounce, and window Close ignored save failure. Use one prepare_exit boundary for both. Extend the real Session save/reopen regression to cover an immediate Quit before the next timer. This is an additional native fix, not part of the upstream6689318 port.
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.
Native edits can arrive while a window is covered and no frame is rendered. The old timer path only checked an existing deadline, so it could miss starting autosave. Menu Quit also trusted that debounce instead of flushing a project immediately, and window Close ignored save failure.
Poll autosave on every event-loop turn, preserving this fork's
Session::autosave_due_uiguard and Theme draft/undo semantics. Use a shared exit boundary so Quit and Close flush projects and keep the app open when saving fails. The event-loop portion selectively ports upstream66893186714a0bb5f16f1e5b9d93e69b5b37a86d; the exit fix is separate native work. No upstream rename, updater, signing or analytics code is imported.Validation: a timed test uses the real App/Session, adds an edit without rendering a frame, verifies the debounce boundary, saves/reopens the project, then checks immediate-exit persistence before the next timer. Passed locally. The prior event-loop revision passed native/wasm CI. The integrated desktop candidate also persisted an actual MCP edit with its native window minimized. Exact final-head CI remains separate.
Draft against Factory's active branch for bounded adoption. This does not accept or close PR #9's wider requirements.