Skip to content

LT-22802: Show Exception "Features" in the Avalonia detail view - #1210

Open
thejambi wants to merge 1 commit into
mainfrom
LT-22802-exception-features-avalonia
Open

thejambi wants to merge 1 commit into
mainfrom
LT-22802-exception-features-avalonia

Conversation

@thejambi

@thejambi thejambi commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Start here: Src/Common/FwAvalonia/LexiconFeatureCatalog.cs. The one new entry there turns the tool on; the other four files are its two strings and two test rows.

Grammar > Exception "Features" (ProdRestrictEdit) now opens in the Avalonia detail view when New UI is on. Until now it wasn't in the catalog, so it fell back to the WinForms DataTree even in New UI.

Why this is LT-22802. #1146 made DetailComposer.Walk apply a tool's filter list. But no tool that opened in Avalonia had a filter list naming a real slice, so the ticket's acceptance steps ran in WinForms, and step 9 compared WinForms with itself. With this change those steps exercise the Avalonia view.

Is it safe to turn a tool on with no new view code? Here, yes. basicPlusFilter.xml withholds Status, Discussion, Confidence, Researchers and Restrictions. That leaves Name, Abbreviation and Description, the same multi-string rows Categories (posEdit) already shows in Avalonia. The Subitems row is hidden because the production-restrictions list has only one level (Depth 1 in the new-project template).

Where to look

  • The tool resolves to Avalonia: pinned by RegisteredRecordEditTools_ResolveToAvalonia_WhenUIModeIsNew("ProdRestrictEdit") and BaseDetailEditorTools_StayActive("ProdRestrictEdit").
  • The filter reaches the composer through the view: AToolsFilterList_ReachesTheComposer_ThroughTheView, added in LT-22802: Apply a tool's slice filter list in the Avalonia detail view #1146.
  • Off by default: the tool opens in Avalonia only when New UI is on, and a user can still opt it out per tool.

Not here

  • Other tools that could be turned on the same way. Dialect Labels and Feature Types look ready. 23 Lists-area tools first need one fix: Discussion is read-only until the item already has one. That is separate work.
  • No screenshot. The checks below were run by hand in FLEx.

