Skip to content

feat(cockpit): register ag-ui examples in sidebar + capability modules#576

Merged
blove merged 2 commits into
mainfrom
claude/cockpit-ag-ui-sidebar
Jun 5, 2026
Merged

feat(cockpit): register ag-ui examples in sidebar + capability modules#576
blove merged 2 commits into
mainfrom
claude/cockpit-ag-ui-sidebar

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Jun 5, 2026

Summary

Closes the cockpit-side gap I surfaced while finishing #571: even though PR #567 added `ag-ui` to the cockpit-registry manifest and shipped two standalone examples (`cockpit/ag-ui/interrupts`, `cockpit/ag-ui/streaming`), the cockpit app itself never picked them up. Two hardcoded spots in `apps/cockpit/src/lib/route-resolution.ts` needed parallel updates:

  • `capabilityModules` is a static import-and-array list. Without entries for the ag-ui descriptors, `capabilityModules.find(c => c.manifestIdentity.product === 'ag-ui' ...)` returned undefined, so `` rendered the "No runtime available" fallback even when the route resolved correctly.
  • `buildNavigationTree` hardcoded the products array to the original four (`['deep-agents', 'langgraph', 'render', 'chat']`), so ag-ui examples were filtered out of the sidebar entirely. This is why `cockpit.threadplane.ai/ag-ui/core-capabilities/interrupts/overview/python` rendered with breadcrumbs but no sidebar entry.

This PR adds both: static imports + array entries for `agUiInterruptsPythonModule` / `agUiStreamingPythonModule`, and inserts `'ag-ui'` between `'langgraph'` and `'render'` to match the manifest's `APPROVED_TOPICS` ordering.

After this lands + cockpit redeploys: the AG-UI section appears in the sidebar; Code, Docs, and API tabs all work (they read from the imported descriptors' asset paths). The Run tab will still say "No runtime available" — that depends on hosting a uvicorn `ag-ui-langgraph` runtime somewhere reachable, which is Phase 2 (a real infra brainstorm — LangGraph Cloud can't host FastAPI apps).

Test `buildNavigationTree > groups manifest entries by product and section` updated to expect 5 products with `'ag-ui'` in position 3.

Test Plan

  • `nx test cockpit` green (the updated spec asserts the new tree shape)
  • `nx test cockpit-registry` green (manifest unchanged; sanity)
  • Confirmed only one hardcoded products list exists in `apps/cockpit/src` — no other places to update
  • After merge + cockpit redeploy: verify the AG-UI section appears in the sidebar at `cockpit.threadplane.ai` and Code/Docs/API tabs render real content

🤖 Generated with Claude Code

PR #567 added the ag-ui section to the cockpit-registry manifest and shipped
two examples (interrupts, streaming), but the cockpit app itself never picked
them up. Two hardcoded spots in apps/cockpit/src/lib/route-resolution.ts:

- `capabilityModules` is a static import-and-array list. Without entries for
  the ag-ui descriptors, `capabilityModules.find(... product === 'ag-ui' ...)`
  returned undefined, so RunMode rendered "No runtime available" even when
  the route resolved.
- `buildNavigationTree` hardcoded the products array to the original four
  (deep-agents, langgraph, render, chat), so ag-ui examples were filtered
  out of the sidebar entirely.

This PR adds both: imports + array entries for agUi{Interrupts,Streaming}PythonModule,
and inserts 'ag-ui' between 'langgraph' and 'render' to match APPROVED_TOPICS
ordering. After this lands + cockpit redeploys, the AG-UI section appears
in the sidebar and the Code/Docs/API tabs work. The Run tab still says
"No runtime available" — that depends on a hosted ag-ui runtime, which is
Phase 2 (a real infra brainstorm for hosting uvicorn ag-ui-langgraph apps).

Spec test for buildNavigationTree updated to expect 5 products with ag-ui
in position 3.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jun 5, 2026 6:27pm

Request Review

@blove blove merged commit 578376d into main Jun 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant