Skip to content

feat: add issues mode toggled with i - #18

Merged
zombocoder merged 1 commit into
mainfrom
feat/issues-mode
Oct 28, 2026
Merged

zombocoder merged 1 commit into
mainfrom
feat/issues-mode

Conversation

@zombocoder

Copy link
Copy Markdown
Owner

Summary

  • i switches the whole dashboard between pull requests (default on start) and open issues: nav tree with per-repo issue counts, All Issues, and an issue Inbox (issues assigned to you).
  • New optional config to narrow issue lists with GitHub search syntax, applied to every issue search including the inbox:
    [issues]
    filter = "label:bug -label:wontfix"
  • Issues are fetched lazily on first switch and cached; cache keys include visibility and the filter, so neither change serves stale data. github.visibility applies to issues too.
  • Refresh (r / auto) only refetches the current mode; the other mode refetches when next shown.
  • Issue table: number, title, labels, author, repo, comment count, updated; sorted by last update. / also matches labels. l/d/f are no-ops in issues mode.
  • Fix: content tables now scroll to keep the cursor visible. Both the PR and issue tables previously always rendered from the first row, so the cursor could move off-screen.

Repo gains a required open_issue_count, so repo cache entries from older versions fail to parse and are refetched once instead of showing 0 issues.

Test plan

  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features (no warnings), cargo test --all-targets (154 passed)
  • New tests/issues_tests.rs: query building with visibility/filter, issue parsing, config + cache suffix, mode toggling/lazy fetch/refresh, list views, search by label, PR-only keys, scroll regression for both tables
  • Ran the issue search and repo queries against the live GitHub GraphQL API
  • Smoke-tested the binary in a pseudo-terminal: toggle to issues, scroll 50 rows down in All Issues

The dashboard starts on pull requests as before; `i` switches the whole
view (nav tree, inbox, all-items list, per-repo lists, counts) to open
issues and back. Issue lists are fetched lazily on first switch and
cached under keys that include visibility and the issue filter.

- New `[issues] filter` config: GitHub search qualifiers appended to
  every issue search, inbox included. Empty means all open issues.
- Issue inbox lists issues assigned to the viewer.
- Refresh only refetches the current mode; the other mode refetches
  when next shown.
- PR-only keys (l, d, f) are no-ops in issues mode.
- Content tables now keep the cursor row in view when scrolling; both
  the PR and issue tables previously rendered from row 0 regardless of
  the cursor.
@zombocoder
zombocoder merged commit d3c1085 into main Oct 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant