Repository navigation
feat(patterns): @continuum/patterns — consumer-neutral widget pattern contract - #1756
Merged
Merged
Conversation
…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
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.
The code spine of
ACTIVITY-ROOM-PATTERNS.md. Four primitives — Listing / Content(dispatch-by-purpose) / ContextPanel / Workspace — as framework-free shapes + aRenderTarget<Out>each surface implements (web / terminal / RAG / mobile).ContentRegistryis the purpose→renderer MIME table, fail-loud on an unknown purpose.Proof (3 green tests): the same
ListingViewrenders 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-viewnow exportsrosterListing(vm)— the roster IS theListingprimitive (outlier A).Framework first; visuals later. Next: room-purpose as data (#6/#89), then foundry as outlier B.
🤖 Generated with Claude Code