Repository navigation
fix(grafana): restore parent time controls after drawer close - #262
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 (3)
🔗 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; 83 remain after this review. 📜 Recent review details🔇 Additional comments (3)
📝 WalkthroughWalkthrough
Suggested reviewers: Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The drawer-close flow restores the parent dashboard without an identified merge-blocking regression. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Comment Severity GateExplanation No CodeRabbit findings or posted review comments were supplied in the review context. The repository contains no review-comment metadata for the reviewed refs, and the commit patch does not provide finding resolution statuses. Therefore, the presence and resolution of Critical or Major findings cannot be determined. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
A rabbit watched the drawer glide away Comment |
Summary
Restore the preserved parent dashboard as Grafana's time/dashboard service owner after closing a comment-details drawer.
Cause and correction
The parent dashboard stays mounted while a drawer initializes Grafana's singleton
TimeSrvwith the drawer model. Closing the drawer destroys that model, but previously only the MFE rendering UID returned to the parent.DashNavTimeControlsuses the singleton for date selection and Refresh, so those controls kept targeting the destroyed drawer. The URL changed while the visible panels retained the old results.The existing post-commit portal owner selection now rebinds
TimeSrvandDashboardSrvto the surviving model only when ownership differs. It does not remount the dashboard, issue a query, or refresh just because a drawer closed. The shared URL remains the authoritative selected date range.Evidence and testing
fn-dashboard.test.tsx,DashboardPageLoading.test.tsx, andcreate-mfe.test.tsx. ESLint, Prettier, andgit diff --checkpassed.yarn typecheck: both unchanged baseline and fix report the same 122 errors across 95 files; none in changed files. The existing standalone TimeSrv suite fails during setup on both baseline and fix (standardEditorsRegistry.setInit). These are not claimed green.Deployment / rollback
Deploy through the existing Grafana fork image and mono Grafana path. No database, IAM, query, ingestion, feature-flag, or permission-cache changes. Keep wider isolated-reader activation off. Revert this commit for rollback.
After deployment, repeat parent → drawer → close → change date → Refresh without a page reload, verify new requests/results and preserved controls. This local regression does not claim production validation or complete analytics parity.
Agent handoff
coderabbitai/grafana,coderabbit_micro_frontend(not upstreammain).public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx; lifecycle regression in adjacentfn-dashboard.test.tsx; existing DashboardPageLoading test service mock updated for the ownership path.gh pr checks, merge normally after green checks, then verify the deployed flow. No admin-merge authorization.