diff --git a/CHANGELOG.md b/CHANGELOG.md index 849dfab..410b2bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Each release entry covers the motivation, new features, breaking changes (if any | Version | Blog post | | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| [v1.12.0](https://fulll.github.io/github-code-search/blog/release-v1-12-0) | Mouse-driven TUI, team re-pick/undo, query-title heading and matched token in output, regex quoting fixes | | [v1.11.0](https://fulll.github.io/github-code-search/blog/release-v1-11-0) | Team pick mode, `--exclude-template-repositories`, security hardening and Windows installer fixes | | [v1.10.0](https://fulll.github.io/github-code-search/blog/release-v1-10-0) | Native regex syntax `/pattern/flags` — automatic term extraction, top-level alternation and `--regex-hint` | | [v1.9.0](https://fulll.github.io/github-code-search/blog/release-v1-9-0) | Windows support — native x64, x64-modern, x64-baseline and ARM64 binaries with one-line PowerShell installer | diff --git a/demo/demo.gif b/demo/demo.gif index d35e6e3..91d0755 100644 Binary files a/demo/demo.gif and b/demo/demo.gif differ diff --git a/demo/demo.tape b/demo/demo.tape index bf425bc..74d1abd 100644 --- a/demo/demo.tape +++ b/demo/demo.tape @@ -17,7 +17,7 @@ Set FontSize 15 Set Width 1200 Set Height 600 Set Padding 24 -Set TypingSpeed 60ms +Set TypingSpeed 70ms # ── Show the prompt ──────────────────────────────────────────────────────────── Hide @@ -25,11 +25,11 @@ Type "export GITHUB_TOKEN=$GITHUB_TOKEN" Enter Show -Sleep 500ms +Sleep 700ms # ── Type the command ────────────────────────────────────────────────────────── Type 'github-code-search query "@actions/cache" --org actions' -Sleep 800ms +Sleep 1s Enter # Wait for results to load (API call + TUI render) @@ -37,41 +37,42 @@ Sleep 4s # ── Fold all repos — Z gives a compact bird's-eye view ──────────────────────── Type "Z" -Sleep 800ms +Sleep 1s # ── Unfold all repos — Z again expands everything ───────────────────────────── Type "Z" -Sleep 800ms +Sleep 1s # ── Filter by file path to focus on YAML files ──────────────────────────────── Type "f" -Sleep 300ms +Sleep 400ms Type ".yml" -Sleep 600ms +Sleep 800ms Enter -Sleep 500ms +Sleep 700ms # ── Jump to top with gg ─────────────────────────────────────────────────────── Type "g" -Sleep 150ms +Sleep 200ms Type "g" -Sleep 500ms +Sleep 700ms # ── Select all visible (filtered) results ───────────────────────────────────── Type "a" -Sleep 500ms +Sleep 700ms # ── Jump to bottom with G to inspect the last match ─────────────────────────── Type "G" -Sleep 600ms +Sleep 800ms # ── Open the focused file directly in the browser ───────────────────────────── Type "o" -Sleep 600ms +Sleep 800ms # ── Reset filter and confirm selection ──────────────────────────────────────── Type "r" -Sleep 600ms +Sleep 800ms Enter -Sleep 2s +# Hold on the final markdown output — query title heading + matched token per extract +Sleep 4s diff --git a/docs/blog/index.md b/docs/blog/index.md index 72943b7..cce697d 100644 --- a/docs/blog/index.md +++ b/docs/blog/index.md @@ -11,6 +11,7 @@ Full release notes and changelogs are always available on | Release | Highlights | | ---------------------------- | ---------------------------------------------------------------------------------------------------------- | +| [v1.12.0](./release-v1-12-0) | Mouse-driven TUI, team re-pick/undo, query-title heading and matched token in output, regex quoting fixes | | [v1.11.0](./release-v1-11-0) | Team pick mode, `--exclude-template-repositories`, security hardening and Windows installer fixes | | [v1.10.0](./release-v1-10-0) | Native regex syntax `/pattern/flags` — automatic term extraction, top-level alternation and `--regex-hint` | | [v1.9.0](./release-v1-9-0) | Windows support — native x64, x64-modern, x64-baseline and ARM64 binaries with one-line PowerShell install | diff --git a/docs/blog/release-v1-12-0.md b/docs/blog/release-v1-12-0.md new file mode 100644 index 0000000..f10891e --- /dev/null +++ b/docs/blog/release-v1-12-0.md @@ -0,0 +1,88 @@ +--- +title: "What's new in v1.12.0" +description: "Mouse-driven TUI (click, double-click, scroll wheel), team re-pick/undo, query-title heading and matched token in output, and regex literal-quote fixes." +date: 2026-08-23 +--- + +# What's new in github-code-search v1.12.0 + +> Full release notes: + +## Highlights + +### Mouse support in the interactive TUI + +The TUI now responds to the terminal's SGR mouse protocol, alongside every existing keyboard shortcut: + +- **Single-click** on any row moves the cursor there (equivalent to `↑` / `↓`). +- **Double-click** on a repo's fold icon (`▸`/`▾`) toggles fold/unfold; double-click on the checkbox zone (columns 4+) toggles selection — on repos and extracts alike. +- **Scroll wheel** moves the viewport by 3 rows at a time. + +``` +▸ ✓ fulll/auth-service ← double-click checkbox zone: toggle selection + ✓ src/flags.ts:3:14 ← double-click: toggle extract selection +``` + +During trackpad momentum scrolling, the TUI enters a brief "scroll cooldown" so residual clicks from a decelerating scroll gesture don't accidentally toggle a selection. Mouse and keyboard are fully complementary — everything remains reachable from the keyboard alone. + +See [Mouse support](/reference/keyboard-shortcuts#mouse-support) for the full zone-by-zone reference. + +### Team re-pick mode — reassign or undo a pick + +Repos moved by [team pick mode](/usage/team-grouping#team-pick-mode) (marked `◈`) can now be reassigned, or restored back to their original combined section, directly from the TUI. Navigate to a picked repo and press **`t`**: + +``` +── squad-frontend +▶ ◈ fulll/frontend-app ← press t here +▶ ◈ fulll/mobile-sdk +``` + +``` +Re-pick: [ squad-frontend ] squad-mobile 0/u restore ← → move ↵ confirm Esc/t cancel +``` + +| Key | Action | +| ----------- | ---------------------------------------------------------------- | +| `←` / `→` | Cycle through candidate teams | +| `Enter` | Confirm and move the repo to the focused team | +| `0` / `u` | Undo the **entire** section pick — restore all its repos at once | +| `Esc` / `t` | Exit re-pick mode without changes | + +Re-picks are interactive-only adjustments (not encoded in the replay command) — repeat them manually if you rerun the same query non-interactively. + +### Query title heading and matched token in output + +Every output — Markdown and JSON, `repo-only` and `repo-and-matches` — now opens with a `# Results for` heading identifying the query, plus qualifiers when active: + +```text +# Results for "useFeatureFlag" · including archived · excluding templates + +3 repos · 4 files selected + +- **fulll/auth-service** (2 matches) + - [ ] [src/middlewares/featureFlags.ts:2:19](...): `useFeatureFlag` +``` + +The exact matched token is now appended after each extract link in Markdown, and exposed as `matchedText` in JSON output when segment data is available. In [regex queries](/usage/search-syntax#regex-queries), the heading shows the pattern in backticks instead: `` # Results for `/useFeatureFlag/i` ``. + +### Regex fixes: literal quotes and safer local filtering + +Several regex-mode edge cases are fixed in this release: + +- Patterns containing literal `"` characters (e.g. `/"axios": "[~^]?[0-9]"/`) are now escaped automatically using GitHub's own quote-escaping syntax instead of being silently mangled when deriving the API search term. +- Unbalanced double quotes in a plain-text query now **fail fast** locally with an actionable error instead of hitting GitHub's opaque `422 ERROR_TYPE_QUERY_PARSING_FATAL`. +- Local regex filtering now falls back to the full file content when the API-returned fragment isn't enough to evaluate the pattern, fixing false negatives on multi-line matches. + +See [Searching for a literal quote character](/usage/search-syntax#searching-for-a-literal-quote-character) for the full escaping rules. + +### Bun 1.4 migration + +Internally, all ANSI/terminal handling (`stringWidth`, `stripANSI`, `sliceAnsi`) now goes through a single `render/terminal.ts` facade built on Bun 1.4's native APIs, and the TUI now handles live terminal resizes via `SIGWINCH` instead of requiring a restart. No user-facing behavior change, but more robust Unicode (graphemes, emoji, CJK) and layout handling. + +--- + +## Upgrade + +```sh +github-code-search upgrade +``` diff --git a/package.json b/package.json index 07d2513..3b9a8d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-code-search", - "version": "1.11.0", + "version": "1.12.0", "description": "Interactive GitHub code search with per-repo aggregation", "keywords": [ "bun",