Repository navigation
feat(web): P3 — dispatch the center panel by room purpose (foundry-ready) - #1766
Merged
Merged
Conversation
…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
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.
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;chatregistered → conversation; foundry registers the same way, fail-loud on unknown purpose.renderChatprojects viachatWorkspace(vm)+ routes the center oncontent.purpose.Chat renders identically (3 tests, typecheck, lint, bundle all green). Foundry-ready: a
foundryrenderer + 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