feat(constructs): status page component configuration and supportLink - #1479
Open
tnolet wants to merge 2 commits into
Open
feat(constructs): status page component configuration and supportLink#1479tnolet wants to merge 2 commits into
tnolet wants to merge 2 commits into
Conversation
- `StatusPageV3Component` takes a `configuration` typed by `type`: a
SERVICE accepts `{ showHistoricalData?: boolean }`, a GROUP accepts
`{ expandedByDefault?: boolean, showHistoricalData?: boolean }`. The
props are a discriminated union, so the wrong shape fails to compile;
`validate()` repeats the check at runtime for loosely typed callers.
- Import codegen generates `configuration` only for values that differ
from the backend defaults.
- `StatusPageV3` gains `supportLink`, shown in the page footer next to
the privacy policy and terms of service links.
Requires the matching backend change (checkly/monorepo).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNTMz7yhDuvjdoK7ajzKFp
`expandedByDefault` and `showHistoricalData` are props on `StatusPageV3Component` rather than a nested `configuration` object. The props stay a discriminated union on `type`: `expandedByDefault` is only accepted with `type: 'GROUP'` (declared `never` on the SERVICE branch so the omitted-type case is caught too). `synthesize()` folds whichever settings are set into the backend's `configuration`, leaving omitted ones to the backend defaults. Codegen emits the flat props. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XNTMz7yhDuvjdoK7ajzKFp
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.
Summary
Companion to the backend PR in checkly/monorepo (
feat/status-page-component-configuration-support-link, #4164); deploys need that backend change to accept the new fields.Component settings on
StatusPageV3Componentconfigurationis surfaced as top-level props, typed bytypethrough a discriminated union:type: 'SERVICE'(or omitted):showHistoricalData?: boolean, backend defaulttruetype: 'GROUP':expandedByDefault?: boolean(defaultfalse) andshowHistoricalData?: boolean(defaulttrue)expandedByDefaultwithouttype: 'GROUP'fails to compile (it is declaredneveron the SERVICE branch so the omitted-type case is caught as well).validate()repeats the check at runtime for JavaScript and loosely typed callers.synthesize()folds whichever settings are set into the API'sconfiguration; omitted ones are left to the backend defaults, and nothing set sends no configuration.constructs/internal/status-page-v3-component-configuration.ts) shared by validation, synthesis and codegen.StatusPageV3.supportLinkprivacyPolicyLinkandtermsOfServiceLink, synthesized and generated on import.Docs
Test plan
status-page-v3.spec.tsandstatus-page-v3-codegen.spec.ts(17 tests)expandedByDefaultrejected both withouttypeand withtype: 'SERVICE'; accepted withtype: 'GROUP'tsc --noEmitand ESLint cleanpnpm --filter checkly run prepare+pnpm run sync:skills: no skill diff🤖 Generated with Claude Code
https://claude.ai/code/session_01XNTMz7yhDuvjdoK7ajzKFp