Repository navigation
StatPanel: Preserve dashboard click ownership after drill-down close - #256
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 100 included reviews per hour; 81 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🔇 Additional comments (2)
📝 WalkthroughWalkthroughStatPanel now gets its event listener from the dashboard-local Redux store. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change moves Stat panel click handling to use the panel's own dashboard-local data instead of a shared global source, which is intended to stop a leftover panel from reacting to clicks after a related drill-down view is closed. Based on the available evidence, the core click-forwarding logic (including the native link menu) appears preserved, and no confirmed user-facing regression was established. There is a narrow, unverified possibility that stat values without any configured links could now render with button-like styling even though they still do nothing when clicked; this was not confirmed as an actual defect from the available evidence and does not block merge, but it may be worth a quick visual check after deployment. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
A rabbit hops where stat clicks start, Comment |
Problem and change
After a successful Quality Metrics drill-down open and close, subsequent severity clicks can stop opening the drawer while the page remains responsive. The stat panel captured
metadata.eventListenerfrom the globally selected MFE dashboard during render. If a parent stat renders while the child owns that selection, it retains the child's no-op listener even after close restores the parent UID.Bind stat events to the panel's dashboard-local Redux store, matching the existing table and time-series listener pattern. This changes no global ownership or host drawer behavior and preserves Grafana data-link handling. Both Acceptance Rate by Severity and Acceptance Rate by Category use this stat panel.
Follow-up to #255; the stale global listener implementation originated in #208 (
0444287e69), not #255. The live observation was after #255's first open/result/close worked. This PR addresses the separately reproduced reopen defect, not an unverified claim about every renderer-freeze path.Regression and validation
createMfe.updateFnAppclose-owner update. They unmount the child while retaining the parent DOM and cover both severity and category payloads. Query frames and unrelated store initialization are fixtures; the host Drawer and live backend are not exercised here.git diff --checkpass.yarn typecheckreports 122 diagnostics in 95 unchanged files; there are no changed-file diagnostics. The repository-wide check is not claimed green or baseline-proven.Rollout and remaining verification
Grafana frontend only; no API, query, flag, IAM, ingestion, or AGENTS changes. No merge or deployment is authorized by this PR. After normal review/CI and an explicitly authorized deployment, verify severity and category open → load rows → close → reopen repeatedly on the exact published base/image/revision. A mono release alone does not rebuild Grafana source; the upstream production publishing workflow also dispatches downstream deployments and needs appropriate authorization.
Agent handoff
coderabbit_micro_frontendat51330cfea63c496026e150453534cf534000c8b9.Summary by CodeRabbit
Bug Fixes
Tests