Fix #139: keep the PDStatusRollUp pop-over in step with its node - #140
Merged
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 3 |
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
This was referenced Sep 13, 2026
The trigger icon is rendered by Blazor from Node.Status on every render, but the pop-over is drawn by the JavaScript module from a snapshot that was serialized once, on first render, and never refreshed. A consumer that rebuilds its node as status changes - the normal pattern - therefore got a live icon beside a pop-over frozen at whatever the component first rendered. In the Magic Suite Ops Dashboard that read as a red environment row whose pop-over insisted "All available checks are healthy". OnBeforeExpand was not a way out: with no callback supplied dotNetRef is null and _maybeExpand returns the stale node immediately, so there was no refresh path at all. The module gains an update(triggerId, nodeJson) export that replaces the stored snapshot, redrawing an already-open pop-over from the root so a status that changes while someone is looking at it is not left showing the superseded verdict. OnAfterRenderAsync now pushes the node whenever its serialized form changes, comparing JSON rather than the instance so that a consumer rebuilding an identical node does not chatter across the interop boundary. It also no longer keys initialisation on firstRender but on the first render at which Node is non-null. A component first rendered without a node previously never initialised the module, and so had no pop-over for the rest of its life even once a node arrived. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
davidnmbond
force-pushed
the
fix/139-status-rollup-stale-popover
branch
from
September 13, 2026 20:37
16551cf to
b26fe27
Compare
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.
Closes #139.
PDStatusRollUpfed its icon and its pop-over from two different points in time. The icon is rendered by Blazor fromNode.Statuson every render; the pop-over is drawn by the JS module from a snapshot serialized once, inOnAfterRenderAsync(firstRender: true), and never refreshed — the module only exportedinitanddispose.Found in the Magic Suite Ops Dashboard, where an environment row showed a red roll-up icon and a pop-over headed with a green tick and "All available checks are healthy". It affects every consumer that rebuilds its node as status changes, which is around 40 components in OpsDashboard alone.
Changes
PDStatusRollUp.razor.js— newupdate(triggerId, nodeJson)export that replaces the stored snapshot. An already-open pop-over is redrawn from the root (closing any drill-down, whose children may no longer exist) so a status that changes while someone is looking at it does not keep showing the superseded verdict.PDStatusRollUp.razor.cs— pushes the node whenever its serialized form changes. It compares JSON rather than the instance, so a consumer that rebuilds an identical node each render does not chatter across interop.Nodeis non-null rather than onfirstRender. A component first rendered without a node previously never initialised the module, leaving it with no pop-over for the rest of its life even once a node arrived.Tests
Three new bUnit tests in
PDStatusRollUpNodeUpdateTests: a changed node is pushed, an identical rebuilt node is not, and a node arriving after first render still initialises.Full suite: 476 passed, 0 failed. Release build clean.
🤖 Generated with Claude Code