Skip to content

feat(render): wire VIEW_REGISTRY + add overrideViews; trim chat re-export; fix docs#569

Open
blove wants to merge 15 commits into
mainfrom
claude/render-drift-cleanup
Open

feat(render): wire VIEW_REGISTRY + add overrideViews; trim chat re-export; fix docs#569
blove wants to merge 15 commits into
mainfrom
claude/render-drift-cleanup

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Jun 3, 2026

Summary

Resolves a chain of three compounding bugs the README audit (PR #559) and the ag-ui PR (#567) surfaced, plus three small leftover nits.

  • Render VIEW_REGISTRY is now wired into the engine. RenderSpecComponent resolves its registry in priority order: [registry] input → RENDER_CONFIG.registry (from provideRender(...)) → VIEW_REGISTRY (from provideViews(...)) → existing empty fallback. RenderElementComponent reads from RENDER_CONTEXT.registry set by its parent, so the resolution flows transitively. Additive — apps using provideRender({ registry }) see no change.
  • New overrideViews(base, overrides) helper in @threadplane/render with override semantics (overrides win), as the missing complement to withViews(base, additions) which is additive-only.
  • @threadplane/chat no longer re-exports provideViews / VIEW_REGISTRY from @threadplane/render. Direct render consumers import from render; chat owns its markdown-view DI surface (MARKDOWN_VIEW_REGISTRY + cacheplaneMarkdownViews).
  • The chat markdown-override docs are correct end-to-end for the first time. The previously-documented provideViews(withViews(cacheplaneMarkdownViews, { code: ... })) pattern was broken in three ways simultaneously (wrong token, additive-not-override helper, wrong node-key 'code' vs 'code-block'). The chat README, the chat markdown guide, the render README, and the render views API page now all describe the same correct mechanism ({ provide: MARKDOWN_VIEW_REGISTRY, useValue: overrideViews(cacheplaneMarkdownViews, { 'code-block': … }) }). The chat markdown guide also gains a 22-entry node-type reference table.
  • libs/chat/CHANGELOG.md notes the surface trim under [Unreleased].
  • Regenerated apps/website/content/docs/{chat,render}/api/api-docs.json — chat lost provideViews/VIEW_REGISTRY; render gained overrideViews. Clean diff, no spurious churn.
  • ag-ui interrupt feature is now documented: libs/ag-ui/README.md gains an "Interrupts (human-in-the-loop)" subsection covering Agent.interrupt, submit({ resume }), and <chat-approval-card> pairing. New apps/website/content/docs/ag-ui/guides/interrupts.mdx guide, registered in docs-config.ts nav.
  • Nits cleaned up: .gitignore ignores cockpit/**/angular/test-results/; cockpit/chat/generative-ui/python/prompts/dashboard.md renamed to generative-ui.md to match the manifest's topic-named convention, so the cockpit-registry tracks implemented python assets for every approved capability topic test goes from red to green.

Test Plan

  • nx test render — green (4 new overrideViews tests + 4 new VIEW_REGISTRY priority/regression tests across the two render components)
  • nx test chat — green after the re-export drop
  • nx test ag-ui — green
  • nx test cockpit-registrygoes from red to green (the dashboard.md/generative-ui.md mismatch was the failure)
  • nx run-many -t build -p render chat ag-ui — green
  • git ls-files cockpit/ag-ui | grep test-results — empty (no committed Playwright artifacts)
  • Cross-cutting coherence: all four markdown-override doc surfaces (chat README, chat markdown guide, render README, render views API page) describe the same correct mechanism

Design spec: docs/superpowers/specs/2026-05-29-render-chat-docs-alignment-design.md
Implementation plan: docs/superpowers/plans/2026-05-29-render-chat-docs-alignment.md

🤖 Generated with Claude Code

blove and others added 14 commits June 3, 2026 10:22
Closes a chain of compounding bugs: render exports public API with no
engine behavior; chat leaks render tokens into its surface; chat README's
markdown override example is broken three ways. Adds overrideViews,
wires VIEW_REGISTRY into the render engine, drops chat's re-export,
fixes all documentation (README + chat markdown guide + render views
API + CHANGELOG + regenerated api-docs.json). Plus three nits: ag-ui
README interrupt docs + new docs guide, .gitignore Playwright dirs,
rename dashboard.md → generative-ui.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…in engine

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Y + overrideViews)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix the chat markdown guide to use MARKDOWN_VIEW_REGISTRY (correct
token), overrideViews from @threadplane/render (not the old provideViews
pattern), and 'code-block' (not 'code') as the node-type key. Add
app-wide and per-instance override examples, a 22-entry node-type
reference table, overrideViews-vs-withViews callout, and brief theming
cross-link.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ption

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…verrideViews

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New guide covers the AG-UI HITL contract: CUSTOM on_interrupt wire
format, dump_json_safe auto-parsing, submit({ resume }) flow, and
cross-adapter parity with the LangGraph guide. Registers the page in
the ag-ui Guides section of docs-config.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

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

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jun 4, 2026 12:08am

Request Review

Pre-existing failure inherited from main:
- cockpit-e2e-wiring.spec.ts parsed only 'langgraphCwd' from
  global-setup-impl.ts, but ag-ui examples use 'pythonCwd' (the
  createAgUiGlobalSetup field). Accept either.
- capability-registry.ts had the old "FakeAgent, no Python backend"
  shape for ag-ui-streaming (port 4600) and no entry for the new
  ag-ui-interrupts example. Update both to match the real uvicorn
  ag-ui-langgraph backend ports (4320/5320 + 4321/5321 from
  cockpit/ports.mjs).
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