Skip to content

Propagate part-ref caller through NodeChildrenDisplayCommand#1009

Closed
johnml1135 wants to merge 3 commits into
mainfrom
fix/xmlvc-part-caller-propagation
Closed

Propagate part-ref caller through NodeChildrenDisplayCommand#1009
johnml1135 wants to merge 3 commits into
mainfrom
fix/xmlvc-part-caller-propagation

Conversation

@johnml1135

@johnml1135 johnml1135 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Extracted from a rebase hunk found on the Avalonia migration branch (#964) — pulled out because it changes shared, legacy-reachable rendering behavior and shouldn't ride along in that PR. Opening this as a draft for team discussion, not as a confident fix.

XmlViewsUtils.GetDisplayCommandForColumn1's "part" case builds a NodeChildrenDisplayCommand(part) and always passes a null caller into ProcessChildren. XmlVc's own "part" handling passes a non-null caller in the equivalent situation. This change makes the two agree by carrying the part-ref node down as the caller.

There's a pre-existing // Review JohnT: comment sitting right on this code in XmlViewsUtils.cs (removed by this diff) that names exactly this gap and says it couldn't be confirmed to matter:

In XmlVc, "part" is the one thing that calls ProcessChildren with non-null caller. this should make some difference here, but I can't figure what yet, or come up with a test that fails.

Uncertainty — please weigh in

  • Is this actually needed on main today? The rebase hunk's comment referenced "the 'Grammatical Info.' blank column bug in the Avalonia browse table" with an unfilled LT- ticket reference — I don't have a real ticket number and haven't reproduced a blank-column bug on main myself. I can't confirm this fixes a live bug vs. a bug that only manifests once the Avalonia browse-column path exists.
  • No test added. The original JohnT comment says he couldn't construct a failing test either. If we land this, it should come with a regression test for whatever blank-column scenario motivated it — otherwise we're changing shared rendering code on faith.
  • Verified: builds clean (XMLViews.csproj, 0 errors/warnings) and no other call site depends on the old single-arg-only shape.

Test plan

  • Confirm/attach the real ticket (or a repro) for the blank-column symptom this addresses
  • Add a regression test for a "part"-based browse column that reads a caller-relative attribute (e.g. ws)
  • Manual smoke test of existing "part"-based browse columns to confirm no visual/behavioral change for the common case

🤖 Generated with Claude Code


This change is Reviewable

NodeChildrenDisplayCommand always passed a null caller to
ProcessChildren, even when it originated from a "part" node in
XmlViewsUtils.GetDisplayCommandForColumn1. Child fragments that
resolve attributes (e.g. "ws" for multilingual strings) from the
caller got nothing and rendered blank, matching XmlVc's own "part"
handling which does pass a non-null caller through ProcessChildren.
Carry the part-ref node down as the caller so both paths agree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   10m 42s ⏱️ + 3m 52s
4 303 tests +1  4 230 ✅ +1  73 💤 ±0  0 ❌ ±0 
4 312 runs  +1  4 239 ✅ +1  73 💤 ±0  0 ❌ ±0 

Results for commit f4b3f76. ± Comparison against base commit f505729.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.15385% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.98%. Comparing base (f505729) to head (f4b3f76).

Files with missing lines Patch % Lines
Src/Common/Controls/XMLViews/XmlVc.cs 41.66% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1009   +/-   ##
=======================================
  Coverage   32.97%   32.98%           
=======================================
  Files        1202     1202           
  Lines      278291   278299    +8     
  Branches    37166    37168    +2     
=======================================
+ Hits        91776    91786   +10     
+ Misses     158649   158647    -2     
  Partials    27866    27866           
Files with missing lines Coverage Δ
Src/Common/Controls/XMLViews/XmlViewsUtils.cs 41.44% <100.00%> (+0.58%) ⬆️
Src/Common/Controls/XMLViews/XmlVc.cs 27.99% <41.66%> (+0.08%) ⬆️

... and 1 file 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.

johnml1135 and others added 2 commits July 14, 2026 12:37
Addresses the "no test added" gap noted in the PR description: pins
that a <part ref="..."/> column-spec node carries itself down as the
resulting NodeChildrenDisplayCommand's Caller, so child fragments
that read attributes (e.g. "ws") from the caller resolve correctly
instead of rendering blank.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@johnml1135 johnml1135 closed this Jul 14, 2026
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