Skip to content

feat(patterns): @continuum/patterns — consumer-neutral widget pattern contract - #1756

Merged
joelteply merged 1 commit into
canaryfrom
feat/pattern-primitives
Jul 4, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/pattern-primitives

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The code spine of ACTIVITY-ROOM-PATTERNS.md. Four primitives — Listing / Content(dispatch-by-purpose) / ContextPanel / Workspace — as framework-free shapes + a RenderTarget<Out> each surface implements (web / terminal / RAG / mobile). ContentRegistry is the purpose→renderer MIME table, fail-loud on an unknown purpose.

Proof (3 green tests): the same ListingView renders to both a web target and a RAG target (eyes-and-mind consumer-neutrality); Content dispatches by purpose + throws on unknown; a full Workspace composes with zero per-activity code.

Chat expressed on it: @continuum/chat-view now exports rosterListing(vm) — the roster IS the Listing primitive (outlier A).

Framework first; visuals later. Next: room-purpose as data (#6/#89), then foundry as outlier B.

🤖 Generated with Claude Code

…tern contract

The code spine of docs/architecture/ACTIVITY-ROOM-PATTERNS.md. A widget is a
PATTERN — a projection of who/what/where that renders to any consumer — not a
component. This package holds only the shapes and the render contract; no DOM, no
ANSI, no RAG specifics, no deps (mirrors @continuum/chat-view's neutrality).

The four primitives everything decomposes into:
- Listing      — one repeating-list shape reused for users, rooms/DMs, HF-models…
- Content      — the centre, dispatched by room PURPOSE (a MIME-type handler)
- ContextPanel — right-hand activity widgets (often Listings)
- Workspace    — the shell: rooms-Listing (tab bar == channel-attention) + left
                 listings + focused-room content + context

RenderTarget<Out> is the consumer-neutral render contract each surface implements
— web (Lit TemplateResult), terminal (ANSI string), the Rust persona RAG renderer
(grounding block), mobile (native). ContentRegistry is the purpose→renderer MIME
table; render() FAILS LOUD on an unregistered purpose (an unknown activity is a
wiring bug, never a silent blank — [[fallbacks-are-illegal-fail-loud]]).

Proof (patterns.spec.ts, 3 green): the SAME ListingView renders correctly to both
a web (HTML) target and a RAG (grounding) target — the eyes-and-mind consumer-
neutrality thesis; Content dispatches by purpose and throws on an unknown one; a
full Workspace composes from the primitives with zero per-activity code.

Chat expressed on the framework: @continuum/chat-view now exports rosterListing(vm)
— the roster IS the Listing primitive (outlier A), so the same rows render as web
member-cards, an ANSI list, or a persona's grounding block.

Framework first (visuals later — "universe" names a design a theme picks). Next
bricks: room-purpose as data (#6/#89) so Content dispatches on it; foundry as
outlier B; then scada/academy/settings/browser register.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 709a020 into canary Jul 4, 2026
2 checks passed
@joelteply
joelteply deleted the feat/pattern-primitives branch July 4, 2026 01:50
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