Repository navigation
feat(logic): rename a page from source with page "New" (was: "Old") - #426
Merged
Merged
Conversation
All renames of a compile resolve against the base's titles before any is written, so one page can take the title another gives up. The lock (v11 `page_renames`, new title -> page UUID) pins each renamed page: a base from before the push gets the new title again, one after it is left alone, and a page renamed to a third title in Loxone Config is refused. - Runs before page creation and placement: blocks stay on their page, new blocks find it under the new title, `room:` keeps working and a created page keeps its UUID through a rename. - Refused: several pages with the old title, a page keeping the new title, two renames from one title, one title renamed from two. - Only Title= is written; LtE= (the GUI's edit timestamp) is left out. - Dropping `was:` releases the pin and rewrites nothing. - D140, language.md, lockfile-spec (v11), agents.md error table.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #426 +/- ##
==========================================
+ Coverage 77.29% 77.31% +0.01%
==========================================
Files 163 163
Lines 53347 53423 +76
==========================================
+ Hits 41235 41304 +69
- Misses 12112 12119 +7
🚀 New features to boost your workflow:
|
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.
What
page "New" (was: "Old")renames an existing drawing page. Until now only Loxone Config could do that.Swaps work. All renames resolve against the base's titles before any is written, so one page can take the title another gives up.
Lock pin (v11
page_renames, new title → page UUID). Each renamed page is pinned by UUID:Without the pin, a swap after the push looks like one before it, and the compile would swap back.
Placement. The rename runs before page creation and placement, so:
room:keeps working, and a created page keeps its UUID through a rename.Refused, not guessed: several pages with the old title, a page that keeps the new title, two renames from one title, and one title renamed from two.
Only
Title=is written. Loxone Config also stampsLtE=on a rename. That is left out, as for created pages, so recompiles stay byte-identical; a page loads without it. Nothing else names a page by title: rooms, categories, rights and the app catalogue use UUIDs.Dropping
was:releases the pin and rewrites nothing. Once the base carries the new title, the page keeps it.A lock without renames is still written as v8.
Docs
language.md(pagesection)lockfile-spec.md: v11 and a new invariantagents.md: error tableTests (
tests/pages.rs)a_page_is_renamed_and_its_blocks_stay: the swap; byte-identical recompiles before and after the push; droppingwas:after the push changes nothing; dropping it before the push is an errora_new_block_goes_on_the_page_under_its_new_titlea_created_page_keeps_its_uuid_when_renamedrenames_that_would_guess_are_refusedwas_parses_and_printslock.rsVerified on a copy of a real project with three renames, one of them a title swap. The diff shows only the three
~ Pagetitle changes, and the output is the same byte for byte against the old base and against its own output.Checks:
cargo fmt --check,cargo clippy -- -D warnings,cargo build --release,cargo test,check_writing.py.