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.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 |
| [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 |
| [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) |
| [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 |
Expand Down
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.8.1](./release-v1-8-1) | Fix silent hang after pagination bar — concurrency cap + progress bar for line-number resolution |
| [v1.8.0](./release-v1-8-0) | Purple TUI theme, fetch progress bar, position indicator, line-anchored file links, Esc to close help |
| [v1.7.0](./release-v1-7-0) | Shell completions (bash/zsh/fish), extended syntax highlighting (PHP, C/C++, Swift, Terraform, Dockerfile) |
| [v1.6.1](./release-v1-6-1) | Fix TUI rendering only the first fragment for multi-match files |
Expand Down
69 changes: 69 additions & 0 deletions docs/blog/release-v1-8-1.md
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).
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.8.0",
"version": "1.8.1",
"description": "Interactive GitHub code search with per-repo aggregation",
"keywords": [
"bun",
Expand Down