Repository navigation
feat(flare): autosave due time and recovery data - #759
Merged
Merged
Conversation
Contributor
|
Fast lane: merged into dev (114 lines, 3 files, Fast-Check marker). |
Closed
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 14, 2026
## What and why The last PR of the mac-platform feature (#793, resumes #754). It records that the packet is built and carries `feature-done`, so the lane dispatches the full CI run on `dev` that judges the feature. - `docs/blueprints/flare/features/mac-platform.md`: a **Status** line naming the merged task PRs (MP-1 #757, MP-2 #759, MP-3 #760, MP-4 #756, MP-5 #761, MP-6 #762), the round-1 test fix #764, and the feature issue #793. Nothing is wired into the window yet; F17a #205 and F17c #393 add the menu and the restore alert. - `docs/blueprints/flare/features/waves.md`: the wave-1 row's feature issue is now #793 (built). No CI run has judged the feature since 4594082. #801 fixed FlareModel's build against creative-core main, which had broken every Linux build of `dev`. ## Proof Docs only. `scripts/ci`: CI: PASS (1414 tests) on this head, rebased on 11e3e0c (#801). Snapshot PNGs changed: none. Refs #793 Belt-Lead: act-1a13c789856-0qa9 Feature: mac-platform Fast-Check: pass Head: e3c132f
This was referenced Oct 14, 2026
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.
MP-2 of the mac-platform feature (docs/blueprints/flare/features/mac-platform.md). MP-1 (#757) shipped the Open Recent half of #739; this is the rest.
Closes #739
What changed
Sources/FlareModel/FlareFiles.swift(extension onFlareWorkspace;FlareWorkspace.swiftnot edited):public static let autosaveDelay: Double = 30autosaveDue(lastEdit:now:): false unless the document is dirty and both times are present and finite; true oncenow - lastEdit >= autosaveDelay.recoveryData(): nil when clean or with no document; otherwise the document encoded withFlareFormat.encode, the same encoder the save path uses (try?).docs/c4/model.json: theflare-model-sourcesdescription gains one clause about the autosave due time and the recovery bytes.Why
The autosave writer (MP-5) and launch recovery (MP-6) need a Linux-tested rule for when a recovery write is due and what bytes it writes. Putting it in the Model keeps the app's timer code small.
Proof
Tests/FlareModelTests/FlareAutosaveDueTests.swift(Swift Testing): an edit at 0 is not due at 29.9 and is due at 30.0; a clean document is never due; no last edit is not due; afterdidSaveit is not due; undo back to the saved document is not due; NaN and infinite times are not due;recoveryData()decodes throughFlareWorkspace.decodeFiletodocument, and is nil when clean or with no document.No view code changed, so no snapshot PNGs changed.
Docs check: I confirmed
Double.isFinitewith the apple-docs MCP (searchAppleDocumentation).Datacomes through the Linux-safe Foundation import the file already has.Belt-Lead: act-1a13b14336c-tqna
Feature: mac-platform
Fast-Check: pass
Head: ade071c