fix(publishing): make the divergence indicator react to structural edits - #892
Merged
Merged
Conversation
The canvas publish badge's "changes pending" dot (components/cases/header.tsx) and the status dialog's divergence copy both fetched change-detection state once per enable/mount and never invalidated it, so an edit made without navigating away left both stale until a full reload. Add an optional refreshKey to useChangeDetection: pass the store's assuranceCase object, which structural edits always replace (never mutate) via setAssuranceCase, while comment mutations live in separate store slices and never touch it — giving reactive invalidation with built-in comment-immunity, no polling required.
Fallow combined reportGitHub PR summary, scope: project Important Quality gates need attention. Found 2 findings. Checks
Top fixes
Generated by fallow. |
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.
Summary
Fixes the last defect from the 2026-08-12 staging walkthrough (finding 5): after editing a published case, the canvas badge's "changes pending" indicator only updated on a full page reload.
useChangeDetectiongains an optionalrefreshKey; the badge (and, for consistency, the status dialog wrapper) pass the canvas store's case object. The store guarantees exactly one write path to that object — every structural edit replaces it, and comment mutations live in separate slices and cannot touch it — so the indicator reacts live to edits while comment activity stays inert by construction. No polling; the status dialog's instant open is unchanged (guarded by an existing e2e tripwire).Review chain