Fix high prio recommendations, add error / health screen

This commit is contained in:
2026-07-28 15:40:11 +02:00
parent 948f3e1a79
commit 7511311297
19 changed files with 1885 additions and 148 deletions

View File

@@ -97,6 +97,7 @@ within_status = "file" # "file" or "timestamp" (oldest first)
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
max_entries = 200 # bounded oldest-first pruning; 10-10000
[editing]
mode = "vim" # "vim" or "standard"; description field only for now
@@ -123,6 +124,7 @@ page_up = ["ctrl+u", "pgup"]
[keybindings.views]
open = ["enter", "l"]
dashboard = ["d"]
health = ["H"]
edit = ["e"]
toggle_list = ["tab"]
@@ -196,14 +198,25 @@ can be active together reports the context and both conflicting actions.
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.
fresh data arrives. Core PR and review data is rendered before check
annotations and conflict-file analysis finish. A failed subsection keeps its
last complete value, is marked partial, and does not discard the rest of a
successful refresh. Check annotations are fetched separately only for failed
checks and are reused by immutable check ID.
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.
usable without writing on every poll. Changed files are replaced atomically,
and oldest cache entries are pruned at the configured bound. Read state and
recoverable reply/metadata drafts use versioned, atomic files beside the
configuration.
Polling adapts to GitHub's reported rate-limit budget. It backs off as the
remaining budget gets low, honors server retry windows, and adds jitter to
avoid synchronized clients. Opening another PR or starting another refresh
cancels the superseded request.
GitHub's public APIs report whether a PR conflicts but do not expose its
conflicting file paths. For conflicting PRs only, `gh-threads` performs a
@@ -240,6 +253,7 @@ history and metadata.
| `h` / `l` | Focus the thread list / thread detail |
| `j` / `k` | Move between items or scroll the dashboard/focused detail |
| `?` | Show contextual keybinding help |
| `H` | Open application health and diagnostics |
| `d` | Open the current pull request dashboard |
| `e` | Edit the current PR title, target branch, and description from its dashboard |
| `/` | Fuzzy-search paths and filter with `status:`, `author:`, `updated:true` |
@@ -258,6 +272,15 @@ history and metadata.
| `r` | Refresh now |
| `q` | Quit |
The Health modal reports the interactive loop, configuration, GitHub API,
rate-limit budget and reset/retry time, disk cache, unread-state persistence,
draft recovery, core PR data, and secondary enrichment. Session warnings and
errors are retained there with their component and timestamp. Long diagnostics
wrap to the modal width. Refresh activity occupies a stable informational row
so polling does not reorder the report. Press `H` from the picker, dashboard,
or thread view; `b` or `esc` closes it without changing the underlying scroll
position.
The reply composer appears inline beneath the selected thread so its code and
comments remain visible while writing. It supports multiple lines: `enter`
inserts a newline, `ctrl-s` opens the rendered confirmation preview, and `esc`