Skip to content

refactor(threads): converge on metadata.title; drop titleMetadataKey config#506

Merged
blove merged 1 commit into
mainfrom
claude/converge-metadata-title-key
May 21, 2026
Merged

refactor(threads): converge on metadata.title; drop titleMetadataKey config#506
blove merged 1 commit into
mainfrom
claude/converge-metadata-title-key

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 21, 2026

Summary

Spec 2026-05-19 proposed metadata.thread_title for cockpit-cap title nodes. The canonical demo (which predates the spec) writes metadata.title. PR #488's LangGraphThreadsAdapter bridged them via a per-consumer titleMetadataKey config knob — friction every consumer had to remember.

This PR converges on metadata.title everywhere and removes the config knob.

Diff

  • cockpit/chat/threads/python/src/graph.py + cockpit/chat/a2ui/python/src/graph.py — write metadata.title (renamed read+write sites, updated docstrings)
  • libs/langgraph/src/lib/threads/threads-adapter.ts — reads metadata.title unconditionally; titleMetadataKey removed from LangGraphThreadsConfig
  • cockpit/chat/threads/angular/src/app/app.config.ts + examples/chat/angular/src/app/app.config.ts — drop per-cap key overrides
  • libs/langgraph/src/lib/threads/threads-adapter.spec.ts — one fewer test parameter (the "alternate key" test goes away)
  • docs/superpowers/specs/2026-05-19-llm-generated-labels-design.md — addendum documenting the convergence

Compatibility

  • Demo (examples/chat): no behavior change — already on metadata.title
  • Cockpit caps: changes the metadata key they write; pre-existing prod threads with thread_title would lose their title, but the prod backlog was cleared separately and the cockpit caps weren't in prod
  • LangGraphThreadsConfig interface change: titleMetadataKey field removed. titleFallback stays. Net minor breaking change to the adapter's public API but only one external test setup invoked it.

Test plan

  • All 11 adapter unit tests pass (vitest run threads-adapter)
  • nx build langgraph green
  • nx build examples-chat-angular green
  • nx build cockpit-chat-threads-angular green
  • Both Python graphs still compile (from src.graph import graph)
  • CI green
  • After merge + deploy: verify a fresh prod probe still produces a thread with metadata.title populated

🤖 Generated with Claude Code

…config

Spec 2026-05-19-llm-generated-labels-design.md proposed
metadata.thread_title for the new cockpit-cap title nodes, but the
canonical demo's _maybe_write_thread_title (which predates the spec)
writes metadata.title. PR #488's LangGraphThreadsAdapter bridged the
two via a per-consumer titleMetadataKey config knob — friction every
consumer had to remember.

Converge on metadata.title across everything:

- cockpit/chat/threads/python + cockpit/chat/a2ui/python graphs now
  write metadata.title (renamed read+write sites, updated docstrings)
- LangGraphThreadsAdapter reads metadata.title unconditionally; the
  titleMetadataKey field is removed from LangGraphThreadsConfig
- Both consumers drop the per-cap titleMetadataKey override from
  app.config.ts
- threads-adapter.spec.ts simplified (one fewer test parameter)
- Spec gets a 2026-05-21 addendum documenting the convergence

No behavior change for the demo (already on metadata.title). The two
cockpit caps now share the demo's convention; existing prod threads
written with the old key would lose their title, but the prod backlog
was cleared separately and the cockpit caps weren't in prod.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

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

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment May 21, 2026 3:12pm

Request Review

@blove blove enabled auto-merge (squash) May 21, 2026 15:10
@blove blove merged commit ea867cf into main May 21, 2026
37 of 38 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