Skip to content

feat(constructs): status page component configuration and supportLink - #1479

Open
tnolet wants to merge 2 commits into
mainfrom
feat/status-page-component-configuration-support-link
Open

feat(constructs): status page component configuration and supportLink#1479
tnolet wants to merge 2 commits into
mainfrom
feat/status-page-component-configuration-support-link

Conversation

@tnolet

@tnolet tnolet commented Sep 11, 2026

Copy link
Copy Markdown
Member

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 StatusPageV3Component

  • The backend's per-type configuration is surfaced as top-level props, typed by type through a discriminated union:
    • type: 'SERVICE' (or omitted): showHistoricalData?: boolean, backend default true
    • type: 'GROUP': expandedByDefault?: boolean (default false) and showHistoricalData?: boolean (default true)
  • expandedByDefault without type: 'GROUP' fails to compile (it is declared never on 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's configuration; omitted ones are left to the backend defaults, and nothing set sends no configuration.
  • Import codegen generates a setting only when its value differs from the backend default, so an import of an untouched page stays as terse as before.
  • The per-type defaults live in one internal table (constructs/internal/status-page-v3-component-configuration.ts) shared by validation, synthesis and codegen.
new StatusPageV3Component('regions', {
  statusPage,
  type: 'GROUP',
  name: 'Regions',
  displayOrder: 1,
  expandedByDefault: true,
})

StatusPageV3.supportLink

  • New optional footer link next to privacyPolicyLink and termsOfServiceLink, synthesized and generated on import.

Docs

  • AI-context reference for supporting constructs documents the settings and their defaults. The published skill needed no changes.

Test plan

  • status-page-v3.spec.ts and status-page-v3-codegen.spec.ts (17 tests)
  • Compile-time probe: expandedByDefault rejected both without type and with type: 'SERVICE'; accepted with type: 'GROUP'
  • tsc --noEmit and ESLint clean
  • pnpm --filter checkly run prepare + pnpm run sync:skills: no skill diff

🤖 Generated with Claude Code

https://claude.ai/code/session_01XNTMz7yhDuvjdoK7ajzKFp

tnolet and others added 2 commits September 11, 2026 12:02
- `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
@tnolet
tnolet requested a review from sorccu September 11, 2026 14:17
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.

1 participant