From 1a87c23b99bfc50880e5ed899c7e975296a8c590 Mon Sep 17 00:00:00 2001 From: indifferentketchup Date: Fri, 29 May 2026 03:12:06 +0000 Subject: [PATCH] web(coder UI): ChatInput migration + Thinking render + DiffPanel route fix Bundles in-progress working-tree UI work not authored this session (CoderPane ChatInput migration, AgentComposerBar/CoderMessageList/tab-bar/sidebar/pane refinements, provider icons) with this session's changes to the same files: MessageBubble renders a collapsible 'Thinking' block from reasoning_text/reasoning_parts (surfacing ACP agent_thought_chunk + native reasoning), and the DiffPanel approve/reject calls are repointed to the real /api/coder/pending/:id/apply and /reject routes (the old /sessions/:id/pending/:id/approve|reject paths did not exist). --- apps/web/src/api/types.ts | 10 +- apps/web/src/components/AgentCommandsHint.tsx | 16 +- apps/web/src/components/AgentComposerBar.tsx | 39 +- apps/web/src/components/ChatInput.tsx | 4 + apps/web/src/components/ChatTabBar.tsx | 2 +- apps/web/src/components/MessageBubble.tsx | 149 +++++-- apps/web/src/components/MobileTabSwitcher.tsx | 2 +- apps/web/src/components/NewPaneMenu.tsx | 2 +- .../web/src/components/SessionLandingPage.tsx | 377 ++---------------- apps/web/src/components/Workspace.tsx | 54 +-- .../src/components/icons/ProviderIcons.tsx | 21 + .../src/components/panes/CoderMessageList.tsx | 58 +-- apps/web/src/components/panes/CoderPane.tsx | 185 +++++---- apps/web/src/hooks/sessionEvents.ts | 7 +- apps/web/src/hooks/useSessionStream.ts | 16 + apps/web/src/hooks/useSidebar.ts | 1 + apps/web/src/hooks/useSidebarDrawer.tsx | 9 +- apps/web/src/pages/Session.tsx | 20 +- 18 files changed, 427 insertions(+), 545 deletions(-) create mode 100644 apps/web/src/components/icons/ProviderIcons.tsx diff --git a/apps/web/src/api/types.ts b/apps/web/src/api/types.ts index cc31319..88d7a67 100644 --- a/apps/web/src/api/types.ts +++ b/apps/web/src/api/types.ts @@ -182,10 +182,14 @@ export interface Message { // majority of messages. metadata: MessageMetadata | null; // v1.13.1-C: reasoning content captured from models that stream reasoning - // tokens separately (qwen3.6 etc.). Backend populates from message_parts; - // optional on the wire — frontend doesn't render this yet (reserved for - // a v1.14 UI surface). + // tokens separately (qwen3.6 etc.) and from external agents over ACP + // (agent_thought_chunk). Backend populates from message_parts; rendered by + // MessageBubble as a collapsible "Thinking" block. reasoning_parts?: Array<{ text: string }> | null; + // Coder wire shape pre-joins reasoning_parts into a single string + // (CoderPane/CoderMessageList) and streams it live via reasoning_delta + // frames. MessageBubble reads whichever of the two is present. + reasoning_text?: string | null; // v1.11: anchored rolling compaction fields. Optional on the wire so that // older API responses (or test fixtures) parse without explicit nulls. // summary — true on the assistant row that holds the active diff --git a/apps/web/src/components/AgentCommandsHint.tsx b/apps/web/src/components/AgentCommandsHint.tsx index 64fc741..04d9da7 100644 --- a/apps/web/src/components/AgentCommandsHint.tsx +++ b/apps/web/src/components/AgentCommandsHint.tsx @@ -9,6 +9,7 @@ interface Props { export function AgentCommandsHint({ commands }: Props) { const [open, setOpen] = useState(false); + const [expanded, setExpanded] = useState(null); if (commands.length === 0) return null; @@ -25,10 +26,19 @@ export function AgentCommandsHint({ commands }: Props) { {open && (