Repository navigation
fix(alerts): metric search in the rule editor, few-sample blind spots, headroom colours and silences - #2336
Conversation
…nces on main - Alert editor (Metrics): load the metric list and a picked metric's keys through the dashboard's loaders, now shared in the query-builder kit; drop root_only when leaving traces (dashboard widget too); show the metric name, not name::type. - Hub: a rule skipped for too few samples is a "Few samples" blind spot, not "no data"; skipped values stay out of Headroom; Inbox and Rules share one near-firing test. - Silences: a cancelled silence is badged "Cancelled"; the duration control wraps on mobile; Headroom rows drop the bar below sm. - /lab/alerts-hub over fixtures for every hub state.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This comment has been minimized.
This comment has been minimized.
🍁 Maple PR previewNote Preview resources were removed when this pull request closed. Final commit |
Maple reviewNothing to review Commit
|
|
Second |
Maple: after this shippedDeployed to New errors since the deploy:
Maple looks once, an hour after the first deploy that carries the merge. |
Fixes the alerts UI bugs that preview browser tests and prod session replays flagged (2026-10-19 to 11-06). Each one was checked against
origin/mainbefore fixing.What changed
Alert editor, Metrics source
page/kit/query-builder/metric-options.ts). The dashboard widget imports them from there, and its old copy is deleted.root_onlyand keeps the rest of the filter.name::type. The dashboard picker changes the same way.Hub
last_sample_count. The rule chart's rail tooltip also counts these skips.isNear(under 20% left, or past the threshold).smthey now show the name, the value and the time.New lab:
/lab/alerts-hub?state=withinbox,rules,loading,error,silences,silence-dialogandsilence-dialog-custom. It runs the real hub over fixtures that include a below-minimum rule, a floor rule with headroom, and active, scheduled, cancelled and ended silences.Already fixed on main, not changed here
Outside this PR's scope (noted for the owning sessions)
/security"Run" answering 402 on plans without security lives inapps/web/src/page/security, not the alerts pages. It needs an upgrade state instead of a failing action.dashboards/widget/edits.ts) still keepsroot_only. Fixing it means changingresetQueryForDataSourceinpackages/query-engine.packages/views/src/ui/INDEX.mdis a generated file. It gains one line for the new shared kit module, asbun run ui:indexrequires.Verification
editor-metrics.scene.test.ts: the list loads and searches, a failed read is retried on the next edit,root_onlyis dropped, a picked metric's keys reach group-by, and the picker reads the name. With theroot_onlyand name fixes reverted, those two tests fail.vitest:apps/webalerts, query-builder, dashboard widget and lab registry (58 files, 465 tests) andpackages/web-dataalerts (157 tests) all pass.bun run typecheckfor apps/web and web-data,oxlint -c .oxlintrc.effect.jsonon every changed file,ui:patterns:checkandui:index: all clean.Screenshots
From
/lab/alerts-hub. Before = the same fixtures with this PR's source changes reverted.Inbox: Headroom and blind spots (dark)
Inbox (light)
Inbox, mobile
Rules tab: Headroom now
Rules tab, mobile
Silences (dark)
Silences (light)
Silences, mobile
Silence dialog, mobile
Silence dialog with Pick time, mobile
Silence dialog, mobile, light
Loading (unchanged: skeleton)
Failed load (unchanged: error state, no false all clear)
The editor's metric picker needs a signed-in org with metrics, so it is checked on the preview deploy (posted below), alongside its scene tests.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.