Skip to content

feat(logic): rename a page from source with page "New" (was: "Old") - #426

Merged
discostu105 merged 1 commit into
mainfrom
feat/page-rename
Dec 6, 2026
Merged

discostu105 merged 1 commit into
mainfrom
feat/page-rename

Conversation

@discostu105

Copy link
Copy Markdown
Owner

What

page "New" (was: "Old") renames an existing drawing page. Until now only Loxone Config could do that.

page "EG Büro" (was: "EG Küche")
page "EG Küche" (was: "EG Küche Neu")
  • 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:

    • a base from before the push gets the new title again;
    • a base after the push is left alone;
    • a page renamed in Loxone Config to a third title is refused.

    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:

    • 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, 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 stamps LtE= 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

  • D140 (new decision); D28 now lists it as an amendment
  • language.md (page section)
  • lockfile-spec.md: v11 and a new invariant
  • agents.md: error table

Tests (tests/pages.rs)

  • a_page_is_renamed_and_its_blocks_stay: the swap; byte-identical recompiles before and after the push; dropping was: after the push changes nothing; dropping it before the push is an error
  • a_new_block_goes_on_the_page_under_its_new_title
  • a_created_page_keeps_its_uuid_when_renamed
  • renames_that_would_guess_are_refused
  • was_parses_and_prints
  • v11 written-version check in lock.rs

Verified on a copy of a real project with three renames, one of them a title swap. The diff shows only the three ~ Page title 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.

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.
@discostu105 discostu105 added the release:minor Auto-release: bump the minor version label Dec 6, 2026
@codecov

codecov Bot commented Dec 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.40230% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.31%. Comparing base (5ee8797) to head (59c0627).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/loxone-config/src/logic/compile.rs 93.75% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
crates/loxone-config/src/cli.rs 56.79% <ø> (ø)
crates/loxone-config/src/lock.rs 93.22% <100.00%> (+0.23%) ⬆️
crates/loxone-config/src/logic/ast.rs 93.22% <100.00%> (+0.01%) ⬆️
crates/loxone-config/src/logic/decompile.rs 96.47% <100.00%> (+<0.01%) ⬆️
crates/loxone-config/src/logic/parser.rs 87.67% <100.00%> (-0.11%) ⬇️
crates/loxone-config/src/logic/compile.rs 93.12% <93.75%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@discostu105
discostu105 merged commit b3656aa into main Dec 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:minor Auto-release: bump the minor version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant