feat: PR git-log (l) & diff (d) overlays + fix bulk-search 502#9
Merged
Conversation
The bulk all-open-PRs search spans every configured org/user at once. The merged CI/merge-state features added mergeStateStatus (an expensive computed field, unused by the list) plus per-PR statusCheckRollup, pushing each request past GitHub's search complexity budget and returning 502 Bad Gateway. With the result empty, repos showed 0 PRs despite nav counts. - Drop mergeStateStatus from the bulk search/repo queries (kept in the on-demand PR_DETAIL_QUERY that the overlay fetches fresh). - Halve the search page size (100 -> 50) to cut per-request complexity. - Retry transient 5xx in the GraphQL query path with backoff.
Content-pane keys for the highlighted PR:
- l -> git-log overlay: the PR's recent commits (reuses the on-demand
detail fetch; nav tree keeps l = expand/select)
- d -> diff overlay: full unified diff via REST (Accept: v3.diff), with
+/-/@@ coloring, scrollable with j/k
- while an overlay is open, l/d switch between the two; Esc/h closes
Adds an Overlay enum (replacing detail_open), a pr_diffs cache, a
fetch_pr_diff REST call with a rest_base helper, and a generalized
on-highlight debounce that fetches commits or diff by active overlay.
Both caches clear on refresh.
sashml
added a commit
to sashml/ghdash
that referenced
this pull request
Jul 1, 2026
Rebased onto current main and reconciled with the git-log/diff overlay rework (zombocoder#9): the filter + help are additive and independent of the per-PR Overlay state. - `f` cycles the merge filter: all -> conflicting -> clean; active filter shown in the table title. Composes with `/` search (applied in filtered_prs). - `?` opens a help overlay documenting all keybindings (incl. l: log, d: diff) and the State/CI glyph legends (accessibility: glyphs are now documented). - state: MergeFilter enum + merge_filter/help_open; Esc/h close help first. - tests: cycle order, help toggle, back-closes-help, filter + search composition. Refs: zombocoder#10, zombo-sash-eco-pp0u
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related changes surfaced while testing the recently merged CI/merge-state PRs.
1. Fix: repos showed 0 PRs (bulk-search 502)
The nav sidebar showed
repo [5]but selecting it showed No open pull requests. Root cause: repo PR lists are filtered from a single "all open PRs" search that spans every configured org/user at once. The merged features addedmergeStateStatus(expensive, computed, and unused by the list) plus per-PRstatusCheckRollup, pushing each request past GitHub's search complexity budget → 502 Bad Gateway → emptyall_open_prs→ every repo shows 0.mergeStateStatusfrom the bulk search/repo queries (kept in the on-demandPR_DETAIL_QUERY).2. Feature: git-log (
l) and diff (d) overlaysContent-pane keys acting on the highlighted PR:
ldAccept: application/vnd.github.v3.diff),+/-/@@/header coloring, scrollable withj/k.Esc/hcloses;Enter/ostill opens in the browser.Overlayenum (replacesdetail_open),pr_diffscache,fetch_pr_diff+rest_base(Enterprise-aware), generalized on-highlight debounce. Both caches clear on refresh.Testing
cargo build,cargo clippy --all-targets --all-features,cargo fmt --check,cargo test(36 passed) all clean. Replaced the old detail-toggle tests with coverage for log/diff toggle, switching, and Esc-closes.The live diff fetch needs the interactive TUI + a token, so please verify by running the app: highlight a PR, press
lfor commits anddfor the diff.