Repository navigation
feat(app): grouped SLOs in the list and on the SLO page - #3814
alex-fedotyev wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
E2E Test Results✅ All tests passed • 477 passed • 1 skipped • 1184s
Tests ran across 4 shards in parallel. |
🦋 Changeset detectedLatest commit: 44ab1ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Duplicate code analysis1 new clone introduced by this PR.
If one of these duplicates a helper that already exists, import it instead jscpd compared this branch against |
A grouped SLO expands into its tracked groups in the list, worst first, each with its state, SLI, budget left and burn rate, and a note when more groups have too few events to be tracked. A group with fewer than 100 eligible events in the window shows as "Too few events" and does not alert. The SLO page shows all groups together or one group, picked from a menu or a link (?group=, which group rows and alert notifications use); its numbers, charts and bad events follow the group. With all groups, the state is the worst group's. The definition panel names the group-by and how many groups there are, and the recent firings count when any group was firing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25a9903 to
44ab1ee
Compare
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
| pl={GROUP_INDENT} | ||
| data-testid="slo-groups-note" | ||
| > | ||
| {groups.length === 0 |
There was a problem hiding this comment.
🟡 P2 — A grouped SLO with no events in its window says its groups show "after the first update"
A grouped SLO whose window has no events still gets groups: [] and groupCount: 0 once it updates (computeSloWindow in packages/api/src/controllers/sloStatusQueries.ts:118-119), so this note is wrong for it. Show the "after the first update" note only when status?.groups == null. When groups is an empty array, say there are no groups with events in the window yet.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
| {grouped && | ||
| ` · by ${slo.groupBy}` + | ||
| (groupCount != null | ||
| ? `, ${groupCount} ${groupCount === 1 ? 'group' : 'groups'}` |
There was a problem hiding this comment.
🟡 P2 — The group count in the list row is not formatted, unlike the definition panel
The list prints groupCount raw ("1234 groups"), but SloDefinitionPanel (SloDetailPanels.tsx:263) formats the same number with formatCount. Use formatCount(groupCount) here too, so both places show the same number the same way.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
3 finding(s): 🔴 0 P0/P1 · 🟡 2 P2 · 🔵 1 P3 2 posted as inline comment(s) on the changed lines. 1 P3 folded at the bottom. 🔵 1 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. No P0/P1: the correctness and adversarial passes confirmed no crash, data-loss, injection, or correctness regression — empty-string group values, 🟡 P2 -- recommended
🔵 P3 nitpicks (6)
Reviewers (10): correctness, adversarial, kieran-typescript, julik-frontend-races, testing, maintainability, performance, project-standards, agent-native, learnings-researcher. Testing gaps:
Note: Prior PR comments were all automated (Vercel, e2e results, changeset, jscpd) with no human review feedback to verify; the jscpd clone it flagged is in No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
Summary
A grouped SLO expands into its tracked groups in the list, worst first,
each with its state, SLI, budget left and burn rate, and a note when more
groups have too few events to be tracked. A group with fewer than 100
eligible events in the window shows as "Too few events" and does not
alert. The SLO page shows all groups together or one group, picked from a
menu or a link (?group=, which group rows and alert notifications use);
its numbers, charts and bad events follow the group. With all groups, the
state is the worst group's. The definition panel names the group-by and
how many groups there are, and the recent firings count when any group was
firing.
Stack
Part 27 of 27 PRs in a GitHub stack (stack #3815). The header says this PR merges into the branch below it, but the stack's base is
main: merging a PR lands it and every PR below it onmain, one squashed commit each. Each diff is only its own change, and CI runs as if each PR targetsmain.Parts 1 to 6 are shared code, 7 to 13 the API and its MCP tools, and 14 to 27 the app. Everything ships behind
ENABLE_SLOS(API) andNEXT_PUBLIC_ENABLE_SLOS(app), both off by default.Screenshots or video
Follow-ups
Listed on HDX-3001 for the team to prioritize: external API support for SLOs (with docs and tests), a docs page, counts stored per bucket so the window query is incremental, calendar windows and reports, a dashboard tile, editable burn thresholds with a slower ticket-style alert, and an end-to-end test of the SLO pages.
How to reproduce
Starting point:
yarn devon this branch (the pages need the API)..env.developmentturns onENABLE_SLOSandNEXT_PUBLIC_ENABLE_SLOS(parts 7 and 14). Use a trace or log source with data; the demo server works.On the previous part: a grouped SLO shows as one row and one page.
On this branch:
?group=), and the menu next to the state switches groups or shows all.Test plan
How to test on Vercel preview
N/A: SLOs need the API, and the preview runs in local mode, where they are off.
References
[no-story: allow] The new SLO components are page-level and fed by queries and form state, so this feature has no Storybook stories.
[ui-states: allow] The group views reuse the empty, loading and error states of the list and the SLO page.
[as-cast: allow] The cast check matches the word "as" in comments and strings here; the diff has no
ascasts.