Skip to content

Commit f39faaa

Browse files
bloveclaude
andauthored
feat(cockpit): add render and chat product sections (#68)
* feat(cockpit): add render/spec-rendering capability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add render/element-rendering capability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add render/state-management capability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add render/registry capability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add render/repeat-loops capability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add render/computed-functions capability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/messages capability Adds the messages capability demonstrating ChatMessagesComponent, ChatInputComponent, and ChatTypingIndicatorComponent primitives. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/input capability Adds the input capability showcasing ChatInputComponent with keyboard handling, disabled state, custom placeholder, and loading indicators. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/interrupts capability Adds the interrupts capability demonstrating human-in-the-loop approval gates using LangGraph interrupt() and ChatInterruptPanelComponent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/tool-calls capability Adds the tool-calls capability with search, calculator, and weather tools demonstrating ChatToolCallsComponent and ChatToolCallCardComponent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/subagents capability Adds the subagents capability demonstrating orchestrator pattern with ChatSubagentsComponent and ChatSubagentCardComponent for tracking research, analysis, and summary subagents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/threads capability Adds the threads capability demonstrating multi-thread conversation management with ChatThreadListComponent for creating and switching threads. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/timeline capability Adds the timeline capability demonstrating conversation checkpoint navigation with ChatTimelineSliderComponent for time-travel debugging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/generative-ui capability Adds the generative-ui capability demonstrating dynamic UI generation within chat messages using ChatGenerativeUiComponent and provideRender. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/debug capability Adds the debug capability using ChatDebugComponent with a multi-step graph (generate/process/summarize) for rich state inspection, diffs, and timeline debugging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add chat/theming capability Adds the theming capability demonstrating CSS custom property customization with CHAT_THEME_STYLES and a runtime theme picker supporting dark, light, ocean, and forest presets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(cockpit): add render and chat matrix tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(cockpit): add render and chat footprint tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(cockpit): add render product docs pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(cockpit): add chat product docs pages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cockpit): rewrite render examples as standalone demos without chat dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cockpit): update chat examples to agent() API from @cacheplane/angular Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): add render and chat products to manifest and capability registry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): register render and chat modules in route resolution and update tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(cockpit): add cross-references from existing capabilities to chat Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cockpit): add package.json files for Nx project discovery Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cockpit): use CockpitProduct type in route handler for render/chat support The product type cast was hardcoded to 'deep-agents' | 'langgraph', causing 404s when navigating to render or chat capabilities. * docs: add streaming simulation design spec for render examples * docs: add streaming simulation implementation plan * feat(cockpit): add StreamingSimulator and StreamingTimelineComponent Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cockpit): validate setSpeed input in StreamingSimulator * feat(cockpit): rewrite spec-rendering with streaming simulation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cockpit): add protected modifier and clean up stale store in spec-rendering * feat(cockpit): rewrite element-rendering with streaming simulation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): rewrite state-management with streaming simulation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): rewrite registry with streaming simulation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): rewrite repeat-loops with streaming simulation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(cockpit): rewrite computed-functions with streaming simulation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(cockpit): update render example e2e tests for streaming simulation * fix(cockpit): add bindings/emit/loading inputs to all render demo components * fix(cockpit): use h-full instead of h-screen for iframe-compatible height * fix(cockpit): make shell full viewport height with scrollable sidebar * fix(cockpit): render children in DemoHeadingComponent across all render examples * feat(cockpit): add skeleton shimmer effect to all render demo components * feat(cockpit): add interactive controls panels to element-rendering, state-management, and repeat-loops demos * fix(cockpit): move controls below JSON pane and add auto-scroll to streaming JSON Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cockpit): fix visibility toggle — use $state condition and Angular signal for reactivity * fix(cockpit): review fixes — sandbox eval, remove unused import, responsive mobile layout - Sandbox eval() in tool-calls graph.py with restricted builtins - Remove unused CHAT_THEME_STYLES import from theming component - Make all 6 render examples responsive: stack vertically on mobile --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a3326f8 commit f39faaa

452 files changed

Lines changed: 11112 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/cockpit/scripts/capability-registry.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
export interface Capability {
66
id: string;
7-
product: 'langgraph' | 'deep-agents';
7+
product: 'langgraph' | 'deep-agents' | 'render' | 'chat';
88
topic: string;
99
angularProject: string;
1010
port: number;
@@ -27,6 +27,24 @@ export const capabilities: readonly Capability[] = [
2727
{ id: 'da-memory', product: 'deep-agents', topic: 'memory', angularProject: 'cockpit-deep-agents-memory-angular', port: 4313, pythonDir: 'cockpit/deep-agents/memory/python', graphName: 'da-memory' },
2828
{ id: 'skills', product: 'deep-agents', topic: 'skills', angularProject: 'cockpit-deep-agents-skills-angular', port: 4314, pythonDir: 'cockpit/deep-agents/skills/python', graphName: 'skills' },
2929
{ id: 'sandboxes', product: 'deep-agents', topic: 'sandboxes', angularProject: 'cockpit-deep-agents-sandboxes-angular', port: 4315, pythonDir: 'cockpit/deep-agents/sandboxes/python', graphName: 'sandboxes' },
30+
// Render capabilities
31+
{ id: 'spec-rendering', product: 'render', topic: 'spec-rendering', angularProject: 'cockpit-render-spec-rendering-angular', port: 4401, pythonDir: 'cockpit/render/spec-rendering/python', graphName: 'spec-rendering' },
32+
{ id: 'element-rendering', product: 'render', topic: 'element-rendering', angularProject: 'cockpit-render-element-rendering-angular', port: 4402, pythonDir: 'cockpit/render/element-rendering/python', graphName: 'element-rendering' },
33+
{ id: 'state-management', product: 'render', topic: 'state-management', angularProject: 'cockpit-render-state-management-angular', port: 4403, pythonDir: 'cockpit/render/state-management/python', graphName: 'state-management' },
34+
{ id: 'r-registry', product: 'render', topic: 'registry', angularProject: 'cockpit-render-registry-angular', port: 4404, pythonDir: 'cockpit/render/registry/python', graphName: 'r-registry' },
35+
{ id: 'repeat-loops', product: 'render', topic: 'repeat-loops', angularProject: 'cockpit-render-repeat-loops-angular', port: 4405, pythonDir: 'cockpit/render/repeat-loops/python', graphName: 'repeat-loops' },
36+
{ id: 'computed-functions', product: 'render', topic: 'computed-functions', angularProject: 'cockpit-render-computed-functions-angular', port: 4406, pythonDir: 'cockpit/render/computed-functions/python', graphName: 'computed-functions' },
37+
// Chat capabilities
38+
{ id: 'c-messages', product: 'chat', topic: 'messages', angularProject: 'cockpit-chat-messages-angular', port: 4501, pythonDir: 'cockpit/chat/messages/python', graphName: 'c-messages' },
39+
{ id: 'c-input', product: 'chat', topic: 'input', angularProject: 'cockpit-chat-input-angular', port: 4502, pythonDir: 'cockpit/chat/input/python', graphName: 'c-input' },
40+
{ id: 'c-interrupts', product: 'chat', topic: 'interrupts', angularProject: 'cockpit-chat-interrupts-angular', port: 4503, pythonDir: 'cockpit/chat/interrupts/python', graphName: 'c-interrupts' },
41+
{ id: 'c-tool-calls', product: 'chat', topic: 'tool-calls', angularProject: 'cockpit-chat-tool-calls-angular', port: 4504, pythonDir: 'cockpit/chat/tool-calls/python', graphName: 'c-tool-calls' },
42+
{ id: 'c-subagents', product: 'chat', topic: 'subagents', angularProject: 'cockpit-chat-subagents-angular', port: 4505, pythonDir: 'cockpit/chat/subagents/python', graphName: 'c-subagents' },
43+
{ id: 'c-threads', product: 'chat', topic: 'threads', angularProject: 'cockpit-chat-threads-angular', port: 4506, pythonDir: 'cockpit/chat/threads/python', graphName: 'c-threads' },
44+
{ id: 'c-timeline', product: 'chat', topic: 'timeline', angularProject: 'cockpit-chat-timeline-angular', port: 4507, pythonDir: 'cockpit/chat/timeline/python', graphName: 'c-timeline' },
45+
{ id: 'c-generative-ui', product: 'chat', topic: 'generative-ui', angularProject: 'cockpit-chat-generative-ui-angular', port: 4508, pythonDir: 'cockpit/chat/generative-ui/python', graphName: 'c-generative-ui' },
46+
{ id: 'c-debug', product: 'chat', topic: 'debug', angularProject: 'cockpit-chat-debug-angular', port: 4509, pythonDir: 'cockpit/chat/debug/python', graphName: 'c-debug' },
47+
{ id: 'c-theming', product: 'chat', topic: 'theming', angularProject: 'cockpit-chat-theming-angular', port: 4510, pythonDir: 'cockpit/chat/theming/python', graphName: 'c-theming' },
3048
] as const;
3149

3250
export function findCapability(id: string): Capability | undefined {

apps/cockpit/src/components/cockpit-shell.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ export function CockpitShell({
5757
return (
5858
<main
5959
aria-label="Cockpit shell"
60-
className="grid md:grid-cols-[16rem_minmax(0,1fr)] min-h-screen"
60+
className="grid md:grid-cols-[16rem_minmax(0,1fr)] h-screen overflow-hidden"
6161
data-hydrated={isHydrated ? 'true' : 'false'}
6262
>
6363
{/* Desktop sidebar — hidden on mobile */}
64-
<div className="hidden md:block">
64+
<div className="hidden md:block overflow-y-auto">
6565
<CockpitSidebar
6666
navigationTree={navigationTree}
6767
manifest={cockpitManifest}
@@ -94,7 +94,7 @@ export function CockpitShell({
9494
</>
9595
)}
9696

97-
<section className="grid grid-rows-[auto_1fr] gap-2 p-4 bg-[var(--ds-glass-bg)] backdrop-blur-[var(--ds-glass-blur)]">
97+
<section className="grid grid-rows-[auto_1fr] gap-2 p-4 overflow-hidden bg-[var(--ds-glass-bg)] backdrop-blur-[var(--ds-glass-blur)]">
9898
<header className="flex flex-col gap-2 md:flex-row md:items-center md:justify-between">
9999
<div className="flex items-center gap-3">
100100
<button

apps/cockpit/src/lib/cockpit-page.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cockpitManifest } from '@cacheplane/cockpit-registry';
1+
import { cockpitManifest, type CockpitProduct, type CockpitSection, type CockpitPageId, type CockpitLanguage } from '@cacheplane/cockpit-registry';
22
import {
33
buildNavigationTree,
44
getCapabilityPresentation,
@@ -27,11 +27,11 @@ const DEFAULT_COCKPIT_SLUG = [
2727
export function getCockpitPageModel(slug: string[] = []): CockpitPageModel {
2828
const resolvedEntry = resolveCockpitEntry({
2929
manifest: cockpitManifest,
30-
product: (slug[0] ?? DEFAULT_COCKPIT_SLUG[0]) as 'deep-agents' | 'langgraph',
31-
section: (slug[1] ?? DEFAULT_COCKPIT_SLUG[1]) as 'getting-started' | 'core-capabilities',
30+
product: (slug[0] ?? DEFAULT_COCKPIT_SLUG[0]) as CockpitProduct,
31+
section: (slug[1] ?? DEFAULT_COCKPIT_SLUG[1]) as CockpitSection,
3232
topic: slug[2] ?? DEFAULT_COCKPIT_SLUG[2],
33-
page: (slug[3] ?? DEFAULT_COCKPIT_SLUG[3]) as 'overview' | 'build' | 'prompts' | 'code' | 'testing',
34-
language: (slug[4] ?? DEFAULT_COCKPIT_SLUG[4]) as 'python' | 'typescript',
33+
page: (slug[3] ?? DEFAULT_COCKPIT_SLUG[3]) as CockpitPageId,
34+
language: (slug[4] ?? DEFAULT_COCKPIT_SLUG[4]) as CockpitLanguage,
3535
});
3636

3737
return {

apps/cockpit/src/lib/route-resolution.spec.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,19 @@ describe('buildNavigationTree', () => {
4747
it('groups manifest entries by product and section', () => {
4848
const tree = buildNavigationTree(cockpitManifest);
4949

50+
expect(tree).toHaveLength(4);
5051
expect(tree[0]).toMatchObject({
5152
product: 'deep-agents',
5253
});
5354
expect(tree[1]).toMatchObject({
5455
product: 'langgraph',
5556
});
57+
expect(tree[2]).toMatchObject({
58+
product: 'render',
59+
});
60+
expect(tree[3]).toMatchObject({
61+
product: 'chat',
62+
});
5663
});
5764
});
5865

@@ -125,6 +132,40 @@ describe('getCapabilityPresentation', () => {
125132
});
126133
});
127134

135+
it('presents render capabilities with module-backed metadata', () => {
136+
const entry = resolveCockpitEntry({
137+
manifest: cockpitManifest,
138+
product: 'render',
139+
section: 'core-capabilities',
140+
topic: 'spec-rendering',
141+
page: 'overview',
142+
language: 'python',
143+
});
144+
const presentation = getCapabilityPresentation(entry);
145+
146+
expect(presentation).toMatchObject({
147+
kind: 'capability',
148+
docsPath: '/docs/render/core-capabilities/spec-rendering/overview/python',
149+
});
150+
});
151+
152+
it('presents chat capabilities with module-backed metadata', () => {
153+
const entry = resolveCockpitEntry({
154+
manifest: cockpitManifest,
155+
product: 'chat',
156+
section: 'core-capabilities',
157+
topic: 'messages',
158+
page: 'overview',
159+
language: 'python',
160+
});
161+
const presentation = getCapabilityPresentation(entry);
162+
163+
expect(presentation).toMatchObject({
164+
kind: 'capability',
165+
docsPath: '/docs/chat/core-capabilities/messages/overview/python',
166+
});
167+
});
168+
128169
it('resolves module-backed metadata for every implemented capability topic', () => {
129170
const capabilityEntries = cockpitManifest.filter(
130171
(entry) => entry.entryKind === 'capability'

apps/cockpit/src/lib/route-resolution.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ import { deepAgentsFilesystemPythonModule } from '../../../../cockpit/deep-agent
1717
import { deepAgentsSubagentsPythonModule } from '../../../../cockpit/deep-agents/subagents/python/src/index';
1818
import { deepAgentsSkillsPythonModule } from '../../../../cockpit/deep-agents/skills/python/src/index';
1919
import { deepAgentsSandboxesPythonModule } from '../../../../cockpit/deep-agents/sandboxes/python/src/index';
20+
import { renderSpecRenderingPythonModule } from '../../../../cockpit/render/spec-rendering/python/src/index';
21+
import { renderElementRenderingPythonModule } from '../../../../cockpit/render/element-rendering/python/src/index';
22+
import { renderStateManagementPythonModule } from '../../../../cockpit/render/state-management/python/src/index';
23+
import { renderRegistryPythonModule } from '../../../../cockpit/render/registry/python/src/index';
24+
import { renderRepeatLoopsPythonModule } from '../../../../cockpit/render/repeat-loops/python/src/index';
25+
import { renderComputedFunctionsPythonModule } from '../../../../cockpit/render/computed-functions/python/src/index';
26+
import { chatMessagesPythonModule } from '../../../../cockpit/chat/messages/python/src/index';
27+
import { chatInputPythonModule } from '../../../../cockpit/chat/input/python/src/index';
28+
import { chatInterruptsPythonModule } from '../../../../cockpit/chat/interrupts/python/src/index';
29+
import { chatToolCallsPythonModule } from '../../../../cockpit/chat/tool-calls/python/src/index';
30+
import { chatSubagentsPythonModule } from '../../../../cockpit/chat/subagents/python/src/index';
31+
import { chatThreadsPythonModule } from '../../../../cockpit/chat/threads/python/src/index';
32+
import { chatTimelinePythonModule } from '../../../../cockpit/chat/timeline/python/src/index';
33+
import { chatGenerativeUiPythonModule } from '../../../../cockpit/chat/generative-ui/python/src/index';
34+
import { chatDebugPythonModule } from '../../../../cockpit/chat/debug/python/src/index';
35+
import { chatThemingPythonModule } from '../../../../cockpit/chat/theming/python/src/index';
2036

2137
export interface ResolveCockpitEntryOptions {
2238
manifest: CockpitManifestEntry[];
@@ -70,6 +86,22 @@ const capabilityModules = [
7086
deepAgentsSubagentsPythonModule,
7187
deepAgentsSkillsPythonModule,
7288
deepAgentsSandboxesPythonModule,
89+
renderSpecRenderingPythonModule,
90+
renderElementRenderingPythonModule,
91+
renderStateManagementPythonModule,
92+
renderRegistryPythonModule,
93+
renderRepeatLoopsPythonModule,
94+
renderComputedFunctionsPythonModule,
95+
chatMessagesPythonModule,
96+
chatInputPythonModule,
97+
chatInterruptsPythonModule,
98+
chatToolCallsPythonModule,
99+
chatSubagentsPythonModule,
100+
chatThreadsPythonModule,
101+
chatTimelinePythonModule,
102+
chatGenerativeUiPythonModule,
103+
chatDebugPythonModule,
104+
chatThemingPythonModule,
73105
];
74106

75107
export const toCockpitPath = (entry: CockpitManifestEntry): string =>
@@ -135,7 +167,7 @@ export const resolveCockpitEntry = ({
135167
export const buildNavigationTree = (
136168
manifest: CockpitManifestEntry[]
137169
): NavigationProduct[] => {
138-
const products: CockpitManifestEntry['product'][] = ['deep-agents', 'langgraph'];
170+
const products: CockpitManifestEntry['product'][] = ['deep-agents', 'langgraph', 'render', 'chat'];
139171
const sections: CockpitManifestEntry['section'][] = [
140172
'getting-started',
141173
'core-capabilities',
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)