The HTML for the browse view was inlined as a template literal in
browse.ts, making it hard to edit and losing syntax highlighting.
Move it to browse.html and use placeholder replacement instead.
Also update branchDiff to accept the main branch as a parameter
so the caller resolves it once and reuses it for diffStat too.