What
Several load-bearing files have grown well past the point where one reader can hold them, measured today (post-v0.13.0):
| File |
Lines |
mureo/_data/web/dashboard.js |
4,624 |
mureo/mcp/server.py |
1,559 |
mureo/web/reports.py |
1,070 |
mureo/mcp/tools_mureo_context.py |
916 |
Why now
Each of the last several changes (#663, #665, #670, #671) paid a growing tax: implementers merge-conflict inside dashboard.js on unrelated features, and reviewers must re-derive which of its ~40 render functions belong to which view. reports_format.js (618 lines) shows the pattern that works — a focused module with its own test file and an export-surface pin in tests/js/browser_contract.test.js.
Proposed cuts (mechanical moves, no behaviour change)
dashboard.js → keep bootstrapping/nav/bindings; move the reports view renderers (renderReportsLatest, buildReportStat*, triage wiring) next to reports_triage.js/reports_overview.js where their logic already lives; move settings/clients/security view renderers into per-view modules. Every move keeps its DOM pins; browser_contract.test.js re-pins the new surfaces.
mureo/mcp/server.py → hoist the instructions composition (_server_instructions, _workspace_instruction, _platform_model_instruction, _plugin_tool_owners) into a module; hoist validation/dispatch helpers.
mureo/web/reports.py → split the STATE.json read layer (document resolution, tolerant re-read) from the summary/aggregation layer.
mureo/tools_mureo_context.py is at the boundary; split only if a natural seam exists (schema constants vs handlers).
One PR per file, byte-identical behaviour asserted by the existing suites; no API changes.
What
Several load-bearing files have grown well past the point where one reader can hold them, measured today (post-v0.13.0):
mureo/_data/web/dashboard.jsmureo/mcp/server.pymureo/web/reports.pymureo/mcp/tools_mureo_context.pyWhy now
Each of the last several changes (#663, #665, #670, #671) paid a growing tax: implementers merge-conflict inside
dashboard.json unrelated features, and reviewers must re-derive which of its ~40 render functions belong to which view.reports_format.js(618 lines) shows the pattern that works — a focused module with its own test file and an export-surface pin intests/js/browser_contract.test.js.Proposed cuts (mechanical moves, no behaviour change)
dashboard.js→ keep bootstrapping/nav/bindings; move the reports view renderers (renderReportsLatest,buildReportStat*, triage wiring) next toreports_triage.js/reports_overview.jswhere their logic already lives; move settings/clients/security view renderers into per-view modules. Every move keeps its DOM pins;browser_contract.test.jsre-pins the new surfaces.mureo/mcp/server.py→ hoist the instructions composition (_server_instructions,_workspace_instruction,_platform_model_instruction,_plugin_tool_owners) into a module; hoist validation/dispatch helpers.mureo/web/reports.py→ split the STATE.json read layer (document resolution, tolerant re-read) from the summary/aggregation layer.mureo/tools_mureo_context.pyis at the boundary; split only if a natural seam exists (schema constants vs handlers).One PR per file, byte-identical behaviour asserted by the existing suites; no API changes.