Add more QoL and high prio features

This commit is contained in:
2026-07-28 10:17:18 +02:00
parent 43fa047765
commit fdaee6a69e
16 changed files with 2850 additions and 302 deletions

View File

@@ -3,8 +3,10 @@
A read-only terminal UI for people receiving GitHub pull-request reviews. It
shows open PRs and a scrollable PR dashboard with the description, branches,
review state, checks, people, labels, milestone, activity, change statistics,
and thread totals. The thread viewer includes highlighted diff hunks and comment
authors. Resolved threads start folded. GitHub suggestion blocks are shown as
thread totals, submitted reviews, and the PR conversation. Review threads and
comments are paginated rather than silently stopping at the first page. The
thread viewer includes highlighted diff hunks and comment authors. Resolved
threads start folded. GitHub suggestion blocks are shown as
syntax-highlighted remove/add previews. Comments and PR descriptions render
GitHub Flavored Markdown, including quoted replies, inline and fenced code,
lists and tasks, links, tables, emphasis, strikethrough, emoji, and GitHub
@@ -67,7 +69,7 @@ On Linux this is normally `~/.config/gh-threads/config.toml`. On macOS,
exists.
```toml
theme = "dark" # "dark" or "light"
theme = "dark" # dark, light, high-contrast, or no-color
refresh_interval = "10s"
repository = "" # optional owner/repository default
show_all = false # requires repository
@@ -77,7 +79,8 @@ endpoint = "https://api.github.com/graphql"
[display]
fold_resolved = true
thread_list_width_percent = 33 # 20-60
dashboard_mode = "hotkey" # "hotkey" or "intermediate"
dashboard_mode = "hotkey" # "hotkey" or "intermediate"
compact_reviews = true # aggregate submitted review history
[paths]
scroll = false
@@ -88,20 +91,44 @@ scroll_interval = "350ms" # minimum 50ms
# resolved threads remain in "resolved" even when they are also outdated.
status_order = ["unresolved", "outdated", "resolved"]
within_status = "file" # "file" or "timestamp" (oldest first)
[cache]
enabled = true # instant stale view plus offline fallback
max_age = "168h" # 7 days; 0 means no age limit
directory = "" # defaults to the OS user cache directory
```
When cached data exists, the picker and PR details are rendered immediately
from that snapshot while a live GitHub refresh runs in the background. Cached
screens are labelled with their save time and are replaced automatically when
fresh data arrives. Check annotations are fetched separately only for failed
checks so they do not inflate the initial PR query.
The cache uses separate JSON files for the picker and each visited PR. Cache
content is hashed before writing: unchanged responses do not rewrite their
files. Their modification time is touched at most once per day (or half the
configured maximum age, when shorter) so recently validated snapshots remain
usable without writing on every poll. Changed files are replaced atomically.
Command-line flags override the configuration. `GH_REPO` overrides the
configured repository when `--repo` is not provided. The corresponding flags
include `--config`, `--theme`, `--poll`, `--fold-resolved`,
`--thread-list-width`, `--dashboard-mode`, `--path-scroll`, and
`--path-scroll-interval`. Boolean settings can be disabled explicitly, for
example `--path-scroll=false`.
`--thread-list-width`, `--dashboard-mode`, `--compact-reviews`,
`--path-scroll`, and `--path-scroll-interval`, plus `--cache`,
`--cache-max-age`, and `--cache-dir`.
Boolean settings can be disabled explicitly, for
example `--compact-reviews=false`.
With the default `dashboard_mode = "hotkey"`, opening a PR goes directly to its
review threads and `d` opens the dashboard only when requested. Set
`dashboard_mode = "intermediate"` to follow picker → dashboard → review
threads instead.
Compact reviews aggregate submission counts by state and author. Reviews with
a written summary retain a compact one-line body, while timestamps and commit
SHAs are omitted. Set `compact_reviews = false` to restore the complete review
history and metadata.
## Keys
| Key | Action |
@@ -110,7 +137,9 @@ threads instead.
| `j` / `k` | Move between items or scroll the dashboard/focused detail |
| `?` | Show contextual keybinding help |
| `d` | Open the current pull request dashboard |
| `/` | Fuzzy-search thread file paths |
| `/` | Fuzzy-search paths and filter with `status:`, `author:`, `updated:true` |
| `F` | Clear active thread filters |
| `n` / `N` | Next / previous thread with a new update |
| `↑` / `↓` | Choose a fuzzy-search match |
| `g` / `G` | First / last item |
| `enter` / `l` | Open the selected PR dashboard or its review threads |
@@ -124,8 +153,11 @@ threads instead.
## Current scope
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. GitHub features which
depend on server-side context, such as unfurling issue references or displaying
uploaded images, are represented textually in the terminal.
The application is intentionally read-only. The dashboard and contextual help
show the write capability gate, including why each future write action is
unavailable. Read state persists beside the configuration, and recent PR data
is cached for offline fallback. Check contexts and annotations are paginated.
GitHub features which depend
on server-side context, such as unfurling issue references or displaying
uploaded images, are represented textually in the terminal. See
[`TODO.md`](TODO.md) for remaining read-only work and write-support preparation.