Calendar Day
Tuesday, July 1, 2026 (PR 2 of 2)
Planned Effort
3 story points (Medium–High) — sprint item #4
Depends on: Tuesday PR 1 (tool dispatch coordination #3) — static/tool_types.json is generated from KNOWN_TOOL_TYPES.
Problem
The frontend JavaScript SPA maintains its own independent registry of tool-type renderers (mapping tool type strings to DOM rendering functions). This registry was built by reading the backend dispatch table at development time but has no runtime or build-time linkage. If the backend adds support for a new tool type, the frontend silently falls through to a generic "unknown tool" renderer — producing a degraded but non-failing user experience that masks the gap.
Goal
One merged PR that generates static/tool_types.json from KNOWN_TOOL_TYPES, has the SPA cross-check its renderer map on init, logs console.warn for unknown types, and improves the fallback renderer to show raw type name and JSON payload.
Scope
Touch points
- Build step — writes
static/tool_types.json from KNOWN_TOOL_TYPES (Option A: generated manifest; no new API endpoint)
- Frontend SPA — fetch manifest on init; cross-check renderer map;
console.warn for backend types lacking a specific renderer
- Fallback "unknown tool" renderer — display raw tool type name and JSON payload
- CI check (part of
test_tool_dispatch_sync.py from PR 1) — verify frontend registry completeness against manifest
Out of scope
GET /api/tool-types endpoint (Option B — not recommended)
- New tool type implementations beyond existing renderers
Acceptance Criteria
Verification
cd C:\Users\Jasen\CppAliance\claude-code-chat-browser
.\.venv\Scripts\Activate.ps1
pytest tests/test_tool_dispatch_sync.py -q
pytest -q
Manual: load session with a tool type missing a specific renderer — confirm console warning and fallback display.
Calendar Day
Tuesday, July 1, 2026 (PR 2 of 2)
Planned Effort
3 story points (Medium–High) — sprint item #4
Depends on: Tuesday PR 1 (tool dispatch coordination #3) —
static/tool_types.jsonis generated fromKNOWN_TOOL_TYPES.Problem
The frontend JavaScript SPA maintains its own independent registry of tool-type renderers (mapping tool type strings to DOM rendering functions). This registry was built by reading the backend dispatch table at development time but has no runtime or build-time linkage. If the backend adds support for a new tool type, the frontend silently falls through to a generic "unknown tool" renderer — producing a degraded but non-failing user experience that masks the gap.
Goal
One merged PR that generates
static/tool_types.jsonfromKNOWN_TOOL_TYPES, has the SPA cross-check its renderer map on init, logsconsole.warnfor unknown types, and improves the fallback renderer to show raw type name and JSON payload.Scope
Touch points
static/tool_types.jsonfromKNOWN_TOOL_TYPES(Option A: generated manifest; no new API endpoint)console.warnfor backend types lacking a specific renderertest_tool_dispatch_sync.pyfrom PR 1) — verify frontend registry completeness against manifestOut of scope
GET /api/tool-typesendpoint (Option B — not recommended)Acceptance Criteria
static/tool_types.jsonis generated fromKNOWN_TOOL_TYPESand committed or produced at build timeconsole.warnwith the type name (not silent fallback)pytest,mypy --strict, andruffpassVerification
Manual: load session with a tool type missing a specific renderer — confirm console warning and fallback display.