Files
supabase/apps/studio/hooks/custom-content/custom-content.schema.json
CharisandClaude Code b2cf3693dd feat(studio): /api/status-page endpoint backed by incident.io Widget API (#50931)
## Summary

* Adds `/api/status-page` (Next route + TanStack wrapper), backed by the
[incident.io](<http://incident.io>) Widget API, annotating each item
with `visible`, `show_banner`, and (for scheduled maintenances)
`banner_lead_days`.
* Deployment-mode visibility is driven by a new
`status_page:visibility_field_ids` custom-content key.
* Widget array parsing is fault-tolerant: a malformed item in one array
is dropped and logged rather than failing the whole response, so one bad
item can't hide a real ongoing incident.
* 429s from [incident.io](<http://incident.io>) are retried with
equal-jitter exponential backoff, respecting `Retry-After`, up to 2
retries.
* Nothing consumes this endpoint yet — it replaces no existing behavior
and changes nothing user-visible. Later PRs (this is PR 1 of a stack)
wire up consumers behind the `incidentIoStatusPage` ConfigCat flag.

Part of
[FE-4057](https://linear.app/supabase/issue/FE-4057/frontend-bannerbot-reconfigured)
— see Linear for full design context.

## Test plan

- [X] `pnpm --filter studio run typecheck`
- [X] `pnpm --filter studio run lint:ratchet`
- [X] `pnpm knip --workspace apps/studio`
- [X] `pnpm test:prettier`
- [X] `pnpm --filter studio exec vitest run status-page` — 44 tests
passing, including a regression test built from a real production
[incident.io](<http://incident.io>) payload that initially failed to
parse, and a compile-time type-safety regression test for the
array-parsing helper

Co-authored-by: Claude Code
[charis@supabase.io](<mailto:charis@supabase.io>)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a status page that displays ongoing incidents and maintenance,
with visibility and banner settings based on linked incident details.
* Status page data is available through a new API endpoint, with caching
for successful responses and degraded results.
* **Bug Fixes**
* Status page data can still display when some linked incident details
are unavailable; affected results are marked as degraded.
* Improved handling of invalid widget entries so they don’t prevent
valid items from being processed.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Code <charis@supabase.io>
2026-09-28 11:36:29 -04:00

131 lines
3.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"app:title": {
"type": ["string", "null"],
"description": "Render a custom HTML title for the site"
},
"dashboard_auth:custom_provider": {
"type": ["string", "null"],
"description": "Show a custom provider on the sign in page (Continue with X). Will be deprecated by dashboard_auth:custom_providers."
},
"dashboard_auth:custom_providers": {
"type": ["array", "null"],
"description": "Show a custom provider on the sign in page (Continue with X)",
"items": {
"type": "string"
}
},
"dashboard_auth:logo_link_url": {
"type": ["string", "null"],
"description": "The URL for the logo on the auth pages (sign in, forgot password, etc.) links to. Defaults to https://supabase.com"
},
"docs:row_level_security_guide_path": {
"type": ["string"],
"description": "The path to the row level security guide in the docs"
},
"organization:legal_documents": {
"type": ["array", "null"],
"description": "Renders a provided set of documents under the organization legal documents page",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"description": { "type": "string" },
"action": {
"type": "object",
"properties": {
"text": { "type": "string" },
"url": { "type": "string" }
}
}
}
}
},
"project_homepage:client_libraries": {
"type": "array",
"description": "Renders a provided set of client libraries under the project's home page",
"items": {
"type": "object",
"properties": {
"language": { "type": "string" },
"officialSupport": { "type": "boolean" },
"releaseState": { "type": "string" },
"docsUrl": { "type": "string" },
"gitUrl": { "type": "string" },
"altIconName": { "type": "string" }
},
"required": ["language", "officialSupport", "docsUrl"]
}
},
"project_homepage:example_projects": {
"type": ["array", "null"],
"description": "Renders a provided set of example projects under the project's home page",
"items": {
"type": "object",
"properties": {
"title": { "type": "string" },
"description": { "type": "string" },
"iconUrl": { "type": "string" },
"url": { "type": "string" }
}
}
},
"logs:default_query": {
"type": ["string", "null"],
"description": "Renders a default query when landing on the logs explorer"
},
"infra:cloud_providers": {
"type": ["array"],
"description": "Filters the valid cloud providers",
"items": {
"type": "string",
"enum": ["AWS", "AWS_K8S", "AWS_NIMBUS", "FLY"]
}
},
"infra:aws_nimbus_label": {
"type": "string",
"description": "The label of the AWS Nimbus provider"
},
"ssl:certificate_url": {
"type": "string",
"description": "The URL of the SSL certificate"
},
"status_page:visibility_field_ids": {
"type": "array",
"description": "Deployment-mode visibility field IDs on incident.io response incidents. Element 0 is this build's own custom-field ID (empty string = default Supabase build); the rest are other modes' field IDs.",
"items": {
"type": "string"
}
}
},
"required": [
"app:title",
"docs:row_level_security_guide_path",
"organization:legal_documents",
"project_homepage:client_libraries",
"project_homepage:example_projects",
"logs:default_query",
"infra:cloud_providers",
"infra:aws_nimbus_label",
"ssl:certificate_url"
],
"additionalProperties": false
}