GitHub picker mechanics
This page holds the detailed behavior behind the GitHub picker overview.
Entry source
Items come from standalone YAML configs:
~/.config/tmux/scripts/pickers/github/gh-picker-work.yml~/.config/tmux/scripts/pickers/github/gh-picker-home.yml
Each file defines PR and issue sections using GitHub Search syntax. lib/gh_items_main.py parses the config, uses GraphQL review-request actors for direct and selected-team review queues, and formats rows as fzf TSV.
Scopes and sorting
The dashboard has two navigation axes:
| Axis | Binding | Values |
|---|---|---|
| Mode | ctrl-s | work, home |
| Scope | alt-0..alt-2 | all, focus, explore |
Scopes are filtered views over the same cache:
all: every configured section.focus:Action:+Mine:+Maintenance:sections.explore:Watching:sections.
alt-S cycles item sort within each section:
created-descupdated-descage-ascrepo-asc
Headers stay anchored; only rows between headers move.
Header navigation
alt-n and alt-p jump to next/previous section headers. The fetcher writes ~/.cache/tmux/gh_picker_offsets_{mode}_{scope}.json; the bash jump helper reads that sidecar and emits fzf pos(N).
The helper is intentionally pure bash in the hot path. An older cat + python3 implementation cost enough per keypress that held alt-n/alt-p queued faster than they drained.
Hierarchy and families
The picker nests related work without requiring you to open GitHub:
| Relationship | How it appears |
|---|---|
| Issue epics | Epic parent row with child issues |
| PR backport families | Source PR parent plus target-branch children |
| PR ↔ issue links | Inline ↳ #N, closes:N, closed-by:N, and hidden match tokens |
Visual cues:
| Symbol | Meaning |
|---|---|
⬢ | Epic root |
◇ | PR family root |
├─ / └─ | Family child |
↳ #N / ↳ closes #N | Cross-linked PR or issue |
The Maintenance: Pending backports section remains the source of truth for missing backports. It combines bot comments, current version labels, and title search for manually-created backports.
Inline badges
Rows encode GitHub and local state inline:
- PR/issue state: open, merged, closed, not planned.
- review state: approved, changes requested, pending/review required.
- CI state: success, failure, pending.
- local state: matching worktree exists, conflict/mergeability state.
- relationship state: epic, backport family, linked issue/PR.
The hidden match key includes repo, author, assignee, labels, state, local worktree status, review status, CI status, conflict status, and relationship tokens so typed search can narrow by status without changing the visible row format.
Worktree detection
Local worktree markers come from git worktree state plus branch/metadata heuristics. Issue markers can also be inferred from the session picker cache when a worktree is already linked to an issue.