Why
The code browser highlights a blob, but the commit, compare, and change-request Files views render the same source as plain text. Reviewing a diff is where colour helps most.
What changed
diffFilenow carries a Prism language derived from the new path, or the old path for a deletion.- The shared diff template carries that language on the file section and marks every code cell as
oldornew. app.jsqueues a diff once per side. Highlighting old and new as one stream would let a multiline comment or string started on one side colour lines from the other.- The token palette now covers diff cells as well as blob cells.
- Added tests for language selection (including deletions and renames) and for the rendered diff markers.
Verification
node --check server/web/static/app.jsgo test ./... -count=1vole workflow checkvole workflow run verify(format, vet, build, govulncheck, packaging, links, race tests)
This is separate from #62: that request fixes the Prism worker and HTMX/CSP errors; this one adds highlighting to diffs.