feat(dashboard): shared range bar, sensitivity control, drill breadcrumb (PR-B)#152
Conversation
surpradhan
left a comment
There was a problem hiding this comment.
Round 1 findings (all addressed in ceec8a0): (1) drillOrigin set after switchMain in both drillSession and applyInitialHash — fixed by moving the assignment before the call; (2) no guard for mainView === 'sessions' drill — fixed; (3) indentation nit on inner .layout div — fixed. Round 2: all three fixes are correct, no new issues, tests 239/0. Approve.
surpradhan
left a comment
There was a problem hiding this comment.
Round 1 findings (all addressed in ceec8a0): (1) drillOrigin set after switchMain in both drillSession and applyInitialHash — fixed by moving the assignment before the call; (2) no guard for mainView === 'sessions' drill — fixed; (3) indentation nit on inner .layout div — fixed. Round 2: all three fixes are correct, no new issues, tests 239/0. Approve.
- Replace three separate per-view toolbars (Policy/Performance/Anomalies) with one shared range bar above the Analyze sub-nav; all three views read from shared-since/shared-until; range persists across sub-tab switches - Auto-trigger the active Analyze view on change when both fields are set - Extract ad-threshold (z-score sensitivity) from the range toolbar into its own dedicated Sensitivity section, visible only on the Anomalies sub-tab - Custom Analytics retains its own independent controls with explicit Run - Add drill breadcrumb: drillSession() captures origin, encodes it as #sessions?from=origin in the URL (survives back navigation), and shows a "← Back to [view]" breadcrumb in the Sessions panel; updateBreadcrumb() called on switchMain so the bar hides correctly on manual nav Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…nitialHash - Set drillOrigin before switchMain in both drillSession() and applyInitialHash() so the updateBreadcrumb() call inside switchMain already sees the correct value; removes the redundant explicit updateBreadcrumb() call after switchMain - Guard drillSession() against mainView === 'sessions' to avoid writing a semantically meaningless #sessions?from=sessions URL - Fix indentation of inner .layout wrapper inside #view-sessions (2sp → 4sp) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ceec8a0 to
4bde832
Compare
What does this PR do?
Builds on PR-A (#151) with analytics UX improvements and session drill-through. Stacked on
feat/dashboard-nav-polish— will rebase tomainonce #151 merges.Changes
Shared range bar — replaces three duplicate per-view toolbars (Policy Analytics, Performance, Anomalies) with a single range bar shown above the Analyze sub-nav. All three views read from
shared-since/shared-until. Range persists as you switch sub-tabs within Analyze.change-trigger — when both Since and Until inputs are set, the active view auto-loads. No more mandatory Apply click for range changes. Explicit Apply and quick-range buttons still work.Sensitivity control — the z-score threshold (
ad-threshold) was previously buried inline with the Anomalies range toolbar. It's now a dedicated "Sensitivity (z-score)" section that appears only on the Anomalies sub-tab — semantically separate from the time range.Custom Analytics untouched — Custom keeps its own
cq-since/cq-untilcontrols and explicit "Run query" button. The shared range bar is hidden on the Custom sub-tab.Drill breadcrumb —
drillSession()now captures the source view, encodes it as#sessions?from=analyticsin the URL (survives back-navigation), and shows a "← Back to Policy Analytics" breadcrumb inside the Sessions panel.applyInitialHash()restores the breadcrumb on reload.Why?
Three identical toolbars forced the user to reconfigure the range every time they switched sub-tabs. Hiding the threshold inside the range bar implied it was a time value. No breadcrumb left users stranded after drilling into a session from Performance or Anomalies.
How to test?
#sessions?from=analyticsdirectly — breadcrumb appears without drillingChecklist
src/public/dashboard.html)an-since/pf-since/ad-sincereferencesfeat/dashboard-nav-polish(feat(dashboard): two-level nav, live ticker, and polish (PR-A) #151)