Commit page, ref-aware latest commit bar, and commit links#156
Merged
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.
Contributor
|
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 |
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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