Conversation
Promote BuildOverrideCommandInterceptor's HelpId switch into an OverrideCommandRegistry of (command id, item builder) entries. Behavior is identical; an unregistered command still falls through to normal mediator dispatch. A registry, unlike a switch, makes "which commands are handled natively" enumerable data: a later per-menu-group completion check can ask it what it covers and skip building the hidden adapter for a fully covered menu. It also gives the next commit's writing-system items, which carry no command id and must register by matcher, the same shape as id-keyed commands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Writing-system toggles and the Configure dialog dispatch to the hidden adapter slice as before; the resulting selection is then copied into the project view override so the Avalonia detail view recomposes with it. Toggles read the selection property (written before OnClick returns; the slice reacts later) and canonicalize it to the slice's option order. Configure is copied only when the dialog changed the selection, so Cancel writes nothing. The copy is skipped, with a log entry, when the adapter slice is unreadable or is not the clicked row's. Show all right now is deliberately not copied: it is a transient reveal in the slice, and persisting it would pin the full set. In the Avalonia view it currently does nothing visible; the native transient reveal is a planned follow-up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pass each leaf's already-computed display properties through to the interceptor, so retargeted item builders stop re-querying GetDisplayProperties -- a second mediator Display* round trip per intercepted item. Normalize every leaf, default or retargeted, so a disabled item carries no execute action. "Execute != null" now means invokable for every consumer, including programmatic invokers; the writing-system item's local guard is replaced by this invariant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
In the new UI, changing which writing systems a multi-writing-system field shows — unchecking a toggle, re-checking one, or using the Configure dialog — now updates the Avalonia detail view immediately and persists per project. This completes the field-menu family started with Field Visibility and Move Field, and fixes the long-standing bug where unchecking a writing system left the row visible.
Depends on #1097 (the storage layer this writes into); stacked on
LT-22691dand draft until it merges. This PR also delivers two commitments from #1097's review discussion: the ordering canonicalization and the UI write path with auto-refresh.Three commits, in reading order:
HelpIdswitch becomes anOverrideCommandRegistry. Behavior-identical; the commit message carries the rationale (natively-handled commands become enumerable data, which a later per-menu-group completion check can query — a switch cannot).Display*round trip), and every leaf, default or retargeted, carries no execute action when disabled.Where to look:
OnClickreturns; the slice reacts later), Configure reads the slice (updated synchronously by the modal dialog). Reading the slice after a toggle stores the pre-click set — that was the bug. Locked byWritingSystemToggle_TwoVernaculars_StoresTheReducedThenRestoredSet, red under the old code.StringSliceUtils.GetVisibleWritingSystems, so uncheck+recheck never reorders rows and junk tokens never restrict.Deliberately not here:
Verified:
build.ps1 -CommentHygieneclean; 23/23 targeted menu fixtures; 213/213 Detail-fixture sweep after the bridge change. Manual testing is complete — the 9-scenario Sena 3 plan, including the Configure dialog lanes that cannot run headlessly.Reading this a year from now — start here
This is the write path ("4b") for the SetVisibleWritingSystems override operation whose storage layer landed via #1097 ("4a"). The split existed because a native command layer — one possible answer to the #1079 adapter-direction question — would delete this copy code while the storage survives. The working review record lives in this description;
.review/is gitignored by design.Decisions, and why
if). The registry is the deliberate "middle path" from the adapter end-state analysis: natively-handled commands become enumerable data, so a later per-menu-group completion check can ask what is covered and skip building the hidden adapter for a fully covered menu. If the direction ruling ends up plain per-command peeling forever, the cost is one 45-line class.Execute != nulla uniform invariant.Deferred, and what would unblock it
DetailComposer.ApplyVisibleWritingSystemsconsult it — it must be composer-level because the restriction can come from the shipped layout, not just the override. The open design decision is expiry (legacy expires on slice-currency loss; Avalonia analogs are field focus loss or record navigation). Roughly 100–150 lines with tests.VisibleWritingSystems, and the copy gaining a slice-agnostic options source (a small shared interface). Belongs to reversal-slice Avalonia parity; today the copy logs and declines on that slice type.Preflight review details
The branch went through the 8-angle adversarial review (line-by-line, removed-behavior, cross-file tracing, reuse, simplification, efficiency, altitude, conventions): 34 raw candidates deduplicated to 10 findings, each verified against quoted source. All ten are dispositioned; the significant ones and their fixes:
OnDataTreeWritingSystemsShowAllnever persists;SetCurrentState(false)reverts) — excluded from the copy.StringSliceUtils.GetVisibleWritingSystems; exact-order test assertions.MultiStringSliceand log-and-bail otherwise.GetDisplayPropertiesper intercepted item; disabled leaves carrying execute) — the leaf-contract commit.Validation:
build.ps1 -CommentHygieneclean at every step; 23/23 targeted menu fixtures; 213/213 Detail sweep after the bridge change. The author reviewed every change line-by-line, approving names individually ("copy"/"stored" vocabulary,WritingSystemItem,CopyWritingSystemSelectionToOverride). Manual testing: the 9-scenario Sena 3 plan has been executed by the author — it is the only coverage for the Configure dialog lanes, which cannot run headlessly (modal).🤖 Generated with Claude Code
This change is