Skip to content

Buddy parity with chat: citations, stop, queue, reasoning, searchable rail, re-point chat consumers #266

Description

@daniilperkin

Parent Story

Part of SprintStartProject/Wiki#319 (retire /chat, Buddy is the only conversation surface). Complements #206, which unifies the surface (conversation rail, capability switch, filters, redirects, removing chat). This issue covers the rest of what chat has and Buddy lacks, found in a chat-vs-Buddy check of dev on 2026-09-25.

Blocked by sprintstart-backend#214, sprintstart-backend#259 (backend parity) and sprintstart-ai#206. Blocks the chat removal step of sprintstart-frontend#206.

Split with #206 (2026-09-25): this issue builds the parts (components, hooks, types, callers). #206 wires the page: the rail placement, moving PM Replies into a drawer, removing the no-project gate, the capability switch, the dock, redirects, and deleting chat. Fix #236 (composer lag) first if you can, since it touches the same hook.

1. Citations are not shown in Buddy at all

useBuddyConversation collects citation events into message.citations, but no Buddy component renders them. Chat renders them with MessageCitations, linkifyCitations, CitationPopover and opens ArtifactViewerDrawer.

  • Render citations under Buddy replies (live and after reload, once the backend persists them), with the popover and the artifact drawer.
  • Move the Citation type out of features/chatbot/types (features/buddy/types.ts imports it from there today), so deleting features/chatbot does not break Buddy.

2. Composer

  • Stop an answer while it streams (chat: onStop / stopStreaming; Buddy composer has none).
  • Queue follow-ups sent during a stream, with edit / remove / resume after Stop (chat: QueuedMessages, Show chat errors as toasts and queue messages sent during a response #230).
  • Filters use the sources that are actually connected (useAvailableSources via connectorService), not a hardcoded list.

3. Thread and rail

  • Reasoning / tool panel (chat: ReasoningPanel, ThinkingIndicator) fed by the reasoning events the backend emits before the answer (ai#206, batch: shown after the model thought, not live).
  • Stopped replies show as incomplete (isIncomplete, backend#259), as chat marks them today.
  • Conversation rail search and date grouping (chat: ChatSidebar search field, date buckets, delete with confirmation → bin).
  • Conversations replace visits (Wiki#319 decision): "start a new conversation", Alt+N and the fresh-visit button create a conversation; visit dividers and "Clear the earlier conversation" go away. Only the hire's first conversation (or one after a long absence) opens with the greeting; a new one starts with an empty thread and the composer focused.

4. Re-point everything outside features/chatbot

  • hooks/useAskAi.ts (used by ArtifactViewerDrawer's "ask AI about the selection") → Buddy with the prompt as a draft
  • board/selection/SelectionActions.tsx reads ChatContext.quoteSelection → Buddy's quote (quoteFromSelection)
  • board/generation/chatToCard.ts: chatLink builds /chat/:id → /buddy/:id (old cards keep working through the redirect)
  • dashboard/QuickChatWidget, RecentChatsWidget → Buddy entry and recent conversations
  • DinoGameModal and onboarding GenerationScreen import chatbot/components/DinoGame → features/easter-eggs (open PR Easter Eggs Consolidation & Overhaul #184 consolidates the egg code there; check where it leaves DinoGame once merged)
  • Easter-egg phrases (party, barrel roll, matrix) work in Buddy once Easter Eggs Consolidation & Overhaul #184 is merged; ChatPage's own egg handlers go away with it

Deliberately not ported (decided 2026-09-25)

  • KaTeX math rendering
  • Screen-reader turn announcements from ChatPage (aria-live)
  • Chat mascot idle animations (SleepyBot, BotGlyph gaze, useIdleSleep, usePointerGaze)

These go away with features/chatbot.

Acceptance Criteria

  • Buddy replies show citations with popover and artifact drawer, live and after reload
  • Nothing in features/buddy imports from features/chatbot
  • Stop, queue (edit / remove / resume) and connected-source filters work in the Buddy composer
  • Reasoning and tool activity are visible while Buddy answers
  • The rail searches conversations, groups them by date, and bins with confirmation
  • New conversation (button, Alt+N) creates a conversation; no visit dividers remain
  • Every consumer in section 4 points at Buddy; git grep chatbot src only hits code that One conversation surface: retire /chat #206 deletes
  • Unit and a11y tests for citations, stop, queue, reasoning panel, rail search
  • npm run try passes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestuxImprovement for the user experience

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions