Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Binary file modified demo/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 16 additions & 15 deletions demo/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,62 @@ Set FontSize 15
Set Width 1200
Set Height 600
Set Padding 24
Set TypingSpeed 60ms
Set TypingSpeed 70ms

# ── Show the prompt ────────────────────────────────────────────────────────────
Hide
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)
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
1 change: 1 addition & 0 deletions docs/blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
88 changes: 88 additions & 0 deletions docs/blog/release-v1-12-0.md
Original file line number Diff line number Diff line change
@@ -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: <https://github.com/fulll/github-code-search/releases/tag/v1.12.0>

## 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
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading