Fleet event drawer — tool widget coverage + JSON-free log stream #1008
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#1008
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
User story
As an operator monitoring a fleet run, I want every event in the Log tab of the right drawer to render as a structured, readable widget — never as raw JSON — so that I can scan a run timeline without parsing nested objects.
Background
The dashboard's tool-call dispatcher (
apps/web/src/components/tool-call-widgets/index.tsx:37) routes events from a server-normalisedToolKind(packages/shared/src/tool-kind.ts:183) to a per-kind widget. Anything outside theANTHROPIC_TOOLS/CURSOR_TOOLSmatrix or themcp__prefix collapses tokind: "unknown"and gets dumped as raw JSON by<UnknownToolCallView>(apps/web/src/components/tool-call-widgets/unknown-tool-call-view.tsx:11).Operator review (2026-05-09) found multiple unmapped Claude Code built-ins surfacing as JSON in the live drawer (
ToolSearch,AskUserQuestion,Skill,ExitPlanMode,ScheduleWakeup,Agentwhen invoked under non-Taskaliases). Independently,assistantevents render a redundant[+]toggle that, when expanded, dumps{text, model, thinking[]}even though<Reasoning>already renders the thinking blocks above (apps/web/src/components/event-log.tsx:626-672).Acceptance criteria
Taxonomy (
packages/shared/src/tool-kind.ts)ToolKindliterals for the missing Claude Code built-ins:tool_search,ask_user_question,skill,exit_plan_mode,enter_plan_mode,schedule_wakeup. UpdateTOOL_KINDSarray.ANTHROPIC_TOOLSmap with the corresponding provider names (ToolSearch,AskUserQuestion,Skill,ExitPlanMode,EnterPlanMode,ScheduleWakeup).tool-kind.test.tsto cover the new mappings + ensure unmapped names still returnunknown.Widgets (
apps/web/src/components/tool-call-widgets/)index.tsxREGISTRY:tool-search-view.tsx— showquery+max_results; on completion, render match count.ask-user-question-view.tsx— render the question + options list (label + description per option), no JSON.skill-view.tsx— show skill name + args summary (one-line key/value).plan-mode-view.tsx— single component reused by bothexit_plan_modeandenter_plan_mode; show plan text rendered as markdown when present.schedule-wakeup-view.tsx— showdelaySeconds(formatted asNm Ns),reason, truncatedpromptpreview.<WidgetFrame>+lifecycleState()fromshared.tsxso state pills + frame styling stay consistent.UnknownToolCallView replacement
safeStringify<pre>block with a structured key/value list: one row per top-level key inargs, value rendered as a single-line monospace string withclip()truncation.resultis present, render under aResultdivider with the same key/value format.import.meta.env.DEV(gated by a small<DevRawJson><details>block) so the production drawer never shows JSON.Assistant detail toggle
event-log.tsxEventRowBase(line 656-672), suppress the[+]detail toggle forev.type === "assistant"whosedetailis already covered by the<Reasoning>block (i.e.detail.thinkingis the only non-trivial field).detailis non-empty and not otherwise rendered.Tests
<UnknownToolCallView>renders no{/}characters in production mode for a representative payload.event-log.tsxconfirming anassistantevent withdetail.thinkingdoes not render the[+]toggle.Out of scope
References
apps/web/src/components/tool-call-widgets/index.tsx:37— REGISTRY.apps/web/src/components/tool-call-widgets/unknown-tool-call-view.tsx:11— JSON dump path.apps/web/src/components/event-log.tsx:626-672— assistant[+]detail toggle + generic detail fallback.packages/shared/src/tool-kind.ts:135— Anthropic tool name → kind map.