feat(incidents): the timeline leads with what is worst, not what is newest - #485
Merged
Conversation
…ewest The incident timeline was ordered by time alone, so an operator opening a page mid-incident had to read a chronology to find the failure — and a warning filed a minute ago sat above a failure that had been going for an hour. Issues are now ordered by the severity of their effective result, ties broken by most recent, with notes below every issue. Effective, not observed: a check an operator capped at warning ranks as a warning here too, matching what the rest of the incident workflow acts on. The rank comes from CHECK_RESULT_ORDER, already the UI's severity vocabulary, and an issue with no recorded result predates the check-state model and has no severity to rank on, so it sorts below everything graded rather than above it — where an unknown lands if you index it directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 The incident timeline was ordered by time alone, so an operator opening a page mid-incident had to read a chronology to find the failure — and a warning filed a minute ago sat above a failure that had been going for an hour.
Issues are now ordered by the severity of their effective result, ties broken by most recent, with notes below every issue:
Effective rather than observed, so a check an operator capped at warning ranks as a warning here too — the same result the rest of the incident workflow acts on. The rank comes from
CHECK_RESULT_ORDER, already the UI's severity vocabulary, rather than a second ordering to keep in sync.An issue with no recorded result predates the check-state model and has no severity to rank on, so it sorts below everything graded — where indexing an unknown directly would have put it first.
Coverage
Two Playwright specs, seeded so that time-ordering alone would produce the opposite order: one over the full timeline (failure above warning above recovered above note), one over the Issues filter. Assertions key off the issue message, which is the row's always-visible summary — the check name only renders in the expanded provenance line, and recovered issues render collapsed.
seedIncidentNoteis new; notes had no seed helper.