Repository navigation
feat(alerts): alerting sections as real pages in the sidebar - #2426
Conversation
- Kit: rightSheet over the Dialog Submodel (672px form size, scrolling body, sticky footer, slide dropped under reduced motion) with followUrl/isDismissed; page/kit/sheet-param holds the ?sheet= helpers (push to open, replace to close). - Sidebar group labels fold their rows (sidebarGroupToggle, aria-expanded), saved to localStorage; the group holding the current page and the collapsed rail always show every row. - Footer on-call pill from the schedules list's on_call_now and the session user: on call until the handoff, not on call, or hidden without schedules. Re-read at each handoff; a dot with a tooltip on the rail. - /lab/shell shows all three, with a demo form in the sheet.
- Sheet: opening pushes a history entry marked as this tab's; dismissing goes back past it, and only a deep link replaces the param. Kit renamed to sidePanelSheet, footer receives close; sheet-param tests sit beside it. - On-call pill: a shift past its end reads as unknown; reads again at the handoff, hourly while off call, on focus and visibility, and with backoff (60s doubling, capped) after a stale or failed answer, keeping the last good data. Schedule and override writes announce a re-read. - An org with no schedules is cached per org for a day and skips the request; a schedule write clears it. - "until" uses the viewer's time zone with a short zone name. - Sidebar: the collapsed rail renders plain labels (no tab stops); the group holding the current page can fold and keeps only that row. The pill uses aria-label on the rail instead of a title.
… side panel
- Each hub section has its own path (/alerts/rules, /alerts/uptime, /alerts/slos,
/alerts/silences, /alerts/maintenance, /alerts/on-call, /alerts/routing); /alerts
stays the Inbox. One page instance serves them all, so a section change reads
nothing it already has.
- Old /alerts?tab= links replace themselves with the section's path and keep
their other params ("oncall" and "settings" map to on-call and routing).
- The sidebar's Alerts row lists the sections when active and replaces the hub's
own section rail. Sub-item aria-current now follows the most specific match.
- New silence opens in a URL-held side panel (?sheet=silence) with a sticky
Cancel / Save footer; Back, Cancel, Escape and a save close it.
sidePanelSheet gains onSubmit so the panel is a form.
- The silence panel clears ?sheet= in the model as soon as it closes itself, so a clock tick before the URL change can't reopen it. It opens only on the Silences section, and a viewer who can't manage loses a linked ?sheet= once the grants load (replaced away). - A rule lives at /alerts/rules/<ruleId>; /alerts/<ruleId> (notifications, the apps) replaces itself with it, keeping its tab and window. The rule page and editor go back to Rules and their crumbs go through it. - Settings automation and setup health link to the new section paths. - The sidebar reveals the open section, every sub-item past the edge fades, on each route change; sub-rows are tighter, thin rules split the former groups, and the Inbox shows its unacknowledged count from the alert_incidents collection, read only while an alerts page is open. - One AlertsTab schema next to AlertsSection; the sheet commands answer with a clock read instead of a no-op message.
|
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 14 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.
…size - A `scrim-panel` token (12% black, 24% in dark) with no blur sits beside a side panel, so the page it edits stays readable. Dialogs and other sheets keep `scrim`. - `sidePanelSheet` takes `size`: `compact` (28rem) for a few short fields, `form` (42rem, the default) or `wide`.
- The on-call pill is one 32px row of the footer list: a status dot and "On call until Mon 09:00" in the viewer's zone (the date instead of the weekday once the handoff is over six days out), or a muted "Not on call". The zone, date and schedules are its tooltip and accessible name. On the collapsed rail it is a calendar glyph badged with the dot. - Group chevrons show faintly at rest; the toggle is 28px tall. - A folded group holding the current page shows that page's parent row alone, highlighted, without its sub-items. - Hover is a neutral wash. When a sub-item is the current page only it is tinted; its parent keeps the medium weight on a plain background. - Sub-item rows are 28px on desktop and 36px in the mobile sheet. - /lab/shell gains Services and Logs pages, a far handoff and both panel sizes.
… the silence panel
- Each section's header has one primary action: New rule (split) on the Inbox
and Rules, New monitor, New SLO, New silence, New window, New schedule and
Add destination on their own sections. A section whose empty state already
offers it shows none until it has rows.
- The Alerts sub-list sets its groups apart with a 4px gap instead of rules,
and its rows take the kit's height again.
- The silence panel's Services, Environments and Tags are chips inputs that
suggest what the org's rules name (and the services Uptime listed); a typed
name can still be added. Its labels share one style.
- A picked end is on the viewer's clock and the field names the zone
("Ends, CET"); a scheduled row names its day once. The lab reads the
viewer's zone instead of UTC.
- The duration choice uses the larger segmented size.
# Conflicts: # apps/web/src/shell/oncall.scene.test.ts # apps/web/src/shell/view-nav.ts
This comment has been minimized.
This comment has been minimized.
# Conflicts: # apps/web/src/shell/command.ts # apps/web/src/shell/flags.ts
# Conflicts: # apps/web/src/page/settings/audit-log/view-detail.ts # apps/web/src/route/search.ts
…rst schedule shows the on-call row The marker lived a day and only a schedule write in the same tab cleared it, so the row stayed hidden across reloads after someone else created the org's first schedule. It now lives five minutes, and coming back into focus asks again once it has aged.
…sidebar A section row whose sub-item is the current page keeps data-active="child" and leaves aria-current to the sub-item. The on-call footer row is a plain anchor, so it never claims the page its nav row already marks.
surface-sunken sits under 1% from the light sidebar's grey. Rows now hover at half the selected tint (bg-sidebar-accent/50): visible in light, unchanged in dark.
This comment has been minimized.
This comment has been minimized.
Preview testTested on the combined preview of the whole stack (#2466, app-pr-2466.maple.dev) by a separate test agent in a real browser: happy paths, break attempts, light and dark, and a 390x844 viewport. No uncaught page errors. Passed: all eight sections load directly, survive a reload and follow back and forward; the sidebar highlights the current sub-item and the Inbox count follows acknowledge; every legacy Found and fixed in this push:
Still open: a silence form with input closes on Escape or an outside click without asking; the Routing section shows three create actions; on a phone the Inbox and Rules tables scroll sideways inside their own box. Traces (preview environment |
…n tab finds the first one
…read within the hour whoever holds it
# Conflicts: # apps/web/src/shell/view-nav.ts
This comment has been minimized.
This comment has been minimized.
# Conflicts: # apps/web/src/shell/message.ts # apps/web/src/shell/model.ts # apps/web/src/shell/oncall.scene.test.ts # apps/web/src/shell/update.ts # apps/web/src/shell/view-nav.ts # packages/views/src/ui/sheet.ts
Maple review🟢 Confidence 10/10 · safe to merge. Routing, redirects and the silence panel check out; the hub and rule scene tests plus editor/rule/lab files went unread here. Each alerting section now lives at its own
|



Stacked on #2419. Each alerting section gets its own page instead of
/alerts?tab=x, and the sections move into the sidebar.What changed
/alerts(Inbox),/alerts/rules,/alerts/uptime,/alerts/slos,/alerts/silences,/alerts/maintenance,/alerts/on-call,/alerts/routing. One hub page serves them (pinned to one instance), so switching sections adds no requests beyond today./alerts/rules/<ruleId>. The old/alerts/<uuid>replace-redirects there, keeping its params, so links in notifications, Slack, email and iOS keep working. Old?tab=links redirect too.?sheet=silence, Silences only), with Cancel / Save in a sticky footer. Services, Environments and Tags are chip inputs with suggestions from the rules already loaded. The end time is in your own time zone, named in the label ("Ends, CET"). Back closes the panel; it can't reopen from a clock tick after Cancel or Save; viewers without manage rights get the param removed. The rule and incident pages reuse the form without URL state.lgsize.Before / after
Silence panel in dark and on a phone:

Verification
bunx vitest run src/page/alerts src/shell src/route src/lab src/page/kitand rootsrc/*.test.ts: 868 tests pass (route table and collisions, legacy redirects keep params, the rule/alerts/<uuid>redirect, sidebar active state, one primary action per section, silence panel open/save/Cancel/Escape/Back and the reopen race, chip inputs, the zone label across DST changes).oxlint -c .oxlintrc.effect.jsonclean on changed files;ui:index,ui:patterns:checkpass.Not verified yet: the live Inbox count and sidebar scrolling against real data (preview test pending). The Maintenance window dialog still takes comma-separated fields.
🤖 Generated with Claude Code