You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(threads): converge on metadata.title; drop titleMetadataKey config (#506)
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>
-`_builder.add_edge("respond", "generate_title")` — both are node names registered earlier in the file. Consistent.
321
321
322
322
**Anti-pattern check:** zero hardcoded label tables. Zero topology magic. Zero cross-cap python imports. Each cap stays self-contained.
323
+
324
+
---
325
+
326
+
## Addendum 2026-05-21 — converged on `metadata.title`
327
+
328
+
This spec proposed `metadata.thread_title` for the new cockpit-cap title nodes (c-threads, c-a2ui). After landing #481, #488, #491, #492, #493 the per-cap key created friction:
329
+
330
+
-`LangGraphThreadsAdapter` carried a `titleMetadataKey` config knob to bridge the two conventions
331
+
- Each consumer had to remember which spelling its backend used
332
+
- The canonical demo (`examples/chat/python`) writes `metadata.title` and predates this spec
333
+
334
+
Resolved by converging on `metadata.title` across all consumers:
335
+
336
+
-`cockpit/chat/threads/python` + `cockpit/chat/a2ui/python` graphs now write `metadata.title`
337
+
-`LangGraphThreadsAdapter` reads `metadata.title` unconditionally; the `titleMetadataKey` config knob is gone
338
+
- Pre-existing prod threads written with the old `thread_title` spelling would lose their title; the existing prod backlog was cleared separately (see /tmp/delete-prod-threads.sh)
339
+
340
+
Pattern D (inline node per cap, no shared helper) stays intact — only the metadata key name changes.
0 commit comments