Files
fusion/.changeset/merge-advance-notice-render-fix.md
gsxdsm 6083de214a fix(dashboard): preserve store this-binding in merge-advance-events endpoint
The route was extracting getRunAuditEvents off scopedStore and calling it as
a bare function, which made this.db.prepare(...) throw. useMergeAdvanceNotice
silently swallowed the error, so the banner never rendered after merges.
Call the method on the store reference instead so this is preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 14:16:36 -07:00

775 B

@fusion/dashboard
@fusion/dashboard
patch

fix(dashboard): unbreak Merge Advance Notice banner by preserving store this binding in events endpoint

GET /api/tasks/merge-advance-events was extracting getRunAuditEvents off the scoped store as a bare function reference and calling it without this, which made this.db.prepare(...) throw "Cannot read properties of undefined (reading 'db')" on every request. The useMergeAdvanceNotice hook caught the failure silently (catch { setEvents([]) }), so the banner never appeared even after the merger advanced the integration branch ref.

Fix: keep the store reference and call storeWithRunAudit.getRunAuditEvents(...) as a method so this is preserved, matching the pattern used by other routes that read run-audit events.