Commit Graph
38 Commits
Author SHA1 Message Date
Ian Troisi 30e8cfc9ec Add custom domain support for published status pages.
Fixes #3647
2026-06-07 22:37:24 -04:00
gorkem-bwl bab65770ce refactor(status-page): simplify renderer lookup, extract route prefix, memoize wrapper style
Four small follow-ups from a code review pass:

1. Drop the redundant `?? THEMED_RENDERERS[DEFAULT_STATUS_PAGE_THEME]`
   fallback in Status/index.tsx — the map is now a total Record, so the
   first lookup cannot return undefined.
2. Extract the literal "/status/public" into PUBLIC_STATUS_PAGE_PREFIX in
   Types/StatusPage.ts and reuse from the three runtime call sites
   (Status/index.tsx, HeaderStatusPageControls.tsx, StatusPagesTable.tsx).
   The Routes/index.tsx route definition keeps its string literal — the
   route table is otherwise all literals and the prefix only matters when
   it's interpolated.
3. Delete two narrating comments above the public/admin branches in
   Status/index.tsx — the JSX is self-describing.
4. Move the inline `style` object construction in StatusPageThemeProvider
   into the existing useMemo so the wrapper div receives a stable style
   reference. The previous spread defeated the surrounding memoization on
   every render.
2026-04-28 16:52:16 -04:00
gorkem-bwl ed3645c3d0 refactor(status-page): drop legacy single-design renderer and CSS overrides
The 4 themed renderers (refined, modern, bold, editorial) cover every
StatusPageTheme value and the model defaults to "refined", so the legacy
fallback path in Status/index.tsx was unreachable in practice.

Removing it lets us delete:

- theme-overrides.css (the only remaining CSS file in StatusPage)
- StatusBar / MonitorsList / InfrastructureMetrics (only the legacy
  fallback consumed them)
- The .sp-* className hooks that wired CSS rules into the components

Pure sx via the per-theme styles.ts recipes is now the single source of
truth for every status page surface. Net diff is -801 / +42.

Status/index.tsx now resolves a renderer from the theme map (falling back
to the default theme) and keeps the public-route and admin-preview
branches it already had.
2026-04-28 16:38:35 -04:00
gorkem-bwl 944ee74a1d feat(status-page): four selectable themes for the public status page
Adds four fully-designed visual themes for the public status page
(refined | modern | bold | editorial) with a light/dark mode selector,
admin preview in a mock browser frame, and a shared theme provider
that keeps the component tree unified while letting each theme own
its visual identity.

## Selectable themes
- Refined — clean, flat cards, soft shadows, colored status dot.
- Modern — flat surfaces with a pulsing status dot and staggered
  fade-in cards.
- Bold — conic-gradient logo, 34px hero title with a check disc,
  subtle dual-radial glow on dark mode, accent-green hover border.
- Editorial — serif headings, narrow newspaper column, 'Service
  Report' eyebrow + title, flat rectangular badges and dateline.

## Architecture
- Single `StatusPageThemeProvider` hosts CSS custom-property tokens
  per theme and resolves light/dark based on admin-forced mode,
  falling back to `prefers-color-scheme` with a matchMedia listener.
- Each theme owns only its `*StatusPage.tsx` + scoped CSS file.
  The heatmap, histogram, and infrastructure renderers are shared
  across all four themes (parameterized by a `classPrefix`) to avoid
  the 12-file duplication the initial draft had.
- Renderer lookup table in `Status/index.tsx` replaces a 4-way
  ternary chain; unknown themes fall through to the legacy renderer.
- `resolveOverallStatus`, `statusBadgeKey`, `monoFirstChar`, and
  `monitorBadgeTone` are extracted to `themes/shared/overallStatus.tsx`.

## Admin UX
- `ThemePicker` uses the project's `RadioWithDescription` and
  `Select` components — one radio card per theme plus an Auto/
  Light-only/Dark-only mode dropdown.
- `BrowserFrame` wraps the preview in the admin panel with a mock
  chrome (traffic lights + URL bar) that adopts the status page's
  theme tokens. Edge-to-edge fill with no gray bleed.
- Public route renders the theme directly on the viewport with the
  document body painted to the theme background, reverted on unmount.

## Performance & polish
- Histogram's derived stats (padded array, max, avg, peak) are
  memoized on `checks`; `max` is reused for `peak` instead of
  computing twice.
- Editorial's dateline is wrapped in `useMemo` so the 10s poll
  doesn't rerender "April 23, 2026" as a changing string.
- Provider's `setSystemMode` reconciliation uses the updater form
  to avoid an extra render when the value is unchanged.
- `monoFirstChar` no longer uses a non-null assertion.

## Form plumbing
- `useStatusPageForm` defaults include `theme` + `themeMode`.
- `Validation/statusPage.ts` accepts both as optional zod enums.
- `Pages/StatusPage/Create/index.tsx` appends both to FormData on
  create and update.

## CLAUDE.md
- Dev port note: local client runs on 10001 (5173 is used by a
  different local project); server `CLIENT_HOST` is set to match.
2026-04-23 22:51:40 -04:00
SkyKingPX 5920b92869 Run npm format 2026-04-16 19:55:17 +02:00
SkyKingPX 7b164e4df5 Make requested changes 2026-04-16 13:37:54 +02:00
SkyKingPX a8339c0169 Improve status bar messages on public status pages 2026-04-14 19:32:05 +02:00
mannilakash 622446c308 fix: refactoring monitorsList and minor fixes based on feedback 2026-03-17 15:01:30 -04:00
mannilakash d3d00353a1 fix: minor refactoring infrastructureMetrics 2026-03-17 06:04:42 -04:00
mannilakash 894b6a7a7d feat: status-page infra section FE 2026-03-16 17:46:13 -04:00
Alex Holliday d45e6ec97c remove v2 dir 2026-02-20 18:13:39 +00:00
Alex Holliday fd2c54d3d3 remove unused 2026-02-13 20:42:26 +00:00
Alex Holliday 4b1c588f5a extract header 2026-02-11 20:11:22 +00:00
Alex Holliday f2d2687d2a responsive 2026-02-03 22:58:09 +00:00
Alex Holliday a80df60fc1 handle delete 2026-02-03 21:14:16 +00:00
Alex Holliday 6bc8a521c9 logo 2026-02-03 19:24:50 +00:00
Alex Holliday 1fefb038f0 cleanup 2026-02-02 22:15:57 +00:00
Alex Holliday 85190992c7 format 2026-02-02 22:02:14 +00:00
Alex Holliday efe87b599f add missing / 2026-02-02 22:01:42 +00:00
Alex Holliday ed1bcf97da monitor name overflow 2026-02-02 21:57:07 +00:00
Alex Holliday 56ead03416 breadcrumbs 2026-02-02 21:51:06 +00:00
Alex Holliday a912a5ebb8 monitors lis tskeleton 2026-02-02 20:42:27 +00:00
Alex Holliday 0fd4173816 status bar 2026-02-02 20:39:16 +00:00
gorkem-bwl 7140d436a5 style: apply Prettier formatting 2026-01-15 23:39:26 -05:00
gorkem-bwl ba0c89fc6c feat: migrate icons from custom SVGs and MUI to Lucide React
Replace custom SVG icons and @mui/icons-material with lucide-react for consistent,
lightweight icon management across the application.

## Changes
- Add lucide-react package and remove @mui/icons-material
- Create theme-aware Icon wrapper component with color resolution
- Create iconMap.js for legacy icon name mappings
- Migrate 64 components to use new Icon component
- Remove 74 unused SVG files from assets/icons/

## Benefits
- Consistent icon API across the application
- Smaller bundle size with tree-shakeable imports
- Theme-aware color support via MUI theme paths
- Simpler maintenance with single icon library
2026-01-15 23:37:50 -05:00
Alex Holliday 940247b7bf teamid 2026-01-14 21:47:37 +00:00
Alex Holliday 25d1039376 update pagespeed 2026-01-12 23:57:39 +00:00
Alex Holliday 4d89213e1c Add typescript config, move to v1 dir 2025-09-25 10:11:41 -07:00
anton.strover 27d613b594 remove carried away-ness 2025-08-29 10:49:22 +01:00
mohadeseh safari a29282801a Format code for PR submission (#2150) 2025-06-20 19:06:57 -04:00
mohadeseh safari fc1f4fc142 Modify 2025-06-20 18:59:50 -04:00
Alex Holliday 50986d4493 use hooks 2025-06-12 12:44:46 +08:00
Alex Holliday 274595a533 purge distributed uptime 2025-06-09 10:17:09 +08:00
Asim Ahmed Siddiqui e7ed85405b Changes: Made showURL boolean and removed console log 2025-05-26 00:19:49 +05:30
Asim Ahmed Siddiqui e8d636dcfd Fix: Optionally show IP/URL of the monitor in status page 2025-05-23 12:40:47 +05:30
Nicholas Liu f31669b341 Changed publicUrl to constant uptime type and changed "Public link" text 2025-05-05 10:23:02 -07:00
Nicholas Liu cb113f642a Added Public Link Button on Status Page if published 2025-05-04 20:23:59 -07:00
Alex Holliday 8b7e3c650b restore repo structure 2025-04-20 11:29:53 -07:00