Skip to content

feat(client): apps/tui outlier B + shared @continuum/chat-view + clippy-grade lint gate - #1745

Merged
joelteply merged 1 commit into
canaryfrom
feat/client-tui-outlier-b
Jul 3, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/client-tui-outlier-b

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

Task #29 slice 5 — outlier-validate the new client SDK seam. Per CLAUDE.md's methodical process: build outlier A + a maximally-different outlier B; if the interface fits both without forcing → the seam is proven → write the generator → STOP.

  • packages/chat-view (@continuum/chat-view) — the shared, framework-free / DOM-free / ANSI-free projection: ChatState + chatStateFromEnvelope + chatViewModel + formatTimeOfDay. Single-sources the who/what/where message-row projection so web and tui never re-implement identity/time/presence derivation (compression principle). Extracted out of apps/web/src/chat/.
  • apps/tui — the terminal chat client (outlier B). Consumes the identical SDK seam as apps/web (StateConnection READ + Continuum chat/send SEND), differing only in surface: stdin/readline + ANSI vs DOM + Lit. Node ≥22 ships a global WebSocket, so the SDK socket classes run in Node with zero extra deps — the outlier-B proof that the seam is transport/surface-agnostic.
  • eslint.config.mjs — clippy-grade gate over packages/**, apps/web, apps/tui: typescript-eslint strictTypeChecked + stylisticTypeChecked, projectService, --max-warnings 0 (a warning is a failure, like clippy -D warnings). Zero any, no non-null assertions, no floating/misused promises, explicit boundary return types. noUncheckedIndexedAccess on all three client tsconfigs.

Fail-loud / identity discipline

apps/tui's config resolves wsUrl + senderId from --flags/env and fails loud naming exactly what's missing when either is absent — no invented WS URL, no minted senderId (identity pairing is tasks #37/#38). Same narrow-not-cast pattern as apps/web's resolver.

Out of scope

sdk/typescript is deliberately excluded from the gate pending the u64→bigint ts-rs codegen fix (task #120) — that's a Rust-side regen, not something to lint-gate around here. Fold the SDK in once #120 lands.

Verification

npm run check:clients green:

  • lint: clean (--max-warnings 0)
  • typecheck: clean across chat-view / web / tui
  • tests: chat-view 6 pass, tui 12 pass, web passes-with-no-tests (its projection logic lives in chat-view, tested there)

🤖 Generated with Claude Code

…py-grade lint gate

Task #29 slice 5 — outlier-validate the client SDK seam by building the
maximally-different renderer and proving the SAME seam fits it without forcing.

- Extract packages/chat-view (@continuum/chat-view): framework-free, DOM-free,
  ANSI-free projection — ChatState + chatStateFromEnvelope + chatViewModel +
  formatTimeOfDay. Single-sources the who/what/where message-row projection
  between web (outlier A, Lit DOM) and tui (outlier B, ANSI), so neither surface
  re-implements identity/time/presence derivation (compression principle).

- apps/tui: terminal chat client. Consumes the IDENTICAL SDK seam as apps/web —
  StateConnection READ + Continuum chat/send SEND — differing ONLY in surface
  (stdin/readline + ANSI vs DOM + Lit). Node >=22 has global WebSocket, so the
  SDK socket classes run in Node with zero extra deps: the outlier-B proof that
  the seam is transport/surface-agnostic. Config resolves from --flags/env and
  fails loud when wsUrl or senderId is absent — no fabricated identity
  ([[fallbacks-are-illegal-fail-loud]], [[persona-is-a-client]]).

- eslint.config.mjs: clippy-grade gate over packages/**, apps/web, apps/tui.
  typescript-eslint strictTypeChecked + stylisticTypeChecked, projectService,
  --max-warnings 0 (a warning is a failure, the way clippy -D warnings blocks a
  Rust change). Zero `any`, no non-null assertions, no floating/misused promises,
  explicit boundary return types. noUncheckedIndexedAccess on all three client
  tsconfigs so index access is `T | undefined` (matching runtime). SDK is out of
  scope pending the u64->bigint ts-rs regen fix (task #120).

Gate green: lint clean, typecheck clean, chat-view 6 + tui 12 tests pass,
web passes-with-no-tests (its projection logic lives in chat-view).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 07a7984 into canary Jul 3, 2026
2 checks passed
@joelteply
joelteply deleted the feat/client-tui-outlier-b branch July 3, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant