Skip to content

feat(chat): archive lifecycle + ThreadsService SDK migration (Phase 3b)#260

Merged
blove merged 10 commits into
mainfrom
claude/chat-archive-impl
May 12, 2026
Merged

feat(chat): archive lifecycle + ThreadsService SDK migration (Phase 3b)#260
blove merged 10 commits into
mainfrom
claude/chat-archive-impl

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 12, 2026

Summary

Phase 3b of the chat row-actions decomposition: per-thread archive/unarchive support. Active threads remain in "Recent"; archived threads appear in a new collapsible "Archived" section below it. Same ThreadActionAdapter extended with archive? and unarchive? — framework owns optimistic UI, no confirmation dialog (archive is reversible).

Bundles a ThreadsService migration from raw fetch to @langchain/langgraph-sdk's Client for all thread CRUD.

Spec: docs/superpowers/specs/2026-05-12-chat-archive-design.md
Plan: docs/superpowers/plans/2026-05-12-chat-archive.md

Type extensions

  • Thread.status?: 'active' | 'archived' — typed lifecycle documentation. Framework doesn't auto-filter; consumers pre-partition into threads and archivedThreads inputs.
  • ThreadActionAdapter.archive?(id) + .unarchive?(id) — optional, Promise<void>.

Behavior

  • chat-thread-list: new mode: 'active' | 'archived' input. Active mode menu: Rename / Archive / Delete. Archived mode menu: Unarchive / Delete. Renamed pendingDeletespendingHidden (reused for all three hide actions).
  • chat-sidenav: new archivedThreads: Thread[] | null input. When non-null, renders a collapsible Archived section below Recent (collapsed by default, hidden entirely in mode="collapsed" rail).
  • Archive/unarchive: no confirm dialog; optimistic-hide; rollback on rejection.

SDK migration

ThreadsService now uses client.threads.search/create/delete/update — replaces all six raw-fetch calls. Drops as { thread_id } casts; uses the SDK's Thread type. Adds new archivedThreads signal + archive/unarchive methods.

Test plan

  • nx run chat:test — 22 thread-list tests (existing 14 + 8 new archive) + 8 sidenav tests (existing 4 + 4 new archived section)
  • nx run chat:build — clean
  • nx lint chat — clean
  • nx run examples-chat-angular:build — clean
  • API docs regenerated
  • Browser-verified via Chrome MCP: Recent + collapsed Archived heading visible; active-row menu shows Rename/Archive/Delete; clicking Archive optimistically hides the row, no confirm dialog, LangGraph PATCH succeeds; clicking the Archived heading expands the section showing the archived row; archived-row menu shows Unarchive/Delete; clicking Unarchive returns the row to Recent and the Archived section shows empty-state.

🤖 Generated with Claude Code

blove and others added 10 commits May 12, 2026 14:34
Adds archive/unarchive to ThreadActionAdapter; introduces mode input
on chat-thread-list (active vs archived menu items); adds collapsible
Archived section to chat-sidenav. Bundles a ThreadsService rewrite
to @langchain/langgraph-sdk for all thread CRUD.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nine tasks: Thread + ThreadActionAdapter type extensions; chat-thread-list
mode/archive/unarchive with test coverage; chat-sidenav archived section;
ThreadsService SDK migration; shell wiring; API docs regen; browser verify.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ph-sdk; add archive/unarchive

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

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

vercel Bot commented May 12, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 12, 2026 9:54pm

Request Review

@blove blove merged commit f60f505 into main May 12, 2026
14 checks passed
blove added a commit that referenced this pull request May 12, 2026
…rk (#271)

Brings the canonical smoke checklist current with 29 PRs that landed
between Phase 7 (#239) and today without checklist updates. Specifically:

Updated sections:
- chat-debug devtools — replaced bottom-drawer model with floating
  launcher + status pill + switch (PRs #249, #251)
- Control palette — palette v2 (status pill, shadcn-styled panel, PR #244)
- Generative UI / A2UI surfaces — single-bubble invariant (PR #255),
  parent-emits-envelopes architecture (PR #259), wrapped-content +
  tool_calls coexistence (PR #255), envelope reorder
- Server-side wire format — tool_calls preserved on the final AI
- Replaced 'Multi-thread' section with 'Sidenav (thread management)'
  reflecting the permanent semantic <nav> + Active/Archived sections
  (PR #253) and removing the old palette-toggled drawer model

Added sections:
- Cmd+K history search — palette open/search/select/close, archived
  result subtitle, keyboard navigation (PR #253)
- Per-row thread actions — kebab menu order per state (active, pinned,
  archived), rename + pin/unpin + archive/unarchive + delete flows
  (PRs #258, #260, #267)
- Thread titles — first-user-message derivation, idempotent writes,
  manual rename precedence (PR #242)
- Progressive A2UI streaming — per-component fallback transition
  observable during streaming window (PRs #252, #261, #262, #268, #269)
- Inline checkpoint markers — render between messages during multi-step
  runs (PR #243)
- Responsive sidenav — viewport breakpoints, auto-collapse behavior (PR #240)

Total: ~58 new check items across 6 new sections, plus rewrites to 5
existing sections. Original 333-line checklist → 391 lines / 237 check
items.
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