PR: #532: feat(agents): ACP session dropdown — full lifecycle verbs + archived view [Story-2097] by @ankitmaheshwari-com
View PR →

Files changed

9 file(s), +523 / -112 lines

Path Role + -
messages/en.jsonConfig+8-0
messages/hi.jsonConfig+8-0
src/components/agents/agent-dock-mount.tsxComponent+11-0
src/components/agents/agent-dock.stories.tsxComponent+32-3
src/components/agents/session-menu.stories.tsxComponent+99-42
src/components/agents/session-menu.tsxComponent+146-19
src/lib/agents/__tests__/agent-session-store.test.tsLibrary+59-6
src/lib/agents/agent-session-store.tsLibrary+145-39
src/lib/agents/use-agent-sessions.tsLibrary+15-3

Story-2097: Memory Engine ME-3 — the ACP session dropdown

The Agent Chat Panel's session dropdown grows from four verbs to the full lifecycle the Memory Engine defines. Per pramaan-functions docs/notes/rfd-memory-engine.md (RFD-MEM-001) §4.3 and §8, a counsel keeps several parallel conversations per agent and manages each one — new · load · rename · compact · clear · archive/restore · delete — with the auto-resolved default session pinned first and the rest ordered by most-recent activity.

"Return to the thread where we discussed limitation." — the session is the conversation container; the dropdown is how counsel moves between them.

The ME-2 contract seam (why some verbs are wired and some are not)

The functions-side session routes are ME-2 (pramaan-spec #2096). Their OpenAPI snapshot is not yet in this repo's src/gen mirror — the mirror carries only /app/agents/session-context/resolve, not the agent-sessions lifecycle routes. Per the story's own guardrail, pnpm codegen was not run here. So ME-3 ships the dropdown against the existing client-side session cache (agent-session-store.ts, Story-1721), and the verbs whose truth is server-side attach at a named seam:

The store — the dropdown's list model (ME-3 additions)

The dropdown — SessionMenu

Namespace isolation — Mira vs Atlas

A Mira session and an Atlas session on the same matter are different rows, different dropdowns, different memory scopes (RFD §4.1). This is structural: the session scope key carries the agent_key axis (buildSessionScopeKey), so the two agents' lists can never collide — proven by a store test asserting an Atlas scope and a mira:<matterId> scope stay independent. Atlas's dock drives the dropdown fully today; Mira's dock adopts the same control once ME-2 session-keys her conversation rail (that rail is matter-keyed today — a separate ME-2 seam).

i18n & stories

Verification