Verification

  1. build.ps1 -CommentHygiene -TokenHygiene: clean.
  2. Targeted tests: 150 xWorks and 65 FwAvalonia, all pass. The full suite was not run.
  3. Manual, in FLEx with New UI on: the five filtered rows are absent, and still absent with Show Hidden Fields on. The WinForms view shows the same rows. Insert > Exception Feature selects the new item and its Name field takes typing.
  4. Not verified: the Exception "Features" field in Lexicon Edit and its jump link (the ticket's steps 3–7), row right-click menus, and deleting an item.

Next: review, then a tester runs LT-22802's acceptance steps, which now exercise Avalonia.


Reading this a year from now -- start here

This PR adds a tool to the list of tools that open in the Avalonia detail view. A tool opens in Avalonia only when two things are true: every row its layout uses composes in Avalonia, and the tool is in LexiconFeatureCatalog.Features. The registry builds its supported tools from that list. Exception "Features" already met the first condition, so this PR changes only the list. Nothing was deleted from the tree, because the branch never added working documents.

Decisions, and why
  • Shipped under LT-22802, not as a slice conversion. /convert-slice converts one slice type, and every row this tool shows already composes. LT-22802's acceptance test needed a tool that opens in Avalonia and has a real filter list. This was the smallest change that gives it one.
  • Name and description strings were added even though no UI shows them yet. Every other catalog entry carries a pair, and AllStrings_ResolveFromLocalizationAccessor checks that they resolve.
  • No new Options row. The Options dialog stores the per-tool opt-out (UIModeDisabledTools) as a string and does not list catalog entries.
Evidence
  • Rows, read from the code: the CmPossibility default detail layout is NameAllA, AbbreviationAllA, DescriptionAllA, Status, Discussion, Confidence, Researchers, Restrictions, and SubPossibilities (nested). The filter removes the middle five. SubPossibilities is wrapped in a <choice> that hides it when the owning list's Depth is less than 2. NewLangProj.fwdata gives the ProdRestrict list Depth 1.
  • Show Hidden Fields cannot bring the filtered rows back. Both SliceFilter.IncludeSlice (WinForms) and DetailComposer.Walk (Avalonia) drop filtered rows before the visibility check.
  • Those five rows have no visibility="ifdata". Without the filter they would appear even on a new, empty item, so their absence shows the filter is working.
Preflight review details

Code Review Summary

Branch: LT-22802-exception-features-avalonia
Base: origin/main (380cc90)
Date: 2026-10-27
Review model: Claude Opus 5.5 (Claude Code)
Files changed: 5 (1 commit, 14 insertions)

Overview

The author's purpose: put Grammar > Exception "Features" (ProdRestrictEdit) on
the list of tools that open in the Avalonia detail view. LT-22802's code
(#1146) applies a tool's filter list in DetailComposer.Walk. But no tool that
opened in Avalonia had a filter list naming a real slice, so the ticket's
acceptance steps ran in the WinForms DataTree and step 9 compared WinForms with
itself.

The change is one LexiconFeatureCatalog entry, two localized strings, and a
test row in each of the two places that list active tools. The tool's detail
rows (Name, Abbreviation, Description, and Subitems when the list has more than
one level) already composed in Avalonia. basicPlusFilter.xml withholds Status,
Discussion, Confidence, Researchers and Restrictions, so no new view code is
needed.

Contract/API Changes

Additive only:

  • LexiconFeatureCatalog.Features and ToolNames gain ProdRestrictEdit.
    UIFrameworkRegistry.DefaultSupportedTools is built from this list.
  • FwAvaloniaStrings.FeatureProdRestrictEditName and
    FeatureProdRestrictEditDescription, with matching .resx keys.

The behaviour change is gated: the tool opens in Avalonia only when UIMode=New,
which is off by default. A user can still opt the tool out through
UIModeDisabledTools. The Options dialog does not list catalog entries, so
there is no new Options row.

Findings

Critical - Must address before merge

None.

Important - Should address before merge

None.

Minor - Consider

None.

Required Validation / Evidence

  • ./build.ps1 -CommentHygiene -TokenHygiene: clean on the rebased base
    (380cc907f).
  • ./test.ps1 -TestProject xWorksTests (switch, filter, composer, window
    configuration integrity, seeding): 150 passed, including
    RegisteredRecordEditTools_ResolveToAvalonia_WhenUIModeIsNew("ProdRestrictEdit")
    and AToolsFilterList_ReachesTheComposer_ThroughTheView.
  • ./test.ps1 -TestProject FwAvaloniaTests (UIFramework, FeatureCatalog,
    Localization): 65 passed, including
    BaseDetailEditorTools_StayActive("ProdRestrictEdit").
  • gitlint on origin/main..HEAD: clean.
  • Manual in FLEx with New UI on (author confirmed):
    • the detail view shows Name, Abbreviation and Description only;
    • Show Hidden Fields on still withholds the five filtered rows;
    • the WinForms view shows the same rows;
    • Insert > Exception Feature selects the new item and its Name field takes
      typing.
  • Not verified manually:
    • the Exception "Features" field in Lexicon Edit > Category Info, and the
      "Edit the Exception Features" jump link (Jason's steps 3–7);
    • row right-click menus and deleting an item in the Avalonia pane.
  • Full test suite not run; targeted runs only.

Positive Observations

  • Minimal scope. It follows the existing catalog pattern exactly
    (posEdit / notebookEdit), with no new view code.
  • Both test sites that enumerate active tools were updated, as their comments
    ask.
  • The empty-Discussion gap found in the wider survey does not apply here,
    because the filter withholds Discussion.
  • The production-restrictions list is flat (Depth 1 in
    NewLangProj.fwdata). The Subitems row is therefore hidden, which matches
    LT-22802's updated expected rows.

Interview Notes

  • The author ran the three LT-22802 filter checks and Insert > Exception
    Feature in FLEx. All passed.
  • The Lexicon Edit field, the jump link, and the right-click menus and delete
    were not exercised. They are recorded above as unverified.
  • Nothing else to flag.

Suggested Review Focus

  • Agree that LT-22802 is the right ticket for this change, rather than a
    separate turn-on ticket.
  • A reviewer or tester runs LT-22802's acceptance steps, now in Avalonia,
    including steps 3–7.

🤖 Generated with Claude Code


This change is Reviewable

Grammar > Exception "Features" (ProdRestrictEdit) was not on the list
of tools that open in the Avalonia detail view, so with New UI on it
fell back to the WinForms DataTree. The tool filter list that #1146
taught the composer to apply never reached a live tool.

Add the tool to LexiconFeatureCatalog. Its rows (Name, Abbreviation,
Description and Subitems) already compose, and basicPlusFilter.xml
withholds Status, Discussion, Confidence, Researchers and Restrictions,
so the view matches the WinForms one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   14m 9s ⏱️ + 5m 11s
6 864 tests +2  6 779 ✅ +2  85 💤 ±0  0 ❌ ±0 
6 873 runs  +2  6 788 ✅ +2  85 💤 ±0  0 ❌ ±0 

Results for commit 568a3df. ± Comparison against base commit 380cc90.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.00%. Comparing base (380cc90) to head (568a3df).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1210   +/-   ##
=======================================
  Coverage   40.00%   40.00%           
=======================================
  Files        1544     1544           
  Lines      355308   355313    +5     
  Branches    41357    41357           
=======================================
+ Hits       142142   142153   +11     
+ Misses     183833   183826    -7     
- Partials    29333    29334    +1     
Files with missing lines Coverage Δ
Src/Common/FwAvalonia/FwAvaloniaStrings.cs 98.75% <100.00%> (+0.03%) ⬆️
Src/Common/FwAvalonia/LexiconFeatureCatalog.cs 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thejambi
thejambi marked this pull request as ready for review October 27, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants