Commit page, ref-aware latest commit bar, and commit links - #156
Conversation
Add repository commit view at /{owner}/{repo}/commit/{sha} with read-only
diffs and file tree aligned with the PR review UX.
Link commit subjects from the repo overview bar, blob header, and directory
rows. Latest commit bar uses the selected ref tip (getRefHeadCommit) so it
updates when switching branches.
Includes commit tab type, read-only diff blocks, and GitHub API wiring for
single-commit fetch and ref head resolution.Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request introduces a new commit viewing feature to the dashboard. It adds a dedicated page and route for viewing individual commits, along with backend functions to fetch commit data, new query builders for caching, and UI components to display commit file diffs. The tab system is extended to support "commit" type tabs, and commit messages throughout the app are made clickable to navigate to specific commits. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CommitPage as CommitPage Component
participant Query as Tanstack Query
participant Backend as Server Functions
participant GitHub as GitHub API
participant CommitDiffPane as CommitDiffPane
participant ReviewFileDiffBlock as ReviewFileDiffBlock
User->>CommitPage: Navigate to /$owner/$repo/commit/$sha
CommitPage->>Query: useQuery(githubRepoCommitQueryOptions)
Query->>Backend: getRepoCommit({ owner, repo, sha })
Backend->>GitHub: repos.getCommit(owner, repo, sha)
GitHub-->>Backend: commit details + files
Backend-->>Query: { sha, message, date, author, files[] }
Query-->>CommitPage: commit data
CommitPage->>CommitDiffPane: render with commit.files
CommitDiffPane->>CommitDiffPane: initialize pagination (INITIAL_VISIBLE_COUNT)
loop For each visible file
CommitDiffPane->>ReviewFileDiffBlock: render(file, readOnly=true)
ReviewFileDiffBlock-->>CommitDiffPane: diff UI (no annotations)
end
CommitDiffPane->>CommitDiffPane: setup IntersectionObserver for scroll-to-load
User->>CommitDiffPane: scroll near bottom
CommitDiffPane->>CommitDiffPane: increment visible count by LOAD_MORE_CHUNK
CommitDiffPane->>ReviewFileDiffBlock: render additional files
User->>CommitDiffPane: click file in sidebar or navigate via hash
CommitDiffPane->>CommitDiffPane: scrollToFile() via ref or hash change
CommitDiffPane->>CommitDiffPane: requestAnimationFrame → element.scrollIntoView()
CommitDiffPane->>CommitDiffPane: history.replaceState(hash)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~40 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Deploying with |
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs | diffkit | a991540 | Apr 18 2026, 07:18 PM |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Adds a full commit view at
/{owner}/{repo}/commit/{sha}with a read-only diff experience similar to the PR review page (file tree + unified/split diffs).Details
LatestCommitBarloads the tip commit for the currently selected ref (getRefHeadCommit/listCommits), so it updates when switching branches instead of always showing the default branch tip.committab type for the browser tab strip;ReviewSidebaris reused for the file list.API
getRepoCommit— single commit + file patchesgetRefHeadCommit— lightweight ref tip for the barSummary by CodeRabbit