Skip to content

fix: status indicator now reflects unresolved incidents#7744

Merged
ArthurGamby merged 4 commits intomainfrom
status-page-error
Apr 2, 2026
Merged

fix: status indicator now reflects unresolved incidents#7744
ArthurGamby merged 4 commits intomainfrom
status-page-error

Conversation

@ArthurGamby
Copy link
Copy Markdown
Contributor

@ArthurGamby ArthurGamby commented Apr 2, 2026

Summary

  • The status indicator on the docs site only checked /api/v2/status.json, which reflects aggregate component health — not unresolved incidents
  • During incident monitoring phases (like right now), components get marked operational while the incident remains active, causing the indicator to falsely show "All Systems Operational"
  • Now both StatusIndicator (docs sidebar) and PDPStatus (footer) also fetch /api/v2/incidents/unresolved.json and use the higher severity between the summary and worst unresolved incident

Test plan

  • Verify the docs sidebar indicator shows "Active Incident" with a yellow dot while the current Accelerate cold start incident is active
  • Verify the footer status widget reflects the same
  • Once the incident resolves, verify both indicators return to green "All Systems Operational"

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Status indicators now fetch and evaluate unresolved incidents alongside system status and display the highest-severity active incident when applicable.
    • Status descriptions update to reflect active incident(s) and their count.
  • Bug Fixes

    • Improved handling of failed fetches so a failed incident request no longer nulls status and failed status fetches set status to null.

The status indicator only checked /api/v2/status.json which reflects
aggregate component health. During incident monitoring phases, components
get marked operational again while the incident remains unresolved —
causing the indicator to show "All Systems Operational" despite an
active incident visible on prisma-status.com.

Now also fetches /api/v2/incidents/unresolved.json and uses the higher
severity between the summary and worst unresolved incident.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 2, 2026 9:22am
docs Ready Ready Preview, Comment Apr 2, 2026 9:22am
eclipse Ready Ready Preview, Comment Apr 2, 2026 9:22am
site Ready Ready Preview, Comment Apr 2, 2026 9:22am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f2c2fb46-b408-4fcc-b7c0-7e36cc73a655

📥 Commits

Reviewing files that changed from the base of the PR and between 9597ce0 and 9f82fd9.

📒 Files selected for processing (1)
  • apps/docs/src/components/status-indicator.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/docs/src/components/status-indicator.tsx

Walkthrough

Both status components now fetch status.json and incidents/unresolved.json in parallel, compute the worst unresolved incident severity via a SEVERITY ranking, and override the displayed status/description if an incident's severity exceeds the summary indicator.

Changes

Cohort / File(s) Summary
Incident Severity Integration
apps/docs/src/components/status-indicator.tsx, packages/ui/src/components/pdp-status.tsx
Added Incident/IncidentsResponse types and a SEVERITY ranking. Replaced single status.json fetch with parallel fetching of status.json and incidents/unresolved.json. Reduced incidents to compute the worst severity and, if higher than the summary indicator, override component state and set description to singular/plural "Active Incident(s)". Incident-fetch failure now yields an empty incidents list; primary status fetch failure sets status to null.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: status indicator now reflects unresolved incidents' directly and accurately describes the main change: updating status indicators to incorporate unresolved incident data alongside component health status.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Timed out fetching pipeline failures after 30000ms


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/ui/src/components/pdp-status.tsx (1)

22-30: ⚠️ Potential issue | 🟠 Major

major can now surface here, but it still looks healthy.

This effect now promotes status.indicator to the worst unresolved incident. In this component, "major" is still styled with the success tokens, so a major active incident would render as a green footer state. Please align that mapping before shipping.

Also applies to: 39-60

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/ui/src/components/pdp-status.tsx` around lines 22 - 30, The
indicatorStatus mapping in pdp-status.tsx incorrectly maps the "major" key to
success tokens, so status.indicator === "major" renders as healthy; update the
indicatorStatus Record (the "major" entry) to use the appropriate non-success
tokens (e.g., error/warning tokens consistent with critical/major semantics) so
a major unresolved incident shows the correct color; ensure you also update the
same mapping occurrences noted (the other block around lines 39-60) so both uses
of indicatorStatus treat "major" consistently.
🧹 Nitpick comments (1)
apps/docs/src/components/status-indicator.tsx (1)

15-35: Consider centralizing the status resolution helper.

Incident, IncidentsResponse, SEVERITY, and the merge rule now live in both this component and packages/ui/src/components/pdp-status.tsx. A small shared helper would keep the sidebar and footer aligned and give you one place to test the precedence rules.

Also applies to: 44-69

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/src/components/status-indicator.tsx` around lines 15 - 35, The same
types and status-resolution logic (Incident, IncidentsResponse, dotColors,
SEVERITY and the merge/precedence rule) are duplicated in this file and
packages/ui/src/components/pdp-status.tsx; extract them into a single shared
helper module (e.g., a new status-utils or pdp-status helper) and import it from
both places so the sidebar and footer use the identical logic; move the type
definitions (Incident, IncidentsResponse), the mapping (dotColors), the severity
map (SEVERITY) and the merge/precedence function into that module, export them,
and update this component to import and use the shared symbols rather than
redefining them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/src/components/status-indicator.tsx`:
- Around line 44-70: The current Promise.all makes the incidents fetch a hard
dependency so any failure clears the widget; change the logic to treat incidents
as optional by using Promise.allSettled (or fetch the two endpoints separately
and handle errors independently) so that when the incidents request fails you
still use statusData.status; specifically locate the Promise.all block that
fetches status.json and incidents/unresolved.json, keep using statusData.status
and setStatus(statusData.status) as the fallback, only computing
worstIncidentIndicator and overriding the status when the incidents fetch
succeeded and produced a non-empty incidents array (refer to symbols:
Promise.all/Promise.allSettled, statusData, incidentsData,
worstIncidentIndicator, SEVERITY, setStatus).

---

Outside diff comments:
In `@packages/ui/src/components/pdp-status.tsx`:
- Around line 22-30: The indicatorStatus mapping in pdp-status.tsx incorrectly
maps the "major" key to success tokens, so status.indicator === "major" renders
as healthy; update the indicatorStatus Record (the "major" entry) to use the
appropriate non-success tokens (e.g., error/warning tokens consistent with
critical/major semantics) so a major unresolved incident shows the correct
color; ensure you also update the same mapping occurrences noted (the other
block around lines 39-60) so both uses of indicatorStatus treat "major"
consistently.

---

Nitpick comments:
In `@apps/docs/src/components/status-indicator.tsx`:
- Around line 15-35: The same types and status-resolution logic (Incident,
IncidentsResponse, dotColors, SEVERITY and the merge/precedence rule) are
duplicated in this file and packages/ui/src/components/pdp-status.tsx; extract
them into a single shared helper module (e.g., a new status-utils or pdp-status
helper) and import it from both places so the sidebar and footer use the
identical logic; move the type definitions (Incident, IncidentsResponse), the
mapping (dotColors), the severity map (SEVERITY) and the merge/precedence
function into that module, export them, and update this component to import and
use the shared symbols rather than redefining them.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d7fa9ed1-695a-4c27-96a2-fa0da01253ec

📥 Commits

Reviewing files that changed from the base of the PR and between b91a5db and 9597ce0.

📒 Files selected for processing (2)
  • apps/docs/src/components/status-indicator.tsx
  • packages/ui/src/components/pdp-status.tsx

Use Promise.allSettled so a failing incidents endpoint doesn't hide the
widget. The status summary is still shown when incidents/unresolved.json
is unavailable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 2, 2026, 9:28 AM

Copy link
Copy Markdown
Contributor

@carlagn carlagn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :) thanks for updating the ui package as well 🥳

@ArthurGamby ArthurGamby merged commit c8bb37d into main Apr 2, 2026
17 checks passed
@ArthurGamby ArthurGamby deleted the status-page-error branch April 2, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants