Skip to content

Commit a4b7718

Browse files
authored
Merge pull request #101 from fulll/release/1.8.1
v1.8.1
2 parents beaae85 + 6242db8 commit a4b7718

File tree

4 files changed

+72
-1
lines changed

4 files changed

+72
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Each release entry covers the motivation, new features, breaking changes (if any
66

77
| Version | Blog post |
88
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
9+
| [v1.8.1](https://fulll.github.io/github-code-search/blog/release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution |
910
| [v1.8.0](https://fulll.github.io/github-code-search/blog/release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help |
1011
| [v1.7.0](https://fulll.github.io/github-code-search/blog/release-v1-7-0) | Shell completions (bash/zsh/fish) + extended syntax highlighting (PHP, C/C++, Swift, Terraform/HCL, Dockerfile) |
1112
| [v1.6.1](https://fulll.github.io/github-code-search/blog/release-v1-6-1) | Fix TUI only displaying first text fragment when a file has multiple matches |

docs/blog/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Full release notes and changelogs are always available on
1111

1212
| Release | Highlights |
1313
| -------------------------- | ---------------------------------------------------------------------------------------------------------- |
14+
| [v1.8.1](./release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution |
1415
| [v1.8.0](./release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help |
1516
| [v1.7.0](./release-v1-7-0) | Shell completions (bash/zsh/fish), extended syntax highlighting (PHP, C/C++, Swift, Terraform, Dockerfile) |
1617
| [v1.6.1](./release-v1-6-1) | Fix TUI rendering only the first fragment for multi-match files |

docs/blog/release-v1-8-1.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-code-search",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"description": "Interactive GitHub code search with per-repo aggregation",
55
"keywords": [
66
"bun",

0 commit comments

Comments
 (0)