storytold / photocraft
Code health
This codebase scores 5.8 out of 10 for code health, which we rate fair. It also scores maintainability 6.4 and static performance 9.8 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 339 of 1,600 files are git hotspots, and they average 4.3 — which is where the fixes pay off most.
Do next
4 suggested
5 things worth doing in the week to Oct 18, the last indexed commit, 2 of them now.
Now
- Critical
Clean up what this week's commits left: 5 serious findings in 5 files
4 commits in the last 7 days added or worsened them, and they are still open. Start with
crates/ui-egui/src/canvas_tool_menu.rs, which has 1 critical.- serious findings
- 5
- critical
- 2
- files
- 5
Medium effort
Worth planning
Break up canvas_view (CCN 376, 1,031 lines)
crates/ui-egui/src/canvas.rs:4081
canvas_view nests deeply; easier to read and change once split; its file is imported by 99 files, changed 301 times in 90 days.
- gain
- up to +0.2 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 376, 1,031 lines, nests 8 deep
- severity
- critical
Medium effort, worth a checkStart breaking up handle (CCN 134, 262 lines): first lift lines 403-424
crates/ui-egui/src/shortcuts.rs:403
handle does several jobs side by side; easier to read and change once split; function changed in 45 commits; its file is imported by 5 files, changed 56 times in 90 days.
- gain
- up to +0.4 health on this file(inferred)
- finding
- Bumpy road
- size
- CCN 134, 262 lines, nests 3 deep
- severity
- high
Medium effort, worth a checkBreak up build (CCN 13, 978 lines)
crates/engine/src/commands.rs:1422
build nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 84 commits; its file is imported by 116 files, changed 112 times in 90 days.
- gain
- up to +1.3 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 13, 978 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
- Lines of code
- 495.4K
Recent activity
All commitsCommits
- 6cec0cabSave: a read-only file is refused, so its metadata test asserts that21h ago
- c6fd7124docs: add user docs in docs/user (#3951)21h ago
- f3fb5781Lens Blur: an alpha channel as the depth map source, as in Photoshop (#7400) (#7508)22h ago
- ca69059dEdit: Copy with no selection keeps fill and adjustment layers (#2344) (#7497)22h ago
- 72a3423aPreferences: Enable Gestures off ignores touch-screen pinch and twist (#204) (#7478)22h ago
- 8736098dCurves: Cmd/Ctrl-click on the image adds a point at the pixel's tone (#7473)22h ago
Decisions
- Detect external file changes on Save; prompt before overwritingproposed · 19h ago
- Apply monitor profile per display used by each window; report applied profile and fallbacksproposed · 19h ago
- Export As: exact pixel sizing, named presets, and profile/metadata optionsproposed · 19h ago
- Add Lab TIFF support with CIELab/CIClab mapping and Lab document preservationproposed · 19h ago
- Discard saved ui.ron that crashes startup; remember window/panel sizes safelyproposed · 19h ago
- macOS: quit with terminate: instead of closing the windowproposed · 19h ago
Everything we found
8,250 open
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.
- worst item is critical severity. Code health6,671Complex method · crates/ui-egui/src/type_tool_tests.rs38 findings · 8.0 deducted
- worst item is medium severity. Refactoring655Session+1.2 health, L effort · crates/engine/src/lib.rs
- worst item is medium severity. Doc drift4crates/raw/README.mdDocument names docs/camera-preview-colour.md, which no longer exists.
- worst item is medium severity. Decisions372crates/ui-egui/src/canvas.rs33 awaiting review · 339 hotspots ungoverned
- worst item is medium severity. Ownership548crates/engine/src/doc_path/tests.rs100% single-owner concentration, 3 commits in 90d
Composition
Open the graph- rust99%
- shell1%
- python<1%
- dockerfile<1%
Explore this codebase
- Docs2,256 pages across 7 modules
- ChatAsk this codebase a question and get an answer with its sources.
- Files1,600 files with per-file docs, health and history
- ArchitectureDependency graph, layers, and 34 entry points
- Code healthPer-file scores, 8,401 open findings, coverage and refactoring targets
- Knowledge graphEntities, communities, and the paths between them
- Change couplingFiles that keep changing together, mined from commit history
- CommitsChange-risk ranked history with agent provenance
- ContributorsBus factor, per-file maintainers, and the human/agent split
- StatsSize class, origin, lifetime churn, rhythm and records
- CostsWhat indexing this snapshot cost, by model and by run.