mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
Backend: GET /git/file reads a file at a branch tip (read_file_at_branch) and slices it to a line window — explicit start/end, a line+context center, or the whole file capped at 2000 lines. _compute_file_range is the pure helper (unit-tested). Frontend: useGitFile hook + CodeSnippet (styled <pre>, line numbers, active- line highlight — matches git-diff-viewer, no shiki). Wired into FindingCard so each file:line finding shows the surrounding source. Fail-open: a missing file renders a muted hint, never breaks the card. Co-authored-by: Renn F <rennf93@users.noreply.github.com>