Repository navigation
Save, before anything can edit - #11
Merged
Merged
Conversation
The three applications can now write a document back, and nothing in them can change one yet. That order is deliberate: the save path is verified with no editing in the product, on the one test that already existed, that a document nobody changed comes back as an equal tree. `Document::write_verified` serializes the document, reads the bytes back and compares the content and styles trees with the ones they were written from; a difference is `Error::Unfaithful` and nothing reaches the disk. The corpus test covers every document of every format. The shell owns the write as it owns the read. Save and Save as…, with Ctrl+S and Ctrl+Shift+S, put the bytes into a `.part` file beside the target and rename it over, carrying the target's permissions; macOS writes in place, because the sandbox grant covers the file and not its directory, and the `NSItemReplacementDirectory` arm is that platform's session's. Close, Open, Reload, Quit and the window's own close button ask Save, Discard or Cancel before a modified document is thrown away. `Editing` is the state a view is handed on every frame: whether edit mode is on, and an undo of bounded snapshots of the content tree, with a modified flag that goes false again when undo reaches the state the file holds and stays true when a new edit branches below a save. Edit mode is Ctrl+E or the Edit menu; a window opens reading unless the one preference the suite keeps says otherwise, in `odox/settings.toml` under the platform's configuration directory, written only when that checkbox changes. `Viewer` becomes `View`, with `document_mut` for the save and `reindex` for the spreadsheet after an undo. DESIGN.md §11 states the rules; the fourteen new messages carry the fleet's German. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 21, 2026
Merged
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.
The first slice of 0.4.0, the editing release. Nothing in the three applications can change a document yet, and all three can now write one back: the save path is proven on the test that already existed, that a document nobody changed comes back as an equal tree.
Document::write_verifiedserializes, reads the bytes back and compares the content and styles trees with the ones they were written from. A difference refuses the save withError::Unfaithfuland nothing reaches the disk; the corpus test covers every document of every format. The shell writes through a.partfile beside the target and renames it over, carrying the permissions; macOS writes in place because the sandbox grant covers the file and not its directory, and that platform'sNSItemReplacementDirectoryarm waits for a session at the machine.Save and Save as… are on the File menu with Ctrl+S and Ctrl+Shift+S. Close, Open, Reload, Quit and the window's close button ask Save, Discard or Cancel before a modified document is thrown away. The Edit menu has Undo and Redo over a bounded stack of tree snapshots, the Edit mode toggle (Ctrl+E), and the one preference the suite keeps, opening documents in edit mode, in
odox/settings.tomlunder the platform's configuration directory and written only when the checkbox changes.ViewerbecomesView, DESIGN.md gains §11, and the new messages carry the fleet's German.Checked: clippy with
-D warnings, fmt, the catalogue check, the full test suite, and the window on X11 for edit mode, both menus and the preference file. Save as… could not be driven from a script because the portal's dialog is a Wayland window; the write behind it is the testedwrite_verifiedand the tested file replacement, and the dialog is the samerfdportal call as Open. One manual Save as… before merging is the check that remains.🤖 Generated with Claude Code