Skip to content

feat: SSE client + hello page + CSS palette + component test (#22, #23)#59

Merged
constk merged 1 commit into
developfrom
feat/22-23-frontend-content
Apr 27, 2026
Merged

feat: SSE client + hello page + CSS palette + component test (#22, #23)#59
constk merged 1 commit into
developfrom
feat/22-23-frontend-content

Conversation

@constk
Copy link
Copy Markdown
Owner

@constk constk commented Apr 27, 2026

Closes #22 + #23. Typed POST+ReadableStream SSE client primitive, hello page with /api/v1/health probe, CSS-variable palette (light + dark), 2-test Vitest suite.

#22, #23)

Bundles two tickets that share the same frontend touch surface:

#22 — typed SSE client primitive (frontend/src/lib/api/client.ts)
  - Port frontend/src/lib/api/client.js from Teller, rewritten as TS:
    generic over the parsed event shape (`SseEvent` interface), POST + body
    + AbortSignal supported, CRLF normalisation, malformed-chunk recovery
    (warns, doesn't throw).
  - Add typed SseError with optional status; createSession() and
    sendMessage<TEvent>(...) exports.
  - SseError uses an explicit field declaration instead of a parameter
    property — tsconfig's `erasableSyntaxOnly: true` rejects the latter.

#23 — hello page + CSS palette + sample component test
  - Replace the Vite welcome screen with a real App.tsx that fetches
    /api/v1/health and renders `loading | ok | error` states with
    semantic ARIA roles + data-testids.
  - Port the Teller CSS-variable palette to frontend/src/styles/palette.css
    (light + dark via [data-theme='dark']); index.css imports it; App.css
    consumes the tokens (no raw hex).
  - Drop the Vite welcome assets (react.svg, vite.svg, hero.png,
    public/icons.svg).
  - frontend/src/App.test.tsx (Vitest + jsdom + Testing Library): mock
    fetch for the happy path (renders the ok badge with version) and the
    500 path (renders the error message).

Both PRs in one commit since the App page consumes the styles and lib
shape; landing them separately would mean a half-shipped page in between.

Closes #22
Closes #23

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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