#959·gh-dash

[BUG] PR sidebar counts never-dispatched check suites as "in progress"

Author: andschdkCreated Sep 2, 2026Updated Sep 2, 2026
Labelsbug

Describe the bug

The PR sidebar's checks section reports checks as in progress when none are running. On a PR of mine it shows 4 skipped, 4 in progress while GitHub's own PR page shows only the 4 skipped checks and nothing pending. The Pending list in the sidebar also gets 4 entries labelled Workflow.

The cause is the check suites loop at the end of getChecksStats (internal/tui/components/prview/checks.go:646):

go
// Count check suites that don't appear in statusCheckRollup
for _, suite := range lastCommit.Commit.CheckSuites.Nodes {
	if suite.Conclusion == "ACTION_REQUIRED" {
		res.awaitingApproval++
	} else if suite.Status == "QUEUED" || suite.Status == "PENDING" || suite.Status == "WAITING" {
		res.inProgress++
	}
}

GitHub returns check suites that were created but never dispatched: status: QUEUED, conclusion: null, workflowRun: null, and zero check runs. They are invisible in GitHub's UI, but every one of them bumps inProgress here. The same loop at checks.go:446 renders them in the Pending section, falling back to the "Workflow" placeholder name because neither the workflow nor the app name is set.

The GraphQL response for the affected PR (4 skipped checks, 2 successful):

statusCheckRollup.contexts.checkRunCountsByState: SKIPPED 4, SUCCESS 2

checkSuites.nodes:
  status QUEUED,    conclusion null,    workflowRun null,  checkRuns.totalCount 0
  status QUEUED,    conclusion null,    workflowRun null,  checkRuns.totalCount 0
  status QUEUED,    conclusion null,    workflowRun null,  checkRuns.totalCount 0
  status QUEUED,    conclusion null,    workflowRun null,  checkRuns.totalCount 0
  status COMPLETED, conclusion SUCCESS, workflowRun set,   checkRuns.totalCount 5
  status COMPLETED, conclusion SUCCESS, workflowRun set,   checkRuns.totalCount 1

The two real suites hold all 6 check runs from the rollup, so the four QUEUED suites contribute nothing but the bogus count. That the phantom count happens to equal the skipped count here is a coincidence, not a double count of skipped checks.

The loop's comment says it counts suites "that don't appear in statusCheckRollup", but it never checks whether a suite has any check runs, so empty suites are always counted.

To Reproduce

  1. Open a PR whose last commit has check suites that were never dispatched (status: QUEUED, no workflow run, no check runs). The GraphQL query below reveals them:
gh api graphql -f query='query{repository(owner:"OWNER",name:"REPO"){pullRequest(number:NUM){
  commits(last:1){nodes{commit{
    statusCheckRollup{contexts(last:100){checkRunCountsByState{count state}}}
    checkSuites(last:20){nodes{status conclusion workflowRun{workflow{name}} checkRuns(first:0){totalCount}}}
  }}}
}}}'
  1. Run gh dash and select that PR.
  2. The checks section reads ... , N in progress where N is the number of empty suites, and the Pending list shows N rows named Workflow.

Expected behavior

Check suites that were never dispatched should be ignored, matching GitHub's UI. For the PR above the sidebar should read 4 skipped, 2 successful, with no Pending section. Genuinely queued workflow runs should still count, since those have a non-null workflowRun.

The section title is affected too: inProgress > 0 wins over the success branch in viewChecksStatus, so the PR shows "Some checks haven't completed yet" instead of "All checks have passed".

Note that the PR list column is unaffected - getStatusCheckRollupStats reads only the rollup counts and has no check suites loop. This is sidebar-only.

A possible fix

Query checkRuns { totalCount } per suite and skip suites with no check runs and no workflow run, in both the stats loop (checks.go:646) and the render loop (checks.go:446). I have this running locally against the affected PR and it gives the expected 4 skipped, 2 successful; existing tests still pass.

Happy to open a PR if you'd like it in that shape.

Desktop

  • OS: macOS (Darwin 25.1.0, arm64)
  • Terminal Emulator: Ghostty
  • Using tmux? yes
  • gh-dash version: v4.25.2 (also present on main at 4ea7c39)