feat(summary): AI catch-me-up summaries for rooms + threads [operator-action] (LC-484) #460
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-484-catch-me-up-summaries"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
AI "Catch me up" summaries for rooms and threads (LC-484, shortlist item from epic LC-475). Reuses the existing operator LLM client (LC-396) with a chat-specific prompt, so this is mostly plumbing.
#thread-panelslot) that summarizes the viewer's unread range, falling back to the recent tail when nothing is unread.Both render the model's markdown through the same
views::markdownpipeline as messages, and both are gated on an operator-configured LLM (the actions are hidden when unset).How (small commits)
refactor(llm)- generalizeLlmClientto a corecomplete(system, user);summarize()stays as a default wrapper, so transcript behavior is unchanged.feat(summary)-routes/summary.rs+views/summary.rs+ two templates + routes; chat prompt; no persistent cache (thread grows / unread is per-viewer, so a cached summary would be stale - generate on demand with a regenerate button, mirroring the transcript action).feat(summary)- wire the Summarize + Catch me up buttons; threadllm_availableflag throughRoomPage,ThreadPanelFragment,RoomHeaderFragment.test(summary)- 4 HTTP tests via the transcripts/MockLlmClient harness.docs(summary)- operator note.Tests
just check,just test,just test-saasgreen (standalone + saas, clippy-D warnings). New tests: channel summary renders model output, thread summary renders it, 400 when LLM disabled, drawer opens.Operator note
[operator-action]marker: no action required, but enablingLETS_CHAT_LLM_URLnow sends room/thread message text to the endpoint for on-demand summaries, in addition to call transcripts (load/cost/content consideration on metered or third-party engines). Documented in the CLAUDE.md LLM row +llmmodule header.Verify
just verifybuilds the release binary clean; the boot step fails only on the missing mandatoryLETS_CHAT_BUNYIP_SSO_*env (same environmental block as prior PRs), not a regression.New routes/summary.rs reuses the operator LLM client with a chat-specific prompt to summarize a thread (root + replies) or a channel's unread range (falling back to the recent tail when nothing is unread). GET /room/{id}/summary opens a drawer in the shared #thread-panel slot; POST /room/{id}/summary and POST /room/{id}/thread/{parent}/summary generate the markdown and render it through the message markdown pipeline. No persistent cache: a thread keeps growing and an unread range is per-viewer, so each click generates fresh (regenerate button), mirroring the transcript action. i18n keys added in en + es. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Thread panel header gets a "Summarize" action that swaps the AI summary into a new #thread-summary-{parent} slot; the room header gets a "Catch me up" action that opens the summary drawer. Both gated on an operator-configured LLM via a new llm_available flag threaded through RoomPage, ThreadPanelFragment, and RoomHeaderFragment (so the action survives the notify-prefs header swap). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>