Skip to content

feat: connected thread sidebar for React and Angular - #1637

Open
blove wants to merge 21 commits into
mainfrom
blove/thread-sidebar-design
Open

blove wants to merge 21 commits into
mainfrom
blove/thread-sidebar-design

Conversation

@blove

@blove blove commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 1 of the thread sidebar (survey item 8): a connected, customizable conversation sidebar for both React and Angular, backed by LangGraph threads, with project names stored in the LangGraph Store API.

  • Core contract. ThreadDirectory in private @threadplane/core, plus refreshDirectoryOnRunEnd.
  • LangGraph runtime.
    • createLangGraphThreadDirectory and createLangGraphProjectStore. Projects live under the Store namespace ['threadplane','projects'] with value { name }.
    • The thread list updates immediately on rename, pin and the other mutations. A failed mutation rolls back. A refresh that started earlier never overwrites a newer change.
    • The mutation client uses maxRetries: 0, and error bodies are never read.
  • Shared conformance suite. It runs against the runtime directory and the Angular LangGraphThreadsAdapter.directory.
  • Angular.
    • A type-only copy of the contract in @threadplane/chat, pinned to core by a type spec.
    • LangGraphThreadsAdapter gains directory, status, error and projects signals and config.projects. All of this is additive.
    • New <chat-thread-sidebar>.
  • React. New ThreadSidebar. ThreadList gains extraActions, and ChatSidenavSections gains row slots.
  • Both sidebars.
    • Feature flags, row template and extra actions, before/after slots, and labels.
    • Run-end refresh and onActiveRemoved / (activeThreadRemoved).
    • Filtering by the selected project.
    • The Projects section is hidden when the Store API is unavailable.
  • Cockpit threads examples (both frameworks). Rewired to the new sidebars, with new e2e tests: rename persists after reload, pin and drag reorder, create a project and move a thread into it, and delete the active thread.
  • Docs. A "Connected sidebar" section in both thread-routing guides, and the public agent context is regenerated.

Design: docs/superpowers/specs/2026-11-16-thread-sidebar-design.md. Plan: docs/superpowers/plans/2026-11-17-thread-sidebar-phase-1.md.

Behavior notes for existing Angular users (patch)

  • Method signatures are unchanged. refresh() still logs and resolves on failure, and create() still returns null on failure.
  • threads() now updates immediately on mutations and rolls back on failure. Titles are trimmed, and stale refresh results are dropped.
  • Projects are on by default. After the thread list publishes, the adapter makes one extra Store request. refresh() does not wait for it. Set projects: false in LANGGRAPH_THREADS_CONFIG to opt out.

Verification

  • Libraries:
    • nx run-many -t test lint type-tests -p core react chat passes on the merged branch.
    • nx run-many -t test lint type-tests build runtime-quality runtime-type-tests -p langgraph passes.
  • Package and parity scripts:
    • verify-packages.spec.mjs passes 103/103.
    • The inventory --check and verify-langgraph-candidate checks pass.
  • End-to-end and website:
    • The cockpit threads e2e passes for both frameworks.
    • The website react-chat-threads-preview e2e passes, and so does website vitest.
  • Dist greps: the Angular dist output has no imports from @threadplane/core or @threadplane/langgraph.

Phase 2, after the Angular packages start exporting core: re-export the contract and rebuild the adapter on the runtime directory.

🤖 Generated with Claude Code

blove and others added 19 commits November 17, 2026 11:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…with project names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted sidebars

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rst load

- Publish no projects while the Store API cannot be read (runtime and adapter),
  so both sidebars hide the Projects section; project commands still reject.
- Both sidebars list only the selected project's threads when
  selectedProjectId is a project id.
- Both sidebars hold the empty label until their first refresh settles.
- The adapter's legacy refresh() resolves once threads are published;
  directory.refresh() and project commands still wait for projects.
- rename() shows a trimmed title, or the fallback for a blank one.
- refreshDirectoryOnRunEnd swallows a rejected refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bar reads

- Both threads examples bind selectedProjectId and toggle it on selection;
  the Angular sidebar's New chat runs the existing new-thread handler.
- The React example creates and disposes its directory in one effect, so a
  StrictMode remount gets a live directory.
- The website preview guard allows the sidebar's read-only thread and Store
  searches while still rejecting thread creation and runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…threads preview

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…design

# Conflicts:
#	scripts/react-parity/dispositions.json
…types

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@blove
blove enabled auto-merge November 17, 2026 21:42
blove and others added 2 commits November 17, 2026 14:24
…nsumer smoke

LangGraphThreadsAdapter now loads project names from the LangGraph Store
after the thread list; the compatibility smoke backend answers it with an
empty list like the thread search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…design

# Conflicts:
#	libs/langgraph/src/runtime/thread-directory.spec.ts
#	libs/langgraph/src/runtime/thread-directory.ts

This branch has not been deployed

No deployments
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