Skip to content

feat(web): P3 — dispatch the center panel by room purpose (foundry-ready) - #1766

Merged
joelteply merged 2 commits into
canaryfrom
feat/web-content-dispatch
Jul 4, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/web-content-dispatch

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

First web slice of the WorkspaceShell (plan P3): the three-panel surface renders its center through the pattern Content registry, keyed on the room's purpose, instead of hardcoding the conversation.

  • render/parts.ts — shared member-card + message-row fragments (one place).
  • content/registry.ts — the web Content registry; chat registered → conversation; foundry registers the same way, fail-loud on unknown purpose.
  • renderChat projects via chatWorkspace(vm) + routes the center on content.purpose.

Chat renders identically (3 tests, typecheck, lint, bundle all green). Foundry-ready: a foundry renderer + foundry-kind subscription lights up the model list in the same shell.

Live-verified it correctly REQUIRES the core to send purpose (#1757); a stale pre-#1757 core sends none and the app fails loud rather than mis-render (deploy-skew signal).

🤖 Generated with Claude Code

…ady)

The first web slice of the WorkspaceShell (LIVE-INTERFACE-BUILD-PLAN.md P3): the
three-panel surface now renders its center through the pattern Content registry,
keyed on the focused room's `purpose`, instead of hardcoding the conversation.

- render/parts.ts — the shared member-card + message-row fragments (one place,
  reused by the roster Listing and the Content renderers).
- content/registry.ts — the web Content registry (createContentRegistry<TemplateResult>),
  `chat` registered → the conversation. Foundry's model-list renderer registers the
  same way, keyed "foundry"; the shell doesn't change. Fail-loud on unknown purpose.
- renderChat projects via chatWorkspace(vm) and routes the center on
  content.purpose — so the same shell renders chat today and foundry next.

Chat renders identically (3 web tests green, typecheck + lint clean, bundle builds).
Foundry-ready: registering a "foundry" Content renderer + subscribing to the foundry
kind lights up the model list in the same shell, no layout change.

Note: verified live that this correctly REQUIRES the core to send `purpose` (#1757) —
a stale pre-#1757 core sends none, and the app fails loud rather than mis-render (a
real deploy-skew signal; the running dev core needs a rebuild to render the new app).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
)

Folds in the #1766 review's robustness findings so a version-skew is honest, not a
silent hang:
- chatViewModel defaults an absent `purpose` to "chat" — the legitimate additive-
  field back-compat (a ChatViewState IS a chat activity; server default is "chat";
  a foundry room sends ForgeViewState, never a purpose-less chat). This also lets the
  app render against an older core that predates #1757.
- ChatWidget wraps renderChat in an error boundary → a render throw (e.g. the Content
  registry hitting a genuinely unregistered purpose) shows a VISIBLE .render-error
  panel instead of a swallowed Lit update that leaves a stuck "Connecting…". Fail
  loud WHERE it's seen ([[fallbacks-are-illegal-fail-loud]], [[solve-for-public-users]]).
- renderChat uses a stable aria-label ("conversation") instead of leaking the dispatch
  key into the a11y name.

Verified live via CDP against the running core: the three-panel chat renders (roster
member cards + conversation + compose). chat-view 14 + web 3 tests green, lint clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 64913b8 into canary Jul 4, 2026
2 checks passed
@joelteply
joelteply deleted the feat/web-content-dispatch branch July 4, 2026 05:18
@joelteply
joelteply restored the feat/web-content-dispatch branch August 21, 2026 12: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