Uh oh!
There was an error while loading. Please reload this page.
LT-22691: Add the transient Show-all writing-system reveal - #1119
Merged
Conversation
The Avalonia detail view's "Show all right now" menu item was inert. It now marks the clicked row's part in a host-held set of template StableIds, and DetailComposer skips the per-field visibleWritingSystems restriction for those parts, so every row sharing the part shows its full writing-system set. The reveal survives focus changes and edits within the record and expires when the shown record changes; a writing-system toggle or the Configure dialog replaces it. It is never written to the view override. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
codecov-commenter
commented
Sep 2, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #1119 +/- ##
=======================================
Coverage 38.55% 38.55% =======================================
Files 1513 1513 Lines 350968 350997 +29 Branches 40345 40350 +5 =======================================
+ Hits 135322 135341 +19 - Misses 186429 186438 +9 - Partials 29217 29218 +1
🚀 New features to boost your workflow:
|
Merged
papeh
approved these changes
Sep 2, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
"Show all right now" on a detail row's Writing Systems menu did nothing. This makes it work: the click reveals every writing system the field can show, for as long as you stay on the record.
The reveal is transient by design — it is view state, not configuration. It survives clicking between fields and editing within the record, and it ends when you navigate to another record or persist a new selection through the writing-system toggles or the Configure dialog. Nothing is written to
.viewoverride.json, so a peek can never silently pin a field's writing systems.One reveal covers the whole part, matching what the legacy view does: revealing Gloss on sense 1 reveals it on every sense.
Why record-scoped expiry
The legacy slice's comments say the reveal ends when the slice loses currency, and its
SetCurrentStatedoes callReloadWssToDisplayForPartto that end — but that method only resets whenWritingSystemsSelectedForDisplayis null, and its getter never returns null. The revert has been dead code for years. Testing the shipped behaviour confirmed it: a reveal survives moving between fields and ends only when the rows are rebuilt. This implementation matches the measured behaviour rather than the comment.Refresh (F5) is a deliberate divergence: the reveal survives it. Legacy rebuilds its slices there, but its F5 handling is itself unreliable in this area (it can leave a block of blank space where a row was), so it is not a parity target. Clearing on every recompose would also kill the reveal whenever an in-record edit completes.
Also in this branch
RefreshAvaloniaDetailnow resolves the record to show through the same root walkShowRecorduses. Without it, ashowDescendantInRoottool (Notebook) recomposed the subrecord instead of the root on every refresh — a pre-existing defect that also made the reveal clear itself the instant it was set.The override write path clears the reveal and recomposes only after the save succeeds.
MutateOverrideAndRefreshis split into aTryMutateOverridethat reports success without recomposing. Previously a failed save ended the reveal invisibly, so the row collapsed at the next unrelated refresh with nothing to explain it.Validation
build.ps1 -CommentHygienegreen; 23/23 targeted tests pass across the three affected fixtures with no skips (4 new tests). Manually tested in Sena 3: reveal, part scope, record-navigation expiry, replacement by a persisted selection, and confirmation that nothing reaches the override file.Found while testing, not fixed here
LT-22777 — writing systems holding data are hidden. The legacy view never hides an alternative that contains data, regardless of the per-field selection or the project-level checkbox (
SkipEmptyWritingSystem), and its option list includes active-but-unticked writing systems. The Avalonia composer has neither rule: it resolves only current writing systems and intersects them with the per-field restriction. Two consequences — restricting a field can hide data, and data in an unticked writing system is unreachable. This also bounds the feature in this PR: on a field with no restriction, "Show all right now" has nothing to add, because the composer never resolved the wider set. Filed separately because the fix is a composer-level change to the writing-system model, not to this command.Move Field is flaky. Move Up/Down works sometimes and not others. A real cause was identified — a row at the top level of its own layout gets a null
ParentStableId, which enablement ignores butApplyMoveFieldbails on, so the item enables and silently does nothing, even though the applier already reorders roots under an empty parent key. A one-line fix and a test were written and then backed out of this branch, because intermittency means that cause is incomplete. To be investigated on its own.Deferred with reasons. The reveal is left in place on the copy-bail paths (unreadable or stale adapter slice): nothing was persisted there, so keeping the view as the user left it is more honest than collapsing the row. A tidy-up of eight stale "gear-menu" comments is left for a separate commit to keep this diff on topic.
Preflight review details
Code Review Summary
Branch: LT-22691g
Base: origin/main (merge-base 8f46a80)
Date: 2026-09-02
Review model: Claude Opus 5
Files changed: 5
Overview
Makes the Avalonia detail view's "Show all right now" writing-system command work.
It was deliberately inert since the c4b menu work (#1108): the menu item existed but
nothing consulted it. The command now marks the clicked row's part in a host-held set
of template StableIds, and the composer skips that part's per-field
visibleWritingSystemsrestriction, so every row sharing the part shows its fullwriting-system set until the shown record changes.
Expiry semantics were chosen against measured legacy behavior rather than the legacy
code comments: the legacy slice's documented "expires when the slice loses currency"
path is dead code (
ReloadWssToDisplayForPartonly resets whenWritingSystemsSelectedForDisplayis null, which its getter never returns), so legacyreveals actually survive until the slices are rebuilt. The reveal is therefore
record-scoped, never persisted.
Contract/API Changes
DetailComposer.Compose(both overloads) gains an optional trailingISet<string> showAllWritingSystemsFieldsparameter; all existing callers aresource-compatible.
MutateOverrideAndRefreshis split, adding a privateTryMutateOverridethat saves without recomposing and reports success.Findings
Critical - Must address before merge
None.
Important - Should address before merge
(fixed during review: keyed the set on the template StableId, which is the same
equivalence class as the legacy part-ref; added a test proving one reveal covers
every sense's Gloss row)
applies to every row sharing the template(fixed during review: same template-id
rekey)
RefreshAvaloniaDetailrecomposedClerk.CurrentObjectwithout theshowDescendantInRootroot walk, so the reveal self-cleared on click in Notebook(fixed during review: added
ResolveShownRecord, shared withShowRecord; thisalso fixes a pre-existing subrecord-recompose defect)
collapsed at the next unrelated refresh(fixed during review:
TryMutateOverridesplit; the reveal is cleared and the view recomposed only after a successful save)
Minor - Consider
bool(fixed during review: the check moved inside
ResolveTextRowWritingSystems)fixture(fixed during review:
InvokeShowAllRightNowandFindLexemeFormRowhelpers)
Lone(author does not accept the all-or-nothing rule; only the new<param>tag on an eight-parameter method breaks the comment standard'sall-or-nothing rule
parameter is documented)
The reveal survives F5 / master refresh where legacy rebuilds slices(author decision: legacy's F5 handling is itself defective here, leaving blank space
where a removed row was, so it is not a parity target; clearing on every recompose
would also kill the reveal when an in-record edit completes)
Reveal state can drift on copy-bail paths (unreadable or stale adapter slice)(nothing was persisted on those paths, so keeping the reveal leaves the view as the
user left it; clearing it would imply a configuration change that did not happen)
Required Validation / Evidence
./build.ps1 -CommentHygiene- green (a-Cleanrun was needed once to regenerateMIDL headers after PR Speed up bulk Find & Replace with a native single-session string replace #1065 added
IVwPattern2; unrelated to this branch)../test.ps1 -CommentHygiene -TestProject xWorksTests -TestFilter "FullyQualifiedName~FieldTypeComposerTests|FullyQualifiedName~DetailObjectCommandExecutionTests|FullyQualifiedName~DetailComposerOverrideTests"record-navigation expiry, persistence replacement, never-persisted.
Positive Observations
the shipped layout is honored the same way as one from the project override.
.viewoverride.json, verified by a test that assertsthe stored override still holds the restriction after a reveal.
Interview Notes
NOT reverted by moving between fields, contradicting both the legacy doc comments and
the initial analysis. Record-navigation expiry was chosen to match measured behavior.
regardless of the per-field selection or the project-level checkbox
(
SkipEmptyWritingSystem). The Avalonia composer has no such rule and resolves onlycurrent writing systems. Filed as LT-22777; out of scope here.
was identified and a one-line fix plus test were written, then backed out at the
author's request because the intermittency proves the cause is incomplete. To be
investigated separately.
and drove the design decisions on expiry and scope.
In-Review Quality Check
All fixes above were made before the commit; build and targeted tests were re-run green
after each. Comment hygiene is clean, and comments comparing behavior to legacy were
removed at the author's request so they do not rot when legacy is retired.
Suggested Review Focus
"the same part" in every layout, not just the lexicon ones tested?
ResolveShownRecordnow runs on every Avalonia refresh, changing behavior forshowDescendantInRoottools (Notebook) that are not yet Avalonia-enabled.other host composes these rows and would need the same wiring.
This change is