Repository navigation
feat(client): apps/tui outlier B + shared @continuum/chat-view + clippy-grade lint gate - #1745
Merged
Merged
Conversation
…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
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.
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 ofapps/web/src/chat/.apps/tui— the terminal chat client (outlier B). Consumes the identical SDK seam asapps/web(StateConnectionREAD +Continuumchat/sendSEND), differing only in surface: stdin/readline + ANSI vs DOM + Lit. Node ≥22 ships a globalWebSocket, 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 overpackages/**,apps/web,apps/tui:typescript-eslintstrictTypeChecked+stylisticTypeChecked,projectService,--max-warnings 0(a warning is a failure, likeclippy -D warnings). Zeroany, no non-null assertions, no floating/misused promises, explicit boundary return types.noUncheckedIndexedAccesson all three client tsconfigs.Fail-loud / identity discipline
apps/tui's config resolveswsUrl+senderIdfrom--flags/env and fails loud naming exactly what's missing when either is absent — no invented WS URL, no mintedsenderId(identity pairing is tasks #37/#38). Same narrow-not-cast pattern asapps/web's resolver.Out of scope
sdk/typescriptis deliberately excluded from the gate pending the u64→bigintts-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:clientsgreen:--max-warnings 0)🤖 Generated with Claude Code