feat(github-status): add GitHub status indicator with resolved state support#18
Merged
Conversation
- Adds types, storage definitions, API fetch/transform for stauspage api - alarm-based background polling with configurable options
- StatusBanner with state machine and severity-based colors - StatusStrip as collapsed 3px severity bar with expand affordance - StatusPopover with per-incident detail view, click-outside/Escape dismiss - Content script match pattern expanded to all GitHub pages - Status indicator feature init with storage watchers and context cleanup
- fix collapse/expand by managing dismissed state locally in StatusBanner - fix header selector for current GitHub markup - collapsed strip uses banner bg colors, centered "Incident" label - options page: transparent bg, collapsible token help section
- add header.HeaderMktg selector for signed-out GitHub pages - guard dismissed IDs with Array.isArray to handle unexpected storage values - use Set for dismissed lookup instead of .includes()
…banner - collapsed boolean replaces dismissed incident ID tracking - kill pruneDismissedIncidents and its tests - background clears collapsed when incidents resolve - banner is now drawer card with accent bar, severity dot, pill button, X - popover anchors near the Details button not the page edge
… styles - move all status components from inline styles to blocks and directives - collapsed indicator now a centered pill with dot, label, and chevron-down - details popover right-aligned off the button instead of left - rename .label to .pill-text to dodge Primer CSS collision
- watch collapsedStorage in content script for cross-tab sync - catch unhandled promise rejections in background service worker - derive banner subtitle from actual incident status instead of hardcoding - separate fetch/parse try-catch blocks and add "parse-error" result reason
- validate API values against typed Sets instead of blind as casts - sanitize poll interval before passing to browser.alarms - revert UI state on storage write failures in StatusBanner and options - surface status settings load errors to user instead of swallowing
…overage - extract shared color functions - differentiate component status colors from indicator severity colors - remove unused StoredStatus wrapper, store GitHubStatusData directly - guard against duplicate containers on content script re-injection - guard timeSince against NaN/negative values - immediate re-poll when interval changes - add 11 tests
- add StatusBannerHost.svelte to own $state and storage subscriptions - make StatusBanner pure presentational with callback props - add error logging to hydration and storage write catch handlers
- add resolved incident display with green accent via --fgColor-success - banner prioritizes active incidents, falls back to resolved state - strip accepts resolved prop for green dot and "Resolved" label - popover shows per-incident resolved timestamp with fallback chain - replace hardcoded dark-mode hex with Primer CSS custom properties - use Primer button tokens for Details button styling
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.
Context
GitHub's status page API exposes incident data but there's no native in-page indicator when things are broken.
This feature gives users immediate visibility into GitHub outages while they're browsing, without needing to check
githubstatus.com separately.
The content script match pattern was widened from
*/actions*to*/*so the status banner renders on all GitHub pages, not just Actions.Changes Made
Data layer
src/lib/github-status.tstransformSummaryvalidates and normalizes the raw API responsefetchGitHubStatuswith discriminated union result typetimeSince,indicatorColor,componentStatusColor,RESOLVED_COLORBackground polling
src/entrypoints/background.tsUI components
StatusBannerHost— reactive wrapper that hydrates from storage and watches for changesStatusBanner— main banner with severity derivation, affected component summary, and dismiss/expandStatusPopover— details dropdown with per-incident component breakdown and external linksStatusStrip— collapsed pill view with expand affordanceOptions page
src/entrypoints/options/App.svelteHousekeeping
biocheckscript,.git-blame-ignore-revsentry for formatting commit*://github.com/*alarmspermission to manifestTests
src/lib/github-status.test.tstransformSummary: valid statuses, edge cases, nulls, unknowns, resolved_at handlingfetchGitHubStatus: network errors, API errors, parse errors, resolved incident flow, URL verificationTesting Notes
pnpm test— all 19 tests passpnpm build— production build succeeds