Skip to content

Render a real Flow Graph and recover diagnostics sample routes - #347

Merged
Eli Pinkerton (wallstop) merged 8 commits into
masterfrom
dev/wallstop/session-187-flow-graph-clarity
Aug 3, 2026
Merged

Render a real Flow Graph and recover diagnostics sample routes#347
Eli Pinkerton (wallstop) merged 8 commits into
masterfrom
dev/wallstop/session-187-flow-graph-clarity

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the Flow Graph's text-first report with a hand-built UI Toolkit node-and-edge canvas
  • render message nodes, receiver nodes, colored bezier routes, arrowheads, and distinct parallel-route hit targets
  • support pan, zoom, dynamic framing for large graphs, focused selection, and viewport preservation across inspection updates
  • move route rows, message/target lanes, trace analytics, topology, and overflow text into one collapsed analysis section
  • make the diagnostics sample recover registrations when Enter Play Mode disables domain and scene reloads
  • add editor, runtime, sample-contract, documentation, changelog, and live-science coverage

Root cause

The Flow Graph presented topology as dense rows and analytics, so it did not render the visual graph its name promised. The revised primary surface is an actual graph: all filtered messages occupy the left column, receivers occupy the right column, and every route is drawn between them. Parallel registration kinds receive separate geometry and selectable markers rather than painting over one another.

The sample had a separate reload-disabled lifecycle gap: the bus could reset while a persisted token still reported Enabled, so trusting that flag left receivers detached. Startup now deliberately replaces cached registration state and activation remains idempotent.

Validation

  • focused Flow Graph fixture: 151 passed, 0 failed
  • full Editor assembly: 595 passed, 0 failed
  • runtime re-registration fixture: 7 passed, 0 failed
  • full Runtime assembly: 984 passed, 0 failed (before the destroyed-target review correction)
  • destroyed-target Runtime regression: 2 passed, 0 failed across destroyed GameObject and Component contexts; the extended handler-continuation assertion is covered by the PR Runtime matrix
  • script suite: 406 passed, 0 failed
  • live graph: 4 message nodes, 3 receiver nodes, 15 routes, 24 named node metrics, 0 edge text labels, and 0 +N summaries
  • constrained 640 x 900 layout: 0 section overflows and 0 route-endpoint overflows
  • selected route: 4 responsive evidence sections and 5 activity tiles; technical diagnostics collapsed
  • live reload-disabled Play Mode, twice: 3 components, 4 messages, 15 routes, 33 trace paths, 99 calls each run
  • exact component/registration delivery evidence, mixed-kind filtering, keyboard focus, and 0.8 readable zoom floor covered
  • documentation compilation: 441 passed, 0 failed
  • strict documentation build, npm run validate:all, all pre-commit hooks, CSharpier, Prettier, markdownlint, spelling, and git diff --check: passed
  • final independent adversarial review: zero actionable findings

Closes #345
Supports #346 without closing its broader sample-demo scope.


Note

Medium Risk
Large editor UI refactor plus a small runtime messaging path change; sample lifecycle is sample-scoped; core bus behavior for valid targets is unchanged.

Overview
The Flow Graph window now leads with a live route canvas: message nodes on the left, receiver nodes on the right, colored curved edges with arrowheads, pan/zoom, auto-framing, and selectable nodes/connections. Dense route maps, trace lanes, topology lists, and overflow routes move into a collapsed Analysis and Raw Data section; empty states explain how to restore live routes when nothing is captured.

Capture and UI semantics improve alongside the canvas: global accept-all registrations appear as ANY MESSAGE observers; destroyed Unity contexts fall back to stable instance IDs instead of failing capture; edges include context and registration-exact recent emission sites; selection opens responsive route/activity/emission/trace cards with technical diagnostics collapsed by default. Export schema bumps to v6 with message kinds, contexts, and emission sites.

Runtime: reflexive dispatch to a destroyed GameObject/Component skips hierarchy delivery instead of throwing MissingReferenceException; normal targeted handlers still run.

Diagnostics Tooling Exerciser: runner and receivers rebuild tokens and restart deterministic emissions on each play activation via RuntimeInitializeOnLoad and idempotent OnEnable, fixing lost registrations when Enter Play Mode disables domain/scene reload.

Reviewed by Cursor Bugbot for commit 61e07e1. Bugbot is set up for automated code reviews on this repo. Configure here.

