Use project .fwlayout files for Avalonia persistence - #1111
Conversation
Record the one-store architecture, JSON retirement scope, and test-first landing sequence for Avalonia and WinForms layout parity.
Exercise project layouts through nested objects, fallback, and refresh paths. Remove the counter; snapshot construction occurs upstream of the composer. Compiled-model identity now verifies fingerprint reuse directly.
NUnit Tests 1 files ± 0 1 suites ±0 10m 48s ⏱️ -4s Results for commit eefbcb3. ± Comparison against base commit b8f5463. This pull request removes 81 and adds 38 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1111 +/- ##
==========================================
+ Coverage 38.35% 38.42% +0.06%
==========================================
Files 1507 1500 -7
Lines 350617 350058 -559
Branches 40298 40188 -110
==========================================
+ Hits 134471 134499 +28
+ Misses 186916 186450 -466
+ Partials 29230 29109 -121
🚀 New features to boost your workflow:
|
|
What is the reason PR's 1097 and 1108 could not have gone in before this PR? Would it have significantly changed this PR if those were in first? Please explain why the expectation is that those PR's rebase on this PR. |
mark-sil
left a comment
There was a problem hiding this comment.
What is the reason PR's 1097 and 1108 could not have gone in before this PR? Would it have significantly changed this PR if those were in first? Please explain why the expectation is that those PR's rebase on this PR.
@mark-sil made 1 comment.
Reviewable status: 0 of 36 files reviewed, all discussions resolved.
Why
WinForms persists project layout customization in
ConfigurationSettings/*.fwlayout. Avalonia had introduced a separate.viewoverride.jsonstore for the same settings. Keeping both would allow thetwo interfaces to disagree and would require migration and synchronization
code indefinitely.
This PR makes
.fwlayoutthe single persistent store for both interfaces andretires the unreleased JSON override subsystem.
Architecture
Inventoryremains authoritative for loading, merging, and persistingproject layout XML.
snapshot. FwAvalonia does not depend on XCore or retain mutable inventory
nodes.
layout, parts, class, type, and base-class map. Identical content reuses a
compiled model; changed content produces a new model. A snapshot-construction
counter was intentionally not retained because an arbitrary source resolver
does not expose construction provenance.
class, layout, and canonical caller path. Ambiguous or missing matches fail
closed. Successful commands use the existing xWorks writer and then recompose
Avalonia from
Inventory.This is an identity/provenance adapter at an existing seam, not a general
mapping or translation engine.
What changed
Inventorylayoutslayouts, and content-based cache refresh
persistence handlers
path, and their dedicated tests
No customer-data migration is needed: the retired JSON persistence path has not
shipped in a FieldWorks release. Existing files created by development builds
are inert and are not deleted.
Validation
.\build.ps1 -CommentHygiene: passed, 0 warnings and 0 errorspassed on the implementation tree
The local full-suite run also reproduced this machine's existing RootSite pixel
baseline drift and native
TestViewsshutdown hang; GitHub's clean run is theauthoritative cross-machine result. Interactive WinForms/Avalonia exercise was
not available in the agent environment; automated parity tests cover writes,
disk reload, reconstruction, visibility, and field ordering in both directions.
Follow-up order
Rebase #1097 and #1108 onto this change. Keep their writing-system behavior,
but remove their JSON store, JSON writers, and migration assumptions. They
should persist through the shared
.fwlayoutpath introduced here.This change is