Vite doesn't polyfill Node's path module in the browser bundle (webpack on
Next did), so `import { basename } from 'path'` crashed the whole
/project/[ref]/merge route on the TanStack build with 'Module "path" has
been externalized for browser compatibility'. Replace the two basename
call sites with a string helper.
Claude-Session: https://claude.ai/code/session_01MLH8WVg8zBJnmZTYTV3ooo