@wallstop Eli Pinkerton (wallstop) changed the title Improve Flow Graph clarity and diagnostics sample recovery Render a real Flow Graph and recover diagnostics sample routes Aug 2, 2026
@wallstop
Eli Pinkerton (wallstop) marked this pull request as ready for review August 2, 2026 22:27
Copilot AI review requested due to automatic review settings August 2, 2026 22:27

Copy link
Copy Markdown
Collaborator Author

Current head 9422c96148b415f29d7e4b2fe0601b69e09b0232 is ready for automated and human review.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human review requested for the hand-built Flow Graph canvas, parallel-route geometry, viewport-state preservation, Unity 2021.3 portability, and reload-disabled sample recovery.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Performance Numbers

Measured commit: 61e07e1
Trusted reporting code (PR base): 5ca2846
Measured historical baseline: 64a864c
Workflow run: 30781278142 attempt 1

Benchmark methodology is unchanged; the historical Standalone comparison is diagnostic regression smoke.

Historical Standalone delta

Delta direction: + is better; - is worse.

Scenario Baseline Current Delta
Empty Bus Dispatch 49.24 M emits/sec 49.63 M emits/sec +0.80%
Untargeted Flood (One Handler) 35.32 M emits/sec 35.69 M emits/sec +1.06%
Untargeted Flood (Two Handlers, One Priority) 32.47 M emits/sec 27.95 M emits/sec -13.92%
Untargeted Flood (Three Handlers, One Priority) 31.59 M emits/sec 31.66 M emits/sec +0.22%
Untargeted Flood (Four Handlers, One Priority) 30.28 M emits/sec 28.55 M emits/sec -5.71%
Untargeted Flood (Four Handlers, Four Priorities) 27.07 M emits/sec 30.13 M emits/sec +11.33%
Untargeted Flood (Sixteen Handlers, One Priority) 16.23 M emits/sec 17.81 M emits/sec +9.74%
Untargeted Flood (One Inactive Handler) 35.90 M emits/sec 38.65 M emits/sec +7.64%
Untargeted First Dispatch (Cold, Distinct Types) 0.206 ms 0.210 ms -1.94%
Targeted Flood (No Matching Target) 14.33 M emits/sec 15.05 M emits/sec +5.05%
Targeted Flood (One Listener) 12.97 M emits/sec 13.05 M emits/sec +0.57%
Targeted Flood (Sixteen Listeners) 9.36 M emits/sec 9.60 M emits/sec +2.55%
Targeted First Dispatch (Cold, Distinct Types) 0.208 ms 0.192 ms +7.69%
Broadcast Flood (One Handler) 26.49 M emits/sec 25.39 M emits/sec -4.15%
Broadcast First Dispatch (Cold, Distinct Types) 0.198 ms 0.208 ms -5.05%
Interceptor Heavy (Four Interceptors) 3.91 M emits/sec 3.99 M emits/sec +1.97%
Post-Processing Heavy (Four Post-Processors) 13.64 M emits/sec 15.31 M emits/sec +12.27%
Message Bus Construction (1000) 17.206 ms 26.263 ms -52.64%
Registration Token Construction (1000, Prebuilt Handler + Bus) 0.223 ms 0.053 ms +76.23%
Registration Flood (1000 Types, Cold Bus) 564.152 ms 564.731 ms -0.10%
Registration Flood (1000 Types, Warm JIT) 4.132 ms 3.834 ms +7.21%
Untargeted Registration (Marginal, 1000 Same-Type) 0.421 ms 0.408 ms +3.09%
Targeted Registration (Marginal, 1000 Same-Type) 0.442 ms 0.443 ms -0.23%
Broadcast Registration (Marginal, 1000 Same-Type) 0.450 ms 0.459 ms -2.00%
Deregistration Flood (1000 Types, Cold) 2.084 ms 1.975 ms +5.23%
Deregistration Flood (1000 Types, Warm JIT) 1.173 ms 1.174 ms -0.09%
Global -> 1 subscriber 34.37 M emits/sec 32.67 M emits/sec -4.95%
Global -> 16 subscribers 17.00 M emits/sec 16.95 M emits/sec -0.29%
Keyed/targeted -> 1 of many 12.69 M emits/sec 13.24 M emits/sec +4.35%
Priority-ordered dispatch 30.62 M emits/sec 29.47 M emits/sec -3.76%
Filtered/intercepted dispatch 8.93 M emits/sec 8.87 M emits/sec -0.65%
Post-processing dispatch 14.23 M emits/sec 15.70 M emits/sec +10.32%
Subscribe/unsubscribe churn 0.89 M emits/sec 0.88 M emits/sec -0.90%
Struct message (no boxing) 33.29 M emits/sec 31.67 M emits/sec -4.87%

Current TargetMap evidence

These raw rows are current-run diagnostics. Use fresh bracketed controls before accepting a micro-optimization.

[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Churn keyCount=16 operation=Churn totalOperations=1980000 operationsPerSecond=394386.502 wallClockMs=5020.456 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=2000000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Hit keyCount=16 operation=Hit totalOperations=60350000 operationsPerSecond=12069957.755 wallClockMs=5000.018 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=60370000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_16_Miss keyCount=16 operation=Miss totalOperations=71620000 operationsPerSecond=14322883.674 wallClockMs=5000.390 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=16 targetMapCapacity=32 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Churn keyCount=1 operation=Churn totalOperations=2050000 operationsPerSecond=409021.016 wallClockMs=5011.967 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=2070000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Hit keyCount=1 operation=Hit totalOperations=64210000 operationsPerSecond=12841166.351 wallClockMs=5000.325 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=64230000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_1_Miss keyCount=1 operation=Miss totalOperations=73060000 operationsPerSecond=14610831.718 wallClockMs=5000.400 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=1 targetMapCapacity=4 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Churn keyCount=256 operation=Churn totalOperations=1770000 operationsPerSecond=352660.855 wallClockMs=5018.986 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=1790000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Hit keyCount=256 operation=Hit totalOperations=56140000 operationsPerSecond=11226859.576 wallClockMs=5000.508 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=56160000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_256_Miss keyCount=256 operation=Miss totalOperations=66430000 operationsPerSecond=13285868.204 wallClockMs=5000.050 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=256 targetMapCapacity=512 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Churn keyCount=4096 operation=Churn totalOperations=1380000 operationsPerSecond=273386.258 wallClockMs=5047.803 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=1400000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Hit keyCount=4096 operation=Hit totalOperations=52620000 operationsPerSecond=10523527.704 wallClockMs=5000.224 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=52640000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4096_Miss keyCount=4096 operation=Miss totalOperations=69020000 operationsPerSecond=13802594.068 wallClockMs=5000.509 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4096 targetMapCapacity=8192 observedInvocations=0
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Churn keyCount=4 operation=Churn totalOperations=1930000 operationsPerSecond=385612.614 wallClockMs=5005.023 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=1950000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Hit keyCount=4 operation=Hit totalOperations=61450000 operationsPerSecond=12287582.787 wallClockMs=5000.984 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=61470000
[Standalone] DXM_TARGET_MAP_BENCHMARK scenario=TargetMap_4_Miss keyCount=4 operation=Miss totalOperations=62320000 operationsPerSecond=12463696.135 wallClockMs=5000.122 gcAllocations=-1 gcAllocatedBytes=-1 targetMapEntries=4 targetMapCapacity=8 observedInvocations=0
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=1 wallClockMs=0.000107 operationsPerSecond=9310986.965 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=4
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=16 wallClockMs=0.000597 operationsPerSecond=1675392.670 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=32
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=256 wallClockMs=0.007875 operationsPerSecond=126984.127 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=512
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=4 wallClockMs=0.000218 operationsPerSecond=4595588.235 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=8
[Standalone] DXM_TARGET_MAP_CONSTRUCTION keyCount=4096 wallClockMs=0.119100 operationsPerSecond=8396.306 gcAllocations=-1 gcAllocatedBytes=-1 targetMapCapacity=8192

Copilot AI review requested due to automatic review settings August 2, 2026 22:51

Copy link
Copy Markdown
Collaborator Author

Corrective head b3d1ea11787eb7c02c34a9615e52a660885d85ba is ready for re-review. Unity 2021.3 EditMode exposed only a headless fixture teardown log after the viewport-selection test; the fixture now reapplies the repository's established headless-only window suppression in TearDown. Fresh local validation: Flow Graph fixture 140/140 and full Editor assembly 583/583.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human re-review requested for the headless teardown correction and the complete hand-built Flow Graph canvas.

Copy link
Copy Markdown
Collaborator Author

Correction: the exact current head is b3d1ea11f83f8db7cae958a7a49b2eb79781a960 (the prior comment's expanded SHA was mistyped). Please review this exact head.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human re-review requested.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 3, 2026 01:20

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Collaborator Author

Readability-overhaul head 5862390d3e0a72967274d30dcc4ac458dcf140ec is ready for final review.

The canvas now relies on arrow direction instead of FROM/AT labels, applies crossing-aware layered ordering and ordered ports, shows named/filter-scoped node metrics without +N, distinguishes MIXED and GLOBAL OBSERVER / ANY MESSAGE, and presents route/activity/emission/trace evidence as responsive structured cards. Recent call sites are component- and registration-exact.

Fresh validation: Flow Graph 150/150; full Editor assembly 594/594; script suite 406/406; strict docs, validate:all, pre-commit, and final adversarial audit all green.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human final review requested for readability, accessibility, evidence attribution, and the current exact head.

Comment thread Editor/Windows/DxMessagingFlowGraphWindow.cs
Copilot AI review requested due to automatic review settings August 3, 2026 01:26

Copy link
Copy Markdown
Collaborator Author

CI correction head 07690cc25ca6434724bc7904067034edc4c0ee4d is ready for final re-review. This follow-up only rephrases one documentation word and teaches cspell Unity's existing Mathf.Lerp API name; the complete graph implementation remains the previously reviewed tree. The full local spelling and formatting gates pass.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human final re-review requested for this exact head.

Copilot AI review requested due to automatic review settings August 3, 2026 02:14

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

Final review requested for f02fce6. The destroyed-context finding is fixed across the class: Flow Graph capture now uses Unity fake-null semantics and preserves the stable instance ID; ReflexiveMessage hierarchy delivery skips destroyed GameObject/Component references while normal targeted bus handlers still continue. Regressions cover exact route retention and both destroyed target shapes. Final adversarial audit: zero actionable findings.

Copy link
Copy Markdown
Collaborator Author

Eli Pinkerton (@wallstop) Human final re-review requested for f02fce6. The readability overhaul and destroyed-context correction are ready: Flow Graph 151/151, full Editor 595/595, destroyed-target Runtime regression 2/2 before the extended handler-continuation assertion, 406/406 Node tests, 441/441 docs tests, validate:all, spelling, and all hooks green.

Copy link
Copy Markdown
Collaborator Author

Copilot review

Final review requested for f02fce6. The latest correction fixes destroyed Unity fake-null handling in Flow Graph capture and ReflexiveMessage hierarchy delivery, with editor/runtime regressions, leak coverage, documentation, and a zero-finding adversarial audit.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread Editor/Windows/DxMessagingFlowGraphWindow.cs
Copilot AI review requested due to automatic review settings August 3, 2026 02:22

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

Final re-review requested for ba29b17. This minimal follow-up fixes the Unity 2021.3 NUnit compatibility failure by comparing the declared IReadOnlyList Edges.Count directly instead of using Has.Count reflection. The exact-one-route contract is unchanged; focused hooks and final adversarial review are clean.

Copy link
Copy Markdown
Collaborator Author

Copilot review

Final re-review requested for ba29b17. The only delta from the reviewed fix is a Unity 2021.3-compatible IReadOnlyList.Count assertion and its RCA; all focused gates pass.

Copy link
Copy Markdown
Collaborator Author

Eli Pinkerton (@wallstop) Human final re-review requested for ba29b17. CI artifact RCA: production capture did not fail; Unity 2021.3's older NUnit could not reflect Has.Count from the runtime array. The assertion now reads the declared IReadOnlyList.Count directly. Final adversarial audit: zero findings.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ba29b17. Configure here.

Copilot AI review requested due to automatic review settings August 3, 2026 03:13
@wallstop

Copy link
Copy Markdown
Collaborator Author

Final review-correction head 61e07e1ae... is ready. Route selection, connection identity, and layout signatures now use stable registration fields rather than mutable context labels; the signature is canonicalized independently of producer ordering. A two-parallel-route regression reverses display-label order and proves selection, details, pan, zoom, and initialized layout state persist. CSharpier, diff-check, validate:all, changed-file hooks, and final adversarial review are green.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human final review requested for this exact head.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Correction: the exact final review-correction head is 61e07e1a4b841cdb2e41fceef414b162f4b43429.

Cursor (@cursor) review

Copilot review

Eli Pinkerton (@wallstop) Human final review requested for this exact head.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@wallstop
Eli Pinkerton (wallstop) merged commit 5bdf70d into master Aug 3, 2026
48 of 50 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the dev/wallstop/session-187-flow-graph-clarity branch August 3, 2026 07:01
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.

[Bug]: Tool UI/UX (Message Flow Graph) Is Confusing/Not Helpful

2 participants