generated from nhcarrigan/template
feat: fix git window and add pretty diff viewer #178
Reference in New Issue
Block a user
Delete Branch "feat/diff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix git window "Not a git repository" error — The working directory received from Claude Code is a WSL Linux path (e.g.
/home/naomi/...), but git commands were being run as native Windows processes with.current_dir(). Windows can't resolve WSL paths, causinggit rev-parse --git-dirto fail. Fixed by routing git commands throughwsl -- git -C <path>when the working directory starts with/.Add syntax highlighting and line numbers to diff view — Replaced the raw
<pre>block with a properDiffViewercomponent featuring:+/-) with green/red row backgroundshighlight.jsusing the detected file language, respecting all app themes via--hljs-*CSS variablesNew files
src/lib/utils/diffParser.ts— pure diff parsing logicsrc/lib/utils/diffParser.test.ts— 30 tests covering all line types, line number tracking, and language detectionsrc/lib/components/DiffViewer.svelte— the pretty diff viewer component✨ This pull request was created with help from Hikari~ 🌸