-
Notifications
You must be signed in to change notification settings - Fork 1
v1.8.1 #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
v1.8.1 #101
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| title: "What's new in v1.8.1" | ||
| description: "Bug fix: the CLI no longer hangs silently for up to 2 minutes after the pagination bar, especially on slow or mobile networks." | ||
| date: 2026-03-09 | ||
| --- | ||
|
|
||
| # What's new in github-code-search v1.8.1 | ||
|
|
||
| > Full release notes: <https://github.com/fulll/github-code-search/releases/tag/v1.8.1> | ||
|
|
||
| ## Highlights | ||
|
|
||
| ### Fix: silent hang after pagination bar on slow networks | ||
|
|
||
| After the `Fetching results from GitHub…` progress bar completed, the CLI could | ||
| freeze silently for **up to 2 minutes** before the interactive TUI appeared. | ||
| No spinner, no message — the terminal looked stuck. The hang was consistently | ||
| worse on tethering or congested networks and could sometimes be resolved by | ||
| re-running on a better connection. | ||
|
|
||
| #### Root cause | ||
|
|
||
| The GitHub Code Search API returns only fragment-relative character indices — | ||
| there are no absolute line numbers in the response. To display accurate line | ||
| numbers in the TUI, `github-code-search` fetches the raw content of each | ||
| matched file from `raw.githubusercontent.com` after pagination completes. | ||
|
|
||
| Two compounding issues caused the hang: | ||
|
|
||
| 1. **No concurrency limit.** With 200+ unique files in the results, 200+ | ||
| HTTP requests fired simultaneously via `Promise.all`. On a saturated | ||
| network this overwhelmed the connection pool and caused the event loop | ||
| to stall. | ||
|
|
||
| 2. **No progress feedback.** The user saw nothing between the end of the | ||
| pagination bar and the TUI — no indication that work was still in | ||
| progress. | ||
|
|
||
| #### What changed | ||
|
|
||
| - **Concurrency capped at 20** parallel requests (new `concurrentMap` helper | ||
| in `api-utils.ts`). This dramatically reduces the load on the network | ||
| connection and prevents the stall pattern on mobile networks. | ||
| - **Per-request 5 s timeout** via `AbortSignal.timeout`. If a raw file | ||
| fetch stalls, it is silently abandoned and line numbers fall back to | ||
| fragment-relative values — results still appear, just without precise | ||
| absolute line numbers for that file. | ||
| - **New progress bar** shown on stderr during the resolution phase: | ||
|
|
||
| ``` | ||
| Resolving line numbers… ▓▓▓▓▓▓▓░░░░░░░░░░░░░ 23/67 | ||
| ``` | ||
|
|
||
| The line is erased cleanly before the TUI launches, leaving a clean | ||
| terminal. | ||
|
|
||
| **Before:** silent freeze, up to 2 minutes on tethering. | ||
| **After:** steady progress bar, TUI opens within seconds on any network. | ||
|
|
||
| --- | ||
|
|
||
| ## Upgrade | ||
|
|
||
| ```bash | ||
| github-code-search upgrade | ||
| ``` | ||
|
|
||
| Or download the latest binary directly from the | ||
| [GitHub Releases page](https://github.com/fulll/github-code-search/releases/tag/v1.8.1). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.