github-search-cli 9.8.2 → 9.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,63 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Publish
6
6
 
7
7
  ---
8
8
 
9
+ ## [9.8.3] — 2026-10-01 (released)
10
+
11
+ ### Fixed
12
+
13
+ - **The TUI always opens on the landing menu again.** A saved session used to
14
+ skip it on every launch, and one user's session had an MCP handshake request
15
+ saved as its query, so startup auto-ran a garbage search instead of showing
16
+ the menu. Sessions now restore preferences and pre-fill the last query only
17
+ when a mode is picked; they never auto-run a search. Both save and restore
18
+ sanitize the session: JSON-shaped or oversized queries are dropped, and
19
+ malformed fields fall back to defaults, so a corrupted file can't hijack
20
+ startup again.
21
+ - **401/403 API errors now say what actually went wrong instead of "Network
22
+ error".** A rejected token (401) shows "Bad GitHub token (401)" with keys to
23
+ fix it; an authenticated-but-forbidden 403 (e.g. SAML/SSO enforcement) names
24
+ the SSO case; only genuine connectivity/server failures keep the generic
25
+ network message. A rate-limited search no longer swallows the error and
26
+ renders as a silent zero-result "success" — the real message reaches the
27
+ status bar, the MCP server reports it as structured backoff advice, and the
28
+ adapter no longer turns rate limits into empty results.
29
+ - **Recover-from-errors without leaving the TUI.** While the matching error is
30
+ showing, `t` opens an inline token prompt (saves to config and re-runs the
31
+ failed query), `u` clears the token and retries unauthenticated, `c` swaps in
32
+ a different token after a rate limit, and `r` retries. Documented in the help
33
+ overlay and README.
34
+ - **An image wrapped in a link now renders.** The badge-and-screenshot shape
35
+ `[![alt](shot.png)](url)` — used by `sst/opencode` (its only hero image was
36
+ lost) and `withastro/astro` (23 of 25 images lost) — was treated as prose
37
+ because the markdown token walk rejected `link` tokens instead of recursing
38
+ into them. The image now renders and keeps its link as an OSC 8 hyperlink on
39
+ the image cells, so clicking it in the terminal opens the same URL.
40
+ - **A README full of small images no longer floods the screen.** Images whose
41
+ README declares an edge under 100 px (`<img width="48">` sponsor avatars,
42
+ badges) are filtered while parsing, before any request is made; images with
43
+ no declared size are measured from their header after the download
44
+ (`Bun.Image.metadata()`, header read only — no pixel decode) and rejected
45
+ before rasterising. On `openclaw/openclaw` (661 `<img>` tags, 648 of them
46
+ 48×48 avatars) this takes the README from 649 downloads / 28.3 s to open to
47
+ 1 download / ~0.5 s.
48
+ - A pure-image block whose refs are all filtered out renders as nothing instead
49
+ of falling back to prose, which would have printed the raw markdown of the
50
+ filtered-out image.
51
+
52
+ ### Changed
53
+
54
+ - **Images smaller than 100 px on any edge are no longer rendered, even when
55
+ the declared size understates the real one** (two images in
56
+ `openclaw/openclaw` declare `width="48"` but are 420×420). The README is
57
+ treated as the authority on size; the alternative — rendering the avatar at
58
+ whatever the terminal fits — is what made these READMEs unusable.
59
+ - The TUI no longer skips the landing menu on startup: a saved session
60
+ restores sort/limit/trending tab and pre-fills the query when you pick Repo
61
+ Search, but the menu always comes first. See the session-sanitizing fix
62
+ above.
63
+
64
+ ---
65
+
9
66
  ## [9.8.2] — 2026-09-28 (released)
10
67
 
11
68
  ### Security
package/README.md CHANGED
@@ -224,6 +224,15 @@ ghfind --completion fish | source
224
224
  | `Esc` | Close current overlay |
225
225
  | `q` | Quit ghfind |
226
226
 
227
+ **Error recovery** — active only while the matching error is in the status bar
228
+
229
+ | Key | Action |
230
+ | --- | --------------------------------------------- |
231
+ | `r` | Retry the failed search / trending load |
232
+ | `t` | Fix the GitHub token (401 bad token, 403 SSO) |
233
+ | `u` | Search without a token (401) |
234
+ | `c` | Change token (rate limit) |
235
+
227
236
  **Leader menu** — press `Space`, navigate with `↑`/`↓`, press `Enter` to dispatch
228
237
 
229
238
  Actions shown depend on current mode (search vs trending) and selection:
@@ -313,14 +322,14 @@ cd ghfind
313
322
  # With Bun (recommended for TUI)
314
323
  bun install
315
324
  bun start # TUI
316
- bun test # 482 tests
325
+ bun test # 516 tests
317
326
  bun run check # format check + tests — the green gate
318
327
  bun run build # build dist/
319
328
 
320
329
  # Or with npm
321
330
  npm install
322
331
  npm start # TUI (requires Node 20+)
323
- npm test # 414 tests
332
+ npm test # 516 tests
324
333
  npm run build # build dist/
325
334
 
326
335
  > Want to contribute? See [CONTRIBUTING.md](CONTRIBUTING.md) for commands,
@@ -331,23 +340,22 @@ npm run build # build dist/
331
340
 
332
341
  ## Known limitations
333
342
 
334
- **README image rendering is currently incomplete.** Images that do render look
335
- right, but several common cases silently show nothing:
336
-
337
- - **An image wrapped in a link does not render at all.** This is the common
338
- badge-and-screenshot style: `[![alt](shot.png)](https://example.com)`.
339
- The whole block is treated as prose and the image is dropped.
340
- - **An image smaller than 100px is skipped**, judged by the `width`/`height`
341
- the README declares in its `<img>` tag. A README that understates an
342
- image's size hides that image.
343
- - **SVG is not rendered** — the rasteriser cannot draw it.
344
- - Markdown `![](url)` images have no declared size, so they are downloaded
345
- before the size check can reject them. A README full of them is slow to open.
346
-
347
- A README using none of the above — plain `![]()` images and a few large
348
- banners — renders fine and fast. See
343
+ README image rendering has one deliberate blind spot and one hard one:
344
+
345
+ - **Images smaller than 100 px on any edge are skipped.** For `<img>` tags the
346
+ declared `width`/`height` is trusted, so an image that understates its size
347
+ is hidden (a README that _overstates_ nothing is never affected). Markdown
348
+ `![]()` images declare no size, so they are measured from the image header
349
+ instead — still before any pixels are decoded.
350
+ - **SVG is not rendered** — the rasteriser cannot draw it, so SVGs (and
351
+ badge-service images, which are tiny SVGs with text baked in) show an
352
+ `🖼 alt` caption instead.
353
+
354
+ An image wrapped in a link — `[![alt](shot.png)](url)`, the badge-and-screenshot
355
+ style — renders fine and keeps its link: the image cells carry an OSC 8
356
+ hyperlink, so clicking it opens the target in your browser. See
349
357
  [.issues/tickets/readme-image-rendering.md](.issues/tickets/readme-image-rendering.md)
350
- for the measurements and the remaining work.
358
+ for the architecture, measurements, and remaining work.
351
359
 
352
360
  ---
353
361
 
@@ -355,6 +363,15 @@ for the measurements and the remaining work.
355
363
 
356
364
  Recent releases (full history in [CHANGELOG.md](CHANGELOG.md)):
357
365
 
366
+ ### v9.8.3
367
+
368
+ - **401/403 say what actually happened** — a rejected token and an authenticated-but-forbidden request (e.g. SAML/SSO enforcement) both used to report "Network error", naming a connectivity problem you didn't have; only genuine connectivity and server failures keep that message now
369
+ - **A rate-limited search no longer looks like an empty one** — the adapter used to swallow the error and render a silent, successful "no repositories found"; the real message reaches the status bar, and the `ghfind_search_repos` MCP tool returns `rateLimited: true` with backoff advice instead of a tool failure
370
+ - **Recover from errors without leaving the TUI** — while the matching error is in the status bar, `t` opens an inline token prompt (saves it and re-runs the failed query), `u` clears the token and retries unauthenticated, `c` swaps in a different token, `r` retries
371
+ - **A corrupted session no longer hijacks startup** — a `session.json` holding an MCP handshake blob used to skip the landing menu and auto-run that garbage as a search on every launch; the menu always comes first now, and both save and restore sanitize the session
372
+ - **Images wrapped in a link render now** — the badge-and-screenshot shape `[![alt](shot.png)](url)` rendered nothing at all, which cost `sst/opencode` its only image and `withastro/astro` 23 of its 25; the image cells carry an OSC 8 hyperlink, so clicking it opens the target
373
+ - **A README full of small images no longer floods the screen** — images the README declares under 100px on any edge are skipped before a request is made, and undeclared `![]()` images are measured from the image header before any pixel decode; on `openclaw/openclaw` (648 sponsor avatars) that is 649 fetches / 28.3s → 1 fetch / ~0.5s
374
+
358
375
  ### v9.8.2
359
376
 
360
377
  - **Security: tokens no longer leak into crash reports** — an uncaught error auto-built a GitHub issue URL from raw `process.argv`, so a `--token` value ended up in a public URL; every field is redacted now, and ghfind prints the URL to copy instead of opening a browser when it finds a credential