Skip to content

fix(web): a commit with no checks says so in one line - #671

Merged
PastaPastaPasta merged 1 commit into
masterfrom
fix/commit-no-checks-line
Nov 23, 2026
Merged

PastaPastaPasta merged 1 commit into
masterfrom
fix/commit-no-checks-line

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

Every commit page opened with a large dashed "No checks reported for …" card, with an icon and a paragraph on how CI records runs (dg ci runner new, the GitHub Action, dg ci report). It sat above the diff. Most commits have no checks, so most visitors saw it, and on a phone it took most of the first screen.

A commit with no check runs now gets one quiet line: "No checks reported for a61a8f0". A commit with runs (or a read error) still gets the full Checks panel, unchanged. The PR page's Checks tab keeps its explanatory empty state.

Before (live, build 3e672fb) and after (local static build of this branch, 213996b), prime-number-finder commit a61a8f0 on testnet:

Before After
Phone (390 px) before after
Desktop before after

Test: components/repo/commit-unreachable.test.tsx adds a case where the read returns no runs and asserts the one line, with no panel. tsc and eslint are clean. e2e/ci-checks.spec.ts (a commit with runs) still reads the commit-checks section.

Found in UX wave 5's browse probe.

🤖 Generated with Claude Code

Every commit page opened with a large dashed "No checks reported" card
explaining how CI records runs, above the diff; on a phone it filled the
screen. A commit with no check runs now gets one quiet line, and the
full panel stays for commits that have runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0acaa4bc-dbf8-4953-86b6-59f0aa57e118
Commits

Reviewing files that changed from the base of the PR and between 4e34b8d and 213996b.

Files selected for processing: 2

  • forge-web/components/repo/commit-content.tsx
  • forge-web/components/repo/commit-unreachable.test.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve

The new branch (forge-web/components/repo/commit-content.tsx:188) fires only when ChecksTab would have shown its own empty state, so it hides nothing.

  • Members-only runs: the read already merges runs from this commit's blinds into runs (commit-content.tsx:179-181). If any exist, runs.length > 0 and the full panel renders. ChecksTab's useMembersRuns only renames runs already in that list. With zero runs it has nothing to resolve.
  • Untrusted / uncounted runs: readCheckRuns keeps every newest run and only sets trusted on it (lib/repo/checks.ts:282). It filters nothing out, so a commit with only untrusted runs still gets the panel and its "not counted" notes.
  • Expected checks: the commit page never passes expected, so ChecksTab's empty-state test (pull-tabs.tsx:316, runs.length === 0 && expected.length === 0) reduces to the same condition.
  • Loading / error: while loading, checks.data is null and undefined === 0 is false, so it falls through to LoadingBlock. On a deps change (for example, blinds appear after a members session unlocks), useAsync resets data to null synchronously, so a stale empty result never sits under the new key. Errors still reach ErrorState with retry, because the branch requires error === null.
  • Test (commit-unreachable.test.tsx:73-79): sound. It fails on master, where the mocked ChecksTab renders "0 run(s)". The existing first case still covers runs > 0 rendering the panel. Optional nit: there is no case asserting that loading (data null) or an error keeps the panel. A one-line readCheckRuns.mockRejectedValueOnce case would lock that in.
  • Accessibility: the section keeps aria-label="Checks" and the commit-checks testid, the icon is aria-hidden, and the sentence carries the meaning. The empty case has no h2 now, which is fine for one line.
  • Minimal: yes, one early return plus one import. e2e/ci-checks.spec.ts only covers a commit with runs, so it still uses the panel path. No other e2e looks for the commit page's empty-state card.

Checked locally on 213996b: vitest run components/repo/commit-unreachable.test.tsx passes (3 tests) and tsc --noEmit is clean.


🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta merged commit b1add47 into master Nov 23, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant