feat: post-review backlog hardening (cancel/parser/stall/history/9502)

Five independent items from the post-review backlog. F1: Stop on an external
agent task now aborts the running child via a per-task AbortController registry
reachable from the cancel route, and finalizes the assistant message as
cancelled (fixing two latent bugs — catch blocks left the message streaming,
and warm success-paths wrote complete on an aborted turn); warm pools/worktrees
are preserved and the native path is unchanged. F2/F3: prune the tool-call
parser to its two load-bearing exports (unexport eight zero-caller symbols, add
a gate test for the <invoke>-as-text fallback) and route placeholder-rejection
logging through pino. F6: a 90s per-chunk stall-timeout wraps native inference's
fullStream via AbortSignal.any so a hung stream finalizes the message instead of
hanging — no retry (a pure classifyStreamError helper is added). F7: a read-only
view_session_history MCP tool (newest-N, chronological). F9: retire the unused
apps/coder/web :9502 fallback SPA, keeping every API/WS/health/MCP route.
This commit is contained in:
2026-06-03 02:23:11 +00:00
parent 39290957ae
commit 5da72c120a
48 changed files with 1014 additions and 2254 deletions

View File

@@ -780,6 +780,10 @@ export const MessageBubble = memo(function MessageBubble({
const isStreaming = message.status === 'streaming';
const failed = message.status === 'failed';
// F1 (D-10): a user Stop finalizes the turn as 'cancelled' — surface a muted
// "Stopped" label (not the red "message failed" — a deliberate Stop is not a
// failure), keeping whatever streamed before the abort.
const cancelled = message.status === 'cancelled';
// v1.13.7: match the MessageList.flatten trim guard so a whitespace-only
// assistant turn doesn't render an empty bubble + dangling ActionRow.
const hasContent = message.content.trim().length > 0;
@@ -826,6 +830,7 @@ export const MessageBubble = memo(function MessageBubble({
)}
</div>
)}
{cancelled && <div className="text-xs text-muted-foreground">Stopped</div>}
{!isStreaming && (modelLabel || null) && (
<span
className="inline-flex w-fit items-center rounded-full border border-primary/25 bg-primary/10 px-2 py-0.5 text-[10px] font-mono text-primary/90"