feat(ui): link run commit ids to GitHub /commit/<sha>#472
Open
alexmond wants to merge 1 commit into
Open
Conversation
Wherever a project run's commit shows as a short sha, link it to the commit on the repo host when the project has a repo URL. GitHub resolves abbreviated shas, so the displayed short sha is a valid link ref. - AnalyticsView: repoCommitBase(repoUrl) helper (reuses repoBase, which rejects non-http(s) schemes) + latestRunLine(cur, repoCommitBase) overload that carries a built commitUrl. - Shared latestRunLine fragment: adds a GitHub octicon link on the sha (keeps the internal run link). Threaded through the overview, coverage, timing and tests page services. - Project overview "Recent runs": the Commit column links to the commit, both server-rendered rows and the live SSE-updated row (commitCell in the inlined script, base validated to http(s) server-side). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QmnyrHG366UPQTbtsimzkj
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.
Wherever a project run's commit shows as a short sha, it now links to the commit on the repo host — when the project has a repo URL. GitHub resolves abbreviated shas, so the displayed short sha is a valid link target.
Surfaces
<repo>/commit/<sha>, both the server-rendered rows and the live SSE-updated "just now" row.Mechanics
AnalyticsView.repoCommitBase(repoUrl)reusesrepoBase, which rejects non-http(s)schemes (XSS guard) — so the commit base is always a safe scheme.latestRunLine(cur, repoCommitBase)overload carries a pre-builtcommitUrl; the no-arg overload keeps prior behavior.textContentfor the label).Covered by a new assertion in
NewOverviewPageIntegrationTest(sets a repo URL, asserts the/commit/<sha>link renders).🤖 Generated with Claude Code