|
| 1 | +--- |
| 2 | +title: "What's new in v1.8.1" |
| 3 | +description: "Bug fix: the CLI no longer hangs silently for up to 2 minutes after the pagination bar, especially on slow or mobile networks." |
| 4 | +date: 2026-03-09 |
| 5 | +--- |
| 6 | + |
| 7 | +# What's new in github-code-search v1.8.1 |
| 8 | + |
| 9 | +> Full release notes: <https://github.com/fulll/github-code-search/releases/tag/v1.8.1> |
| 10 | +
|
| 11 | +## Highlights |
| 12 | + |
| 13 | +### Fix: silent hang after pagination bar on slow networks |
| 14 | + |
| 15 | +After the `Fetching results from GitHub…` progress bar completed, the CLI could |
| 16 | +freeze silently for **up to 2 minutes** before the interactive TUI appeared. |
| 17 | +No spinner, no message — the terminal looked stuck. The hang was consistently |
| 18 | +worse on tethering or congested networks and could sometimes be resolved by |
| 19 | +re-running on a better connection. |
| 20 | + |
| 21 | +#### Root cause |
| 22 | + |
| 23 | +The GitHub Code Search API returns only fragment-relative character indices — |
| 24 | +there are no absolute line numbers in the response. To display accurate line |
| 25 | +numbers in the TUI, `github-code-search` fetches the raw content of each |
| 26 | +matched file from `raw.githubusercontent.com` after pagination completes. |
| 27 | + |
| 28 | +Two compounding issues caused the hang: |
| 29 | + |
| 30 | +1. **No concurrency limit.** With 200+ unique files in the results, 200+ |
| 31 | + HTTP requests fired simultaneously via `Promise.all`. On a saturated |
| 32 | + network this overwhelmed the connection pool and caused the event loop |
| 33 | + to stall. |
| 34 | + |
| 35 | +2. **No progress feedback.** The user saw nothing between the end of the |
| 36 | + pagination bar and the TUI — no indication that work was still in |
| 37 | + progress. |
| 38 | + |
| 39 | +#### What changed |
| 40 | + |
| 41 | +- **Concurrency capped at 20** parallel requests (new `concurrentMap` helper |
| 42 | + in `api-utils.ts`). This dramatically reduces the load on the network |
| 43 | + connection and prevents the stall pattern on mobile networks. |
| 44 | +- **Per-request 5 s timeout** via `AbortSignal.timeout`. If a raw file |
| 45 | + fetch stalls, it is silently abandoned and line numbers fall back to |
| 46 | + fragment-relative values — results still appear, just without precise |
| 47 | + absolute line numbers for that file. |
| 48 | +- **New progress bar** shown on stderr during the resolution phase: |
| 49 | + |
| 50 | + ``` |
| 51 | + Resolving line numbers… ▓▓▓▓▓▓▓░░░░░░░░░░░░░ 23/67 |
| 52 | + ``` |
| 53 | + |
| 54 | + The line is erased cleanly before the TUI launches, leaving a clean |
| 55 | + terminal. |
| 56 | + |
| 57 | +**Before:** silent freeze, up to 2 minutes on tethering. |
| 58 | +**After:** steady progress bar, TUI opens within seconds on any network. |
| 59 | + |
| 60 | +--- |
| 61 | + |
| 62 | +## Upgrade |
| 63 | + |
| 64 | +```bash |
| 65 | +github-code-search upgrade |
| 66 | +``` |
| 67 | + |
| 68 | +Or download the latest binary directly from the |
| 69 | +[GitHub Releases page](https://github.com/fulll/github-code-search/releases/tag/v1.8.1). |
0 commit comments