What
DiffReviewModal (the class) is dead code. It is never constructed anywhere in src/.
$ grep -rn "new DiffReviewModal" src
(no matches)
The file is 319 lines: src/components/DiffReviewModal.ts.
How it got here
It was superseded by the inline review system in 4b7f608 ("inline diff - acceptance", 2025-12-26). That commit wired up InlineReviewController and stopped invoking the modal, but left the class and its call-site prep behind.
What is still needed from that file
Only the DiffReviewResult interface (line 18). Two files import it and both still use it:
src/components/InlineReview/InlineReviewController.ts:17
src/components/HydrateView/hydrateView.ts:14
hydrateView.ts:14 imports DiffReviewModal alongside it, and that half is unused — it shows up as an @typescript-eslint/no-unused-vars warning in the Obsidian directory scan.
Related leftover
src/components/HydrateView/hydrateView.ts:963 computes:
const instructions =
(toolCall.params.instructions as string) ||
`Apply ${toolName} to ${targetPath}`;
instructions is assigned and never read. It looks like it used to be passed to the modal constructor. Worth confirming that nothing else was meant to consume it before deleting.
Cost right now
Low but not zero:
- esbuild already tree-shakes the class out of
main.js (grep -c DiffReviewModal main.js → 0), so no bundle cost.
- It is 10 of the 33
diff-match-patch type errors in the Obsidian directory scan, so it costs lint work on code nobody runs.
- It is 319 lines a reader has to decide about.
Suggested fix
- Move
DiffReviewResult into src/components/InlineReview/types.ts (or src/types.ts).
- Update the two importers.
- Delete
src/components/DiffReviewModal.ts.
- Check
hydrateView.ts:963 and delete instructions if genuinely orphaned.
Note
Deliberately not bundled into the directory-compliance branch (chore/review-standards). That branch fixes the diff-match-patch typings in this file rather than deleting it, so the two changes stay separable and the compliance work does not quietly remove a feature.
What
DiffReviewModal(the class) is dead code. It is never constructed anywhere insrc/.The file is 319 lines:
src/components/DiffReviewModal.ts.How it got here
It was superseded by the inline review system in
4b7f608("inline diff - acceptance", 2025-12-26). That commit wired upInlineReviewControllerand stopped invoking the modal, but left the class and its call-site prep behind.What is still needed from that file
Only the
DiffReviewResultinterface (line 18). Two files import it and both still use it:src/components/InlineReview/InlineReviewController.ts:17src/components/HydrateView/hydrateView.ts:14hydrateView.ts:14importsDiffReviewModalalongside it, and that half is unused — it shows up as an@typescript-eslint/no-unused-varswarning in the Obsidian directory scan.Related leftover
src/components/HydrateView/hydrateView.ts:963computes:instructionsis assigned and never read. It looks like it used to be passed to the modal constructor. Worth confirming that nothing else was meant to consume it before deleting.Cost right now
Low but not zero:
main.js(grep -c DiffReviewModal main.js→ 0), so no bundle cost.diff-match-patchtype errors in the Obsidian directory scan, so it costs lint work on code nobody runs.Suggested fix
DiffReviewResultintosrc/components/InlineReview/types.ts(orsrc/types.ts).src/components/DiffReviewModal.ts.hydrateView.ts:963and deleteinstructionsif genuinely orphaned.Note
Deliberately not bundled into the directory-compliance branch (
chore/review-standards). That branch fixes thediff-match-patchtypings in this file rather than deleting it, so the two changes stay separable and the compliance work does not quietly remove a feature.