Skip to content

feat: Add a Checks tab to pull requests - #29

Merged
DeepanshuMishraa merged 2 commits into
DeepanshuMishraa:mainfrom
cheetahbyte:feat/pr-checks-tab
Nov 14, 2026
Merged

DeepanshuMishraa merged 2 commits into
DeepanshuMishraa:mainfrom
cheetahbyte:feat/pr-checks-tab

Conversation

@cheetahbyte

@cheetahbyte cheetahbyte commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pull requests get a fourth tab, Checks (4), after Code. It lists every check grouped by workflow, failing first, with durations. enter opens a GitHub Actions job the way GitHub's job page shows it: steps that open and close, the failed ones already open and scrolled to the last error, numbered lines with errors, warnings and commands marked and the log's own colors, and the runner's groups folded. r re-runs with GitHub's options: failed jobs, this job, or all jobs.

Summary    Timeline    Code    Checks                ✗ 1 of 16 failing

✗  integration-tests (macos-latest)
   Unit and Integration Tests · failed after 59s

  ▸ ✓  Set up job                                                   1s
  ▸ ✓  Check out code                                               2s
▌ ▾ ✗  Set up Go                                                   53s
    1  Warning: Failed to download action
         'https://codeload.github.com/actions/setup-go/tar.gz/b7ad1dad
         31e06c5925ef5d2fc7ad053ef454303e'. Error: nodename nor
         servname provided, or not known (codeload.github.com:443)
    …
    6  Error: Failed to download archive …
  ▸ –  Build executable
  ▸ ✓  Post Check out code                                          1s

↑↓ pick   e open all groups   r re-run   o on GitHub   esc back
  • Data (src/pr.rs): checks keep their workflow, start and end times, and Actions run and job ids, which are read from the details link. job_log reads repos/{repo}/actions/jobs/{id} for the steps and, once the job is done, …/logs. split_log assigns log lines to steps using the runner's step-start lines (##[group]Run …, Post job cleanup., Cleaning up orphan processes) and whole-second step times. A composite action's own groups stay in its step, and a step keeps its last 5,000 lines.
  • View (src/prview.rs): the tab, the job view with ANSI colors and wrapping that breaks at spaces with a hanging indent, the re-run picker, and polling. The PR is read again every 20 s while any check runs, and an open unfinished job every 5 s. After a push or a re-run, an open job follows the check to its new job id.
  • Code tab (src/diffview.rs): 4, → and tab go on to Checks.

Why

Finding out why CI failed meant leaving leaf for the browser, and gh run view --log-failed prints the whole job as one block (often labelled UNKNOWN STEP) that's hard to read in a terminal.

Evidence

  • cargo test: 355 passed, 2 ignored. The new regression tests cover: polling while a check runs and another failed; a group longer than the line limit keeping its end; failed log downloads being retried; composite-action groups staying in their step; a refresh following the check to its new job, or closing the log when the check is gone; a failed step opening the group that holds its last error; logs fitting a 12-column pane.
  • cargo clippy --all-targets: no warnings in the changed files.
  • Manual, in a terminal: Make triage formatting checks nonblocking cli/cli#15052 (one failed macOS job), fix(api): align Android with current server contracts crumble-project/android#17 (all passing). Checked the list, opening steps and groups, wrapping at 76 and 110 columns, tab navigation in both directions including from Code, the help screen, the footers, and the re-run picker and confirm prompt (with the write-access check removed temporarily, then cancelled).
  • The job log format was checked against a real …/jobs/{id}/logs response.
  • Not verified live: an actual gh run rerun (no write access to a repo with Actions); a running job's step updates (none was running); logs with ANSI colors.

Risk & Rollback

Reversibility: Reversible

Blast Radius: leaf pr only, plus the Code tab's keys in the diff reviewer.

  • Key changes: in Code, tab and → go to Checks (before, tab went back to Summary and → did nothing). On the Checks tab, r re-runs instead of marking the PR ready, and o opens the picked check instead of the PR.
  • Polling adds gh calls while checks run: one PR read every 20 s, and one job read every 5 s while an unfinished job is open.
  • A log line at a step boundary can still land in the neighbouring step when the runner prints no marker line there.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread src/prview.rs Resolved
Comment thread src/prview.rs Resolved
@cheetahbyte

Copy link
Copy Markdown
Contributor Author

@DeepanshuMishraa what do you think about this?

@DeepanshuMishraa

Copy link
Copy Markdown
Owner

@DeepanshuMishraa what do you think about this?

This is great , nice job 🙌

@DeepanshuMishraa
DeepanshuMishraa merged commit 90e985d into DeepanshuMishraa:main Nov 14, 2026
1 check 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.

2 participants