Skip to content

feat: TUI — Navigation & result management (EPIC #66) — v1.6.0#73

Merged
shouze merged 11 commits intomainfrom
feat/tui-navigation-result-management
Mar 1, 2026
Merged

feat: TUI — Navigation & result management (EPIC #66) — v1.6.0#73
shouze merged 11 commits intomainfrom
feat/tui-navigation-result-management

Conversation

@shouze
Copy link
Contributor

@shouze shouze commented Mar 1, 2026

Context

EPIC for 🗂 TUI — Navigation & result management #66.

Closes #66. Closes #67. Closes #68. Closes #69.

This PR merges 3 sub-feature branches that were separately reviewed and merged into this epic branch, then adds the v1.6.0 release commit.

What changed

Sub-PRs merged into this branch

PR Feature
#70 Z — global fold / unfold all repositories at once
#71 gg / G top/bottom jumps, Page Up/Down / Ctrl+U/D paged scrolling
#72 o — open focused result in the default browser

Release commit (v1.6.0)

  • package.json: version bump 1.5.0 → 1.6.0
  • CHANGELOG.md: new v1.6.0 entry
  • docs/blog/release-v1-6-0.md: release blog post
  • docs/blog/index.md: new row in the What's New table
  • demo/demo.tape: updated VHS script illustrating Z, f+.yml, gg, a, G, o
  • demo/demo.gif: regenerated GIF from the updated tape

How to test manually

bun github-code-search.ts query --org <your-org> <some-query>
# Z          → fold all repos; Z again → unfold all
# f + .yml   → filter by path, only .yml files visible
# gg         → jump to first result
# a          → select all filtered results
# G          → jump to last result
# o          → opens focused file in browser
# r + Enter  → reset and confirm

Validation

bun test              ✅ 406 pass, 0 fail
bun run lint          ✅ 0 warnings, 0 errors
bun run format:check  ✅
bun run knip          ✅
bun run build.ts      ✅
vhs demo/demo.tape    ✅ demo/demo.gif regenerated

shouze added 10 commits March 1, 2026 23:55
Closes #67

- Z folds all repos if any is unfolded; unfolds all when all are folded
- Clamps cursor and scrollOffset after bulk fold to keep view consistent
- renderHelpOverlay: adds Z line next to ← / → fold bindings
- Status bar hint line: adds 'Z fold-all' entry
- Tests: help overlay contains 'Z' + 'fold / unfold all repos',
  renderGroups status bar contains 'Z fold-all'
- docs/reference/keyboard-shortcuts.md: documents the new shortcut
- tui.ts: when Z folds all repos from an extract row, preserve cursor
  context by finding the repo header row in newRows rather than doing
  a blind numeric clamp — avoids landing on a different repository
- keyboard-shortcuts.md: remove incorrect 'must be typed in lowercase'
  claim; note that some bindings (Z, G) require uppercase
feat: global fold/unfold — Z to collapse or expand all repositories at once
Closes #69

- openInBrowser() helper: open/xdg-open/start depending on platform,
  spawned detached so the TUI stays responsive
- Repo row -> opens https://github.com/<org>/<repo>
- Extract row -> opens the file htmlUrl returned by the GitHub API
- Section header rows are a no-op (type === 'section')
- renderHelpOverlay: adds 'o  open in browser' entry
- Status bar hint line: adds 'o open'
- Tests: overlay contains 'open in browser', status bar contains 'o open'
- docs/reference/keyboard-shortcuts.md: documents the shortcut in
  the Selection table
feat: open in browser — `o` shortcut to open the focused result's GitHub URL
Closes #68

- gg: two consecutive g presses jump to the first row
- G (Shift+G): jumps to the last row
- Page Up / Ctrl+U: scroll up one full page
- Page Down / Ctrl+D: scroll down one full page
- All jumps skip section-header rows and keep cursor visible
- pendingFirstG state tracks the first g keypress; reset on any other key
- renderHelpOverlay: add gg/G and PgUp/PgDn lines
- Status bar hint line: add gg/G top/bot and PgUp/Dn page entries
- Tests: overlay and status bar contain the new shortcut labels
- docs/reference/keyboard-shortcuts.md: documents all new shortcuts
feat: fast navigation — gg/G (top/bottom) and Page Up/Down
Copilot AI review requested due to automatic review settings March 1, 2026 23:43
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Coverage after merging feat/tui-navigation-result-management into main will be

95.97%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts93.14%100%84.62%93.52%100, 102–104, 106–107, 134, 298–299, 342–345, 76, 95–99
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts97.78%100%100%97.62%49–50
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Coverage after merging feat/tui-navigation-result-management into main will be

95.97%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.43%100%100%92.51%235–239, 295, 312, 63–69
   cache.ts98.08%100%100%97.87%28
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts93.14%100%84.62%93.52%100, 102–104, 106–107, 134, 298–299, 342–345, 76, 95–99
   upgrade.ts86.52%100%93.33%85.89%117–118, 138–145, 148–154, 159, 164, 200–203
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts97.78%100%100%97.62%49–50
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze self-assigned this Mar 1, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This EPIC PR merges three sub-feature branches (#70, #71, #72) into a v1.6.0 release, adding power-user navigation shortcuts to the TUI: global fold/unfold (Z), Vim-style top/bottom jumps (gg/G), paged scrolling (Page Up/Page Down/Ctrl+U/Ctrl+D), and open-in-browser (o).

Changes:

  • TUI navigation (src/tui.ts): Implements Z global fold/unfold, gg/G top/bottom jumps, Page Up/Down and Ctrl+U/D paged scrolling, and o open-in-browser via a new openInBrowser() helper.
  • Render + tests (src/render.ts, src/render.test.ts): Updates the help overlay and status bar hint line with all new shortcuts; adds 5 new tests verifying their presence.
  • Release artifacts (package.json, CHANGELOG.md, docs/blog/, docs/reference/, demo/): Version bump to 1.6.0, new blog post, updated changelog, expanded keyboard shortcuts docs, and refreshed VHS demo.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tui.ts Implements all new keyboard shortcuts: Z, gg, G, Page Up/Down, Ctrl+U/D, o, plus openInBrowser() helper and pendingFirstG state for gg sequence detection
src/render.ts Updated help overlay and status bar hint line to include the new shortcut descriptions
src/render.test.ts Five new tests verifying help overlay and status bar include all new shortcut strings
package.json Version bump from 1.5.0 to 1.6.0
CHANGELOG.md New v1.6.0 entry with blog post link
docs/blog/release-v1-6-0.md New release blog post documenting all four features
docs/blog/index.md New row for v1.6.0 in the What's New table
docs/reference/keyboard-shortcuts.md Updated intro text and new rows for Z, gg, G, Page Up/Down, and o shortcuts
demo/demo.tape Updated VHS script demonstrating all new features

@shouze shouze merged commit 8454f39 into main Mar 1, 2026
8 checks passed
@shouze shouze deleted the feat/tui-navigation-result-management branch March 1, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants