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
Carve src/renderer/renderer.ts (~7000 lines) into ES modules by feature, behavior-preserving. This is the gating step — features can't be extracted until the monolith has seams.
Tasks
Add a renderer bundler (esbuild) so the renderer can use import/export while still loading as one renderer.js; keep tsc --noEmit for typechecking; main/preload stay CommonJS.
Verify the bundled renderer is behavior-identical (build + 340 tests green + app smoke-test).
Extract shared primitives into modules: state, elements, dom utils (escapeHtml, showToast), navigation (goToLine/jumpToTrendLine).
Vertical-slice proof: extract the Investigate feature into its own module importing the shared primitives.
Carve remaining features into modules incrementally (viewer, search, filter, analysis, trends, live, bookmarks, highlights, annotations, baselines, notes…).
Done when: renderer is a thin shell wiring feature modules; no single file > ~1500 lines; tests green.
Risk: low–medium (mechanical). Do NOT start L2/L3 extraction (other phases) before this lands.
Part of #14. Ref: docs/ARCHITECTURE_V2.md §6.
Carve
src/renderer/renderer.ts(~7000 lines) into ES modules by feature, behavior-preserving. This is the gating step — features can't be extracted until the monolith has seams.Tasks
import/exportwhile still loading as onerenderer.js; keeptsc --noEmitfor typechecking; main/preload stay CommonJS.state,elements, dom utils (escapeHtml,showToast), navigation (goToLine/jumpToTrendLine).Done when: renderer is a thin shell wiring feature modules; no single file > ~1500 lines; tests green.
Risk: low–medium (mechanical). Do NOT start L2/L3 extraction (other phases) before this lands.