chenglou / handwired
Code health
Hotspots average 5.7, the place fixes pay off most.
Explore this codebase
- Code health map92hotspots across 955 files
- Ownership712sole-owned files: one author, no second reader
- Architecture6modules, 5 entry points
- Decisions15recorded, of which 0 in force and 15 background
- Refactoring126open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 4
4 things worth doing in the week to Oct 15, the last indexed commit.
Worth planning
Break up render (CCN 160, 297 lines)
src/json-search/demo.ts:483
render nests deeply; easier to read and change once split; function changed in 14 commits; its file is imported by 1 file, changed 23 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 160, 297 lines, nests 7 deep
- severity
- high
Medium effort, worth a checkStart breaking up emitBitLoopWgsl (CCN 68, 782 lines): first lift lines 270-294
src/json-search/bit-emit.ts:270
emitBitLoopWgsl nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 8 commits; its file is imported by 13 files, changed 10 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 68, 782 lines, nests 4 deep
- severity
- medium
Medium effort, worth a checkTidy the code shape this week's commits left: 9 findings in 5 files
5 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
lab/json-search/gpu/writers-page.ts(2 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 9
- files
- 5
- commits
- 5
Medium effortStart breaking up compileWindowManagerCircuit (CCN 57, 936 lines)
lab/ui-exploration/event-time/window-manager.ts:470
compileWindowManagerCircuit nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 2 commits; its file is imported by 11 files, changed 8 times in 90 days.
- gain
- up to +1.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 57, 936 lines, nests 5 deep
- severity
- high
Medium effort, worth a check
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
Everything we found
6 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health2,138 open findingsCriticalDeep nesting · src/json-search/demo.ts21 findings · 7.7 deducted
- Refactoring126 open opportunitiesLowwriteEventQueue+0.6 health, S effort · lab/ui-exploration/input/events.ts
- Doc drift4Mediumlab/ui-exploration/text-tabulated/README.mdDocument names src/test-data.ts, which no longer exists.
- Decisions0 drifting from the codeMediumsrc/handwiredos/window-manager.tsHigh-churn file with no governing decision
- Ownership712 sole-owned filesMediumsrc/handwiredos/window-manager.tsOne author, no second reader
- Dead code1LowgetRiverIndicatorUnreachable function (11 lines)