You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Out of scope this issue: CSP header (Tuesday #2), __all__ cleanup (Tuesday #3), role Literal (Tuesday #7), session cache (Wednesday #4), benchmark gate (Wednesday #6), v0.1.0 release (Thursday #5).
Problem
The frontend JavaScript layer is modularized across static/js/ (router in app.js, page modules, 25+ renderer files under render/tool_result/ and render/tool_use/), but vitest coverage is concentrated in only four test files (shared/markdown.test.js, shared/state.test.js, shared/utils.test.js, render/registry.test.js). No tests exist for the router, session/project/search/export page modules, or individual renderer modules. vitest.config.js already targets static/js/**/*.test.js with jsdom and v8 coverage — the gap is test authoring.
Goal
One merged PR that lifts static/js/ line coverage from ~15% to ≥50% with vitest suites for the router, page modules, and ≥3 representative renderers — all green on the ubuntu/windows/macOS js-tests matrix.
Calendar Day
Monday, June 15, 2026
Planned Effort
8 story points — sprint item #1 (Medium)
Out of scope this issue: CSP header (Tuesday #2),
__all__cleanup (Tuesday #3), roleLiteral(Tuesday #7), session cache (Wednesday #4), benchmark gate (Wednesday #6), v0.1.0 release (Thursday #5).Problem
The frontend JavaScript layer is modularized across
static/js/(router inapp.js, page modules, 25+ renderer files underrender/tool_result/andrender/tool_use/), but vitest coverage is concentrated in only four test files (shared/markdown.test.js,shared/state.test.js,shared/utils.test.js,render/registry.test.js). No tests exist for the router, session/project/search/export page modules, or individual renderer modules.vitest.config.jsalready targetsstatic/js/**/*.test.jswith jsdom and v8 coverage — the gap is test authoring.Goal
One merged PR that lifts
static/js/line coverage from ~15% to ≥50% with vitest suites for the router, page modules, and ≥3 representative renderers — all green on the ubuntu/windows/macOSjs-testsmatrix.Scope
Touch points
static/js/app.js→app.test.jsstatic/js/sessions.js,projects.js,search.js,export.js→ co-located*.test.jsrender/tool_result/orrender/tool_use/(e.g.bash.js,file_read.js,edit.js)vitest.config.js(read-only — confirm jsdom + coverage config)Router (
app.test.js)#project/,#search, default)safeDecodefallback on malformed URIswindow.location.hashchanges triggeringhandleRoutePage modules
showWorkspace,loadSession,selectSession,copyAllshowProjects, empty-state handlingdoSearch(query, render, highlight, empty result)bulkExport(progress + 4xx/5xx),downloadSession(blob URL)Renderers
ToolResultUnion/ToolUseDictpayloads; assert DOMtextContent/classNamefetch(shapes frommodels/session.py,models/project.py,models/search.py)Acceptance Criteria
app.test.jscovers hash dispatch,safeDecodefallback, and hashchange →handleRoutesessions.test.jscoversshowWorkspace,loadSession,selectSession,copyAllprojects.test.jscoversshowProjects+ empty statesearch.test.jscovers query submission, result rendering, snippet highlighting, empty resultexport.test.jscoversbulkExportprogress/errors anddownloadSessionblob URLnpm testpasses in CI on ubuntu, windows, and macos (js-testsjob)npm run test:coverageshowsstatic/js/line coverage ≥50% (from ~15%)