Improve highlighting and add QoL changes

This commit is contained in:
2026-07-27 14:28:32 +02:00
parent 6bfe248388
commit 547cd123da
11 changed files with 989 additions and 109 deletions

View File

@@ -4,7 +4,10 @@ A read-only terminal UI for people receiving GitHub pull-request reviews. It
shows open PRs, review threads with highlighted diff hunks and comment authors,
reviewer/assignee state, and the latest commit's check rollup. Resolved threads
start folded. GitHub suggestion blocks are shown as syntax-highlighted
remove/add previews. The current PR is refreshed in the background.
remove/add previews. Comments render GitHub Flavored Markdown, including quoted
replies, inline and fenced code, lists and tasks, links, tables, emphasis,
strikethrough, emoji, and GitHub alerts. The current PR is refreshed in the
background.
## Install and run
@@ -13,13 +16,13 @@ Requires Go 1.24+ and an authenticated GitHub CLI:
```sh
go install .
gh auth login
gh-threads --repo owner/repository
gh-threads
```
To run directly from a source checkout instead:
```sh
go run . --repo owner/repository
go run .
```
Use `go run .`, not `go run main.go`: the latter compiles only `main.go` and
@@ -29,8 +32,16 @@ For automation, `GH_TOKEN` or `GITHUB_TOKEN` can still be provided and takes
precedence over the GitHub CLI credential. Enterprise token environment
variables are also supported.
By default the PR picker only includes open PRs authored by the authenticated
user. Pass `--all` to include every open PR:
By default the PR picker searches all repositories for open PRs assigned to the
authenticated user and groups the results by repository. Use `--repo` to limit
the picker to one repository:
```sh
gh-threads --repo owner/repository
```
With a repository selected, pass `--all` to include every open PR in that
repository:
```sh
gh-threads --repo owner/repository --all --poll 15s
@@ -50,6 +61,9 @@ gh-threads --repo owner/repository \
| --- | --- |
| `h` / `l` | Focus the thread list / thread detail |
| `j` / `k` | Move between threads or scroll the focused detail |
| `?` | Show contextual keybinding help |
| `/` | Fuzzy-search thread file paths |
| `↑` / `↓` | Choose a fuzzy-search match |
| `g` / `G` | First / last item |
| `enter` / `l` | Open a PR |
| `enter` | Toggle the selected review thread |
@@ -64,5 +78,6 @@ gh-threads --repo owner/repository \
The application is intentionally read-only. GitHub's GraphQL API currently
limits this client to the first 100 review threads and first 100 comments per
thread; the UI warns when the thread list is truncated. Markdown in comments is
displayed as readable wrapped text rather than fully rendered Markdown.
thread; the UI warns when the thread list is truncated. GitHub features which
depend on server-side context, such as unfurling issue references or displaying
uploaded images, are represented textually in the terminal.