Skip to content

feat(frontend): header chrome with live connection status#82

Merged
ImpulseB23 merged 2 commits intomainfrom
feat/header-chrome
Apr 19, 2026
Merged

feat(frontend): header chrome with live connection status#82
ImpulseB23 merged 2 commits intomainfrom
feat/header-chrome

Conversation

@ImpulseB23
Copy link
Copy Markdown
Owner

Adds a top header bar above the chat feed with:

  • Twitch platform badge + authenticated login
  • Live connection chip driven by existing sidecar_status events (spawning / waiting_for_auth / backoff / running / unhealthy / terminated)

Design

  • Purely presentational — no Tauri commands are invoked; a broken supervisor cannot brick the UI.
  • Pure state→label/color mapping extracted to lib/sidecarStatus so it unit-tests without touching Solid/Tauri runtime.
  • Follows perf constraints: no box-shadow, no filter, no animations on this header.

Tests

  • lib/sidecarStatus.test.ts covers each state transition and the pre-event null fallback.
  • pnpm typecheck, pnpm lint, pnpm test all green locally.

Roadmap

First slice of Phase 1 'UI chrome' from docs/roadmap.md. Timestamps, badge chips, username color will land in follow-up PRs.

Adds a top header bar showing the authenticated Twitch login alongside a
live connection indicator driven by the supervisor's sidecar_status
events (spawning, waiting_for_auth, backoff, running, unhealthy,
terminated).

The status→label/color mapping lives in a pure module (lib/sidecarStatus)
so it can be unit-tested without pulling in Solid or Tauri bindings.
Copilot AI review requested due to automatic review settings April 19, 2026 02:38
@github-actions github-actions bot added typescript Frontend/TypeScript changes size/m 100-500 lines changed labels Apr 19, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a lightweight header “chrome” above the chat feed in the SolidJS frontend, showing Twitch identity plus a live sidecar connection indicator driven by existing sidecar_status events.

Changes:

  • Added a pure indicatorFor(state) mapping in lib/sidecarStatus to convert supervisor states into UI label/color (unit-testable without Solid/Tauri).
  • Added Header component that listens to sidecar_status and renders a connection chip.
  • Updated App auth state handling to pass authenticated login through to the header and keep the SignIn flow working.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
apps/desktop/src/lib/sidecarStatus.ts Introduces sidecar state → indicator label/color mapping and related types.
apps/desktop/src/lib/sidecarStatus.test.ts Adds Vitest coverage for the indicator mapping behavior.
apps/desktop/src/components/Header.tsx New presentational header component; listens to sidecar_status and renders connection chip.
apps/desktop/src/App.tsx Integrates the header into the logged-in view and threads login through auth state.

Comment thread apps/desktop/src/components/Header.tsx Outdated
Comment thread apps/desktop/src/components/Header.tsx
Comment thread apps/desktop/src/App.tsx Outdated
Comment thread apps/desktop/src/lib/sidecarStatus.test.ts Outdated
- discriminated AuthStatus so logged_in always carries login
- Header.tsx no longer awaits inside onMount; tracks a disposed flag
  so a fast unmount doesn't leak the listener
- listen() rejection is caught and logged instead of unhandled
- sidecarStatus tests now assert color for every state
@ImpulseB23 ImpulseB23 merged commit 67a800a into main Apr 19, 2026
13 checks passed
@ImpulseB23 ImpulseB23 deleted the feat/header-chrome branch April 19, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m 100-500 lines changed typescript Frontend/TypeScript changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants