Skip to content

Add UptimeBar component for service health visualization - #127

Merged
jalexw merged 1 commit into
mainfrom
claude/ecstatic-allen-jwihfb
Oct 4, 2026
Merged

jalexw merged 1 commit into
mainfrom
claude/ecstatic-allen-jwihfb

Conversation

@jalexw

@jalexw jalexw commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new UptimeBar component for displaying service uptime history as a status-page style bar chart. One tick per period (typically a day), colored by status (operational, degraded, outage, maintenance, or no-data), with tooltips showing date, status, uptime percentage, and incident details.

Changes

  • New component: UptimeBar in src/components/ui/uptime-bar/

    • Renders a horizontal bar of colored ticks representing periods of service status
    • Displays overall uptime percentage in the header (averaged across periods with data)
    • Supports customizable sizing (sm/default/lg), shapes (rounded/pill/square), and status labels
    • Includes optional legend, footer labels, and click handlers for period interaction
    • Tooltips show detailed information per period (date, status, uptime %, incident description)
    • Fully accessible with ARIA labels and keyboard support (Enter/Space to activate)
  • Exports: UptimeBar, calculateUptimePercentage(), type definitions, and variant utilities

  • Storybook stories: Comprehensive examples including default, legend, all-operational, monitoring recently started, sizes, shapes, status page layout, custom formatting, and clickable periods

  • Updated exports: Added to src/components/ui/index.ts under the "Charts & Graphs" section

  • Version bump: 0.111.0 → 0.112.0

Implementation Details

  • Uses class-variance-authority for size and shape variants
  • Integrates with existing Tooltip component for period details
  • Calculates overall uptime by averaging periodUptime() across all non-"no-data" periods
  • Supports custom date formatting, tooltip rendering, and period click callbacks
  • Includes comprehensive Storybook interaction tests (hover, click, keyboard activation)

https://claude.ai/code/session_01AjwCRc9SvoEkGtg8Kd1Bdv

…) with Storybook stories

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjwCRc9SvoEkGtg8Kd1Bdv
@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
ui Ready Ready Preview Oct 4, 2026 1:06pm UTC

Request Review

@jalexw
jalexw merged commit 6ecdaaf into main Oct 4, 2026
12 checks passed
@jalexw
jalexw deleted the claude/ecstatic-allen-jwihfb branch October 4, 2026 15:43

This branch was successfully deployed

1 active deployment
Preview — 51580edb Deployed Oct 3, 2026 by vercel[bot]
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