Skip to content

Group B: the MeshNode surface renderers fold into MeshWeaver.Blazor.Graph - #2082

Merged
rbuergi merged 2 commits into
mainfrom
refactor/meshnode-views-to-graph
Aug 22, 2026
Merged

rbuergi merged 2 commits into
mainfrom
refactor/meshnode-views-to-graph

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What

PR 2 of the entity-view extraction chain (#2080 → #2081 → this). 12 files (~2.3k lines + 4 scoped-CSS bundles) move from src/MeshWeaver.Blazor/Components into src/MeshWeaver.Blazor.Graph: MeshNodeThumbnailView, MeshNodeCardView, MeshNodeErrorCardView, MeshNodeCollectionView, MeshNodeContentEditorView, MeshNodeRoleEditorView. (MeshNodePickerView already moved in #2081 — its FormComponentBase base forced the pull-forward.)

This FIXES an inconsistency rather than creating a seam

BlazorGraphExtensions.AddGraphViews already registered four of these views from the wrong assembly (via using MeshWeaver.Blazor.Components), and MeshNodeCardControl was double-registered — once in the pack, once in the base registry's switch (BlazorViewRegistry.cs:153). After the move there is ONE registration, in Blazor.Graph; the base arms for MeshNodeCollectionControl and MeshNodeCardControl are removed. MeshSearchControl stays — MeshSearchView remains a base surface. AddGraphViews also gains the previously base-only MeshNodeCollectionControl registration.

The MeshSearchView seam

MeshSearchView (staying in base) rendered <MeshNodeCardView …/> at four sites (lines 362/368/373/794) — compile-time component references the base pack can no longer make without inverting the reference direction. All four now render <DispatchView ViewModel="@cardControl" …/>: the search page renders whatever view the mesh's registered pack maps to MeshNodeCardControl.

Pinned by MeshNodeCardControl_ResolvesThroughThePortalRegistry on the real portal composition (the mesh's AddBlazor() + AddGraphViews() — the same ILayoutClient instance DispatchView consults, verified identical through PortalApplication.Hub during development). The card markup stays pinned by the two existing RenderAsync<MeshNodeCardView> tests. The resolution is asserted at the registry rather than through a static DispatchView render because the one-shot HtmlRenderer cannot drive DispatchView's post-parameter re-render — a harness artifact, not a seam. Non-vacuous: without AddGraphViews on that mesh, no map claims the control and the fallback slot answers with HtmlView, failing the type assertion.

The rest

  • Graph's _Imports gains the base-component/Layout/Data/Messaging usings the views relied on from the base pack's _Imports chain; MeshNodeErrorCardView (a parameter-driven component with no registry entry and no external markup users) moves cleanly.
  • Both parity ratchets (web clients/react + RN clients/react-native): MeshNodeCard + MeshNodeCollection move to EXTERNALLY_PACKED_CONTROLS (the >30 scrape guard still clears at 32) — coverage moved, not deleted.
  • ViewPackRegistrationGateTest: the Graph rows now name the views in their new home and gain the MeshNodeCollection row (23 gate cases total).

Verification

  • Release builds green (warnings-as-errors): Blazor, Blazor.Graph, Memex.Portal.Shared(+Test), Hosting.Blazor.Test, Layout.Test, Graph.Test.
  • Suites executed: Hosting.Blazor.Test 444/444, Layout.Test 474/474, Graph.Test 1519/1519, web parity 9/9, RN parity 10/10.

PR 3 (the module-lane flip for EntityViews) follows once this merges.

🤖 Generated with Claude Code

rbuergi and others added 2 commits August 22, 2026 21:19
…raph

The second half of the entity-view extraction: 12 files (~2.3k lines + 4
scoped-CSS bundles) leave src/MeshWeaver.Blazor/Components for
src/MeshWeaver.Blazor.Graph — MeshNodeThumbnailView, MeshNodeCardView,
MeshNodeErrorCardView, MeshNodeCollectionView, MeshNodeContentEditorView,
MeshNodeRoleEditorView. (MeshNodePickerView moved in the previous PR: its
FormComponentBase base forced the pull-forward.)

This FIXES an existing inconsistency rather than creating a new seam:
AddGraphViews already registered four of these views from the WRONG
assembly (via `using MeshWeaver.Blazor.Components`), and
MeshNodeCardControl was DOUBLE-registered — once in the pack, once in the
base registry's switch. After the move there is ONE registration, in
Blazor.Graph, and the base arms for MeshNodeCollectionControl and
MeshNodeCardControl are gone (MeshSearchControl stays — MeshSearchView
remains a base surface).

## The MeshSearchView seam

MeshSearchView (staying in base) rendered <MeshNodeCardView …/> at four
sites — a compile-time component reference the base pack can no longer
make without inverting the reference direction. All four now render
<DispatchView ViewModel="@cardcontrol" …/>: the search page renders
whatever view the mesh's registered pack maps to MeshNodeCardControl.
Pinned by MeshNodeCardControl_ResolvesThroughThePortalRegistry on the
real portal composition (AddBlazor + AddGraphViews — the same
ILayoutClient instance DispatchView consults, verified identical through
PortalApplication.Hub); the card MARKUP stays pinned by the two existing
RenderAsync card tests. Asserted at the registry rather than through a
static DispatchView render because the one-shot HtmlRenderer cannot drive
DispatchView's post-parameter re-render — a harness artifact, not a seam.

## The rest

- BlazorGraphExtensions registers MeshNodeCollectionControl and drops the
  foreign-assembly using; Graph's _Imports gains the base-component /
  Layout / Data / Messaging usings the views relied on from the base
  pack's _Imports chain.
- The react parity ratchet: MeshNodeCard + MeshNodeCollection move to
  EXTERNALLY_PACKED_CONTROLS (the >30 scrape guard still clears at 32) —
  coverage moved, not deleted.
- ViewPackRegistrationGateTest: the Graph rows now name the views in
  their new home and gain the MeshNodeCollection row.

## Verified

- Release builds green (warnings-as-errors): Blazor, Blazor.Graph,
  Portal.Shared, Portal.Shared.Test, Hosting.Blazor.Test, Layout.Test,
  Graph.Test.
- Suites: Hosting.Blazor.Test 444/444, Layout.Test 474/474 and
  Graph.Test green, react parity 9/9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 22, 2026 19:38
@rbuergi
rbuergi enabled auto-merge August 22, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the entity-view extraction chain by relocating the “MeshNode surface” Blazor renderers (card/collection/thumbnail/content editor/role editor) into MeshWeaver.Blazor.Graph, updating registration and base-pack call sites so the base pack no longer directly references pack components.

Changes:

  • Move MeshNode surface view components (and scoped CSS) into src/MeshWeaver.Blazor.Graph and update namespaces/usings accordingly.
  • Update view registration: Graph pack (AddGraphViews) becomes the single source of truth for these controls; base BlazorViewRegistry drops the MeshNodeCardControl arm and MeshSearchView switches to DispatchView for card rendering.
  • Update tests and parity ratchets to reflect external packing and to pin resolution through the real portal registry composition.

Reviewed changes

Copilot reviewed 12 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/MeshWeaver.Hosting.Blazor.Test/ViewPackRegistrationGateTest.cs Updates gate rows to assert Graph pack registrations from the new assembly; adds MeshNodeCollection coverage.
test/MeshWeaver.Hosting.Blazor.Test/ControlStyleRenderingTest.cs Registers both EntityViews + Graph packs in the harness; adds a registry-resolution assertion for MeshNodeCardControl.
src/MeshWeaver.Blazor/Components/MeshSearchView.razor Replaces compile-time <MeshNodeCardView/> usage with DispatchView to avoid base→pack component references.
src/MeshWeaver.Blazor/BlazorViewRegistry.cs Removes base switch arms for Graph-owned controls and documents the new dispatch seam.
src/MeshWeaver.Blazor.Graph/MeshNodeThumbnailView.razor.cs Namespace move into MeshWeaver.Blazor.Graph.
src/MeshWeaver.Blazor.Graph/MeshNodeThumbnailView.razor Adds the thumbnail renderer component in the Graph pack.
src/MeshWeaver.Blazor.Graph/MeshNodeRoleEditorView.razor.cs Namespace move into MeshWeaver.Blazor.Graph.
src/MeshWeaver.Blazor.Graph/MeshNodeRoleEditorView.razor Adds the role editor renderer component in the Graph pack.
src/MeshWeaver.Blazor.Graph/MeshNodeErrorCardView.razor Adds an error-card renderer in the Graph pack with localized titles/details.
src/MeshWeaver.Blazor.Graph/MeshNodeContentEditorView.razor.cs Namespace move into MeshWeaver.Blazor.Graph.
src/MeshWeaver.Blazor.Graph/MeshNodeContentEditorView.razor Adds the content editor renderer component in the Graph pack.
src/MeshWeaver.Blazor.Graph/MeshNodeCollectionView.razor.css Adds isolated styling for the new collection renderer.
src/MeshWeaver.Blazor.Graph/MeshNodeCollectionView.razor.cs Namespace move into MeshWeaver.Blazor.Graph.
src/MeshWeaver.Blazor.Graph/MeshNodeCollectionView.razor Adds the collection renderer component in the Graph pack.
src/MeshWeaver.Blazor.Graph/MeshNodeCardView.razor.css Adds isolated styling for the new card renderer.
src/MeshWeaver.Blazor.Graph/MeshNodeCardView.razor Adds the card renderer component in the Graph pack (including external-link mode).
src/MeshWeaver.Blazor.Graph/BlazorGraphExtensions.cs Makes Graph pack registrations include the full MeshNode surface set (incl. collection).
src/MeshWeaver.Blazor.Graph/_Imports.razor Adds required imports previously provided implicitly by the base pack import chain.
clients/react/src/render/parity.test.ts Moves MeshNodeCard/MeshNodeCollection into externally packed control allowlist.
clients/react-native/src/parity.test.ts Same parity ratchet update for RN.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

    9 files      9 suites   6m 26s ⏱️
1 740 tests 1 736 ✅ 4 💤 0 ❌
2 223 runs  2 219 ✅ 4 💤 0 ❌

Results for commit 7c7a0fe.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

1 254 tests   1 254 ✅  12m 13s ⏱️
    9 suites      0 💤
    9 files        0 ❌

Results for commit 7c7a0fe.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

1 233 tests   1 232 ✅  6m 57s ⏱️
   10 suites      1 💤
   10 files        0 ❌

Results for commit 7c7a0fe.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 026 tests   1 726 ✅  8m 4s ⏱️
    9 suites    300 💤
    9 files        0 ❌

Results for commit 7c7a0fe.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 748 tests   1 748 ✅  9m 11s ⏱️
   10 suites      0 💤
   10 files        0 ❌

Results for commit 7c7a0fe.

@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

3 245 tests   3 245 ✅  7m 58s ⏱️
    8 suites      0 💤
    8 files        0 ❌

Results for commit 7c7a0fe.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    55 files      55 suites   50m 52s ⏱️
11 246 tests 10 941 ✅ 305 💤 0 ❌
11 729 runs  11 424 ✅ 305 💤 0 ❌

Results for commit 7c7a0fe.

♻️ This comment has been updated with latest results.

@rbuergi
rbuergi merged commit 21da89e into main Aug 22, 2026
47 of 49 checks passed
@rbuergi
rbuergi deleted the refactor/meshnode-views-to-graph branch August 22, 2026 21:10
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