# Changelog

All notable changes to `github-search-cli` (published as the `ghfind` binary).

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Published versions and dates mirror [npm](https://www.npmjs.com/package/github-search-cli?activeTab=versions).

---

## [9.14.1] — 2026-11-16 (released)

### Changed

- **The TUI's screen state is one explicit machine (`src/view-state.ts`).**
  Mode (`landing` / `search` / `trending` / `packages`) × overlay (fifteen ids
  or `none`) is projected onto the five main-view panels by `panelsFor()`, and
  the shell's `applyView` is the only writer of their visibility. Six
  hand-copied versions of that matrix — `showLanding`, `showMainContent`,
  `showSearchMode`, `showPackagesMode`, `loadTrending` and the overlay reset
  path — are gone, so adding a panel or an overlay can no longer be done in one
  place and forgotten in another (the drift that once left `orgBox` on screen
  until restart). No behaviour is meant to change; 14 new tests pin the matrix
  and assert that `src/tui.ts` paints from it rather than re-implementing it.
- **`docs/state-machines.md` inventories the app's state machines** — the two
  explicit ones, the latent ones with frequency × severity ratings (so a
  borderline bug is filed as an issue instead of engineered around), and the
  ones that were checked and are already guarded.

## [9.14.0] — 2026-11-13 (released)

### Added

- **`ghfind health <owner/repo>` — a four-dimension repo health score.**
  Maintenance activity (30%), issue responsiveness (25%), release cadence
  (25%) and community breadth (20%) are scored from public GitHub API
  endpoints. Every fetch degrades independently and the total re-normalizes
  over the dimensions that did produce data — a missing signal never silently
  scores 0. Archived repos are capped at 40 (a frozen mirror is not
  "healthy"), and full result pages are reported as "100+" instead of exactly 100. PRs are filtered out of the issue counts, and a missing latest release
  is a real signal (none published), not a fetch failure. `--json`, `--csv`
  and `--markdown` match the rest of the CLI.
- **`ghfind --compare a/b c/d --health`.** The comparison table gains a
  Health row (text) or column (Markdown) and the JSON/CSV exports gain
  per-repo health fields. A failed score degrades to null for that repo
  instead of failing the whole comparison.
- **Deep-dive now includes health.** `ghfind deep-dive` and the MCP
  `ghfind_deep_dive` tool show the same score alongside languages,
  contributors and the README. Health signals fetch alongside the README
  request, and the contributors endpoint is fetched once (`per_page=100`):
  the top entries feed the contributors section, the array length is the
  community count.
- **TUI health score — `Shift+H` or Menu → Health score.** The detail pane
  shows the total, grade and per-dimension bars with explanations.
- **A third theme: `dracula`.** The official Dracula palette, with the
  derived surface layers and interpolated teal the other themes also use.
  `--theme dracula`, the TUI picker and the init wizard all list it.
- **TUI theme picker — Menu → Theme.** Lists every registered theme with the
  persisted current one marked; Enter applies and saves it. `t` still cycles.

### Fixed

- **Help text tells the truth about themes.** The TUI help described the
  theme key as "light / dark / solarized" — none of those exist; it now
  points at the picker, and the `--theme` row lists every shipped theme.

## [9.13.0] — 2026-11-08 (released)

### Added

- **`ghfind similar <owner/repo>` — find repos like one you already know.**
  Similarity comes only from public signals GitHub already indexes: the
  source repo's topics and its primary language. Topics are the tightest
  signal, so topic + language is queried first, then each later query widens
  the net (second topic, primary topic alone, language alone); results from
  all queries are merged, de-duplicated and sorted by stars. Forks, archived
  repos and the source repo itself are always excluded, and a star floor of
  one twentieth of the source's stars keeps a 2,000-star repo from being
  matched against every repo under the same topic. Text output is one line per
  repo; `--json`, `--csv`, `--markdown` and `--count` match the rest of the
  CLI, and `--limit` defaults to 10 here (max 100).
- **MCP tool `ghfind_similar_repos`.** Agents get the same discovery
  (`repo`, optional `limit`/`token`) with the rendered list plus a structured
  `{ repo, count, repos, queries }` payload that shows which queries produced
  the answer. The `initialize` instructions and README tool list mention it.

### Fixed

- **Multi-word languages stay one qualifier.** `language:Jupyter Notebook`
  became `language:Jupyter` plus the stray keyword `Notebook` when the planned
  query was re-parsed; such values are now quoted. This affected Windows-era
  favorites like "Visual Basic .NET" and "Emacs Lisp" too.
- **An empty similar list no longer blames missing signals.** A repo with
  topics but no matches used to be told it had "neither topics nor language";
  that explanation now appears only when there was genuinely nothing to match
  on, and the no-match case says the queries came up empty.

## [9.12.1] — 2026-11-05 (released)

### Fixed

- **One-shot CLI search now honors the saved `ghfind login` token.**
  Token resolution was copy-pasted across surfaces and the CLI read only
  `GITHUB_TOKEN`, so the documented setup flow silently ran at 60/hr. Every
  surface now resolves through one module (`src/github-client.ts`):
  flag > surface state > config, with the env var winning over the config
  file as documented in HOW-TO.md.
- **Config `githubTokens` rotation actually works.** The multi-token list was
  declared but never wired into any surface; every surface now passes it to
  `GitHubSearchAdapter`, deduped and in order.
- **GitHub 403s say what GitHub said.** All API call sites classify
  401 → bad-token, 403 with an exhausted `x-ratelimit-remaining` → rate-limit
  (with reset seconds), other 403s → forbidden carrying GitHub's own message
  (SSO, secondary limit), anything else → network error — instead of raw
  `GitHub API error 403: {...}` dumps.
- **`ghfind pkg` registries admit when they don't know the total.** npm,
  crates.io, NuGet and Maven Central substituted the page length when the
  registry published no total and presented it as exact; they now report a
  bound (`+`) like RubyGems already did — in `--count`, the TUI toolbar, the
  package browser and the MCP payload.
- **MCP `ghfind_search_repos` offers zero-result loosenings.** A structured
  `suggestions` array in the payload and a `Try:` line in the text, matching
  the TUI. `ghfind_trending` no longer advertises a `token` argument that
  could never do anything (the trending feed is an unauthenticated HTML
  scrape).

### Changed

- **One repo-search pipeline** (`src/run-search.ts`) behind the CLI, MCP
  server, TUI and watch mode — parse/filter/validate/search/rank and the
  zero-result relaxations live in one module instead of nine hand-wired
  copies. The CLI prints ranked `Try:` hints to stderr on zero results.
- **One registry search pipeline** (`src/registries/search.ts`) — the five
  package providers are now descriptors behind a shared
  clamp → fetch → guard → missing-total path; each provider keeps only its
  URL, envelope and normalizer.
- **`formatTotalCount()`** — the `30+`-style bound rendering is shared by the
  TUI toolbar and the package browser instead of reimplemented per surface.

## [9.12.0] — 2026-11-03 (released)

### Added

- **`ghfind release run --tag <v>`** — dispatch the GitHub Actions Release
  workflow from the CLI, the way `gh workflow run release --ref <v>` does. After
  the tag exists, the command kicks the Release workflow that re-runs the CI
  gate, builds the standalone binaries, attaches them to the GitHub Release and
  publishes to npm; `--dry-run` prints the dispatch without calling the API.
- **`ghfind pkg` searches five package registries** — `--registry npm|crates|rubygems|nuget|maven`
  selects which one, npm stays the default, and each registry's query is passed
  through to its own native search untouched.
  Downloads are labelled with the window each registry actually publishes
  (`1,234,567/mo` on npm, `/90d` on crates.io, `total` on RubyGems and NuGet,
  `n/a` on Maven Central, which has no download data), `--sort` is validated
  against the chosen registry, and the TUI cycles registries with `p` or
  `Esc` → Search → Registry. Agents get `ghfind_package_search` over MCP;
  `ghfind_npm_packages` keeps its name, schema and npm pinning; its result lines
  gained the score field.

### Fixed

- **`--registry` only means something to `ghfind pkg`, and now says so.**
  `ghfind rust --registry crates` exited 0 with GitHub repositories: the registry
  was validated, then discarded. It is rejected with
  `--registry applies only to ghfind pkg.`
- **`ghfind pkg` validates `--sort` on every path.** Going interactive
  (`ghfind pkg --registry maven --sort downloads`, no output flag) skipped the
  check and opened the browser anyway, and the browser then ignored `--limit`
  and `--sort` too. The validated flags now reach the browser's searches.
- **A registry answer ghfind cannot parse is an error, not zero results.** A 200
  whose body is HTML (captive portal, CDN error page) was read as "no matches"
  by npm, crates.io, RubyGems, NuGet and Maven Central. It now fails with
  `<registry> search failed: unparseable response`.
- **RubyGems counts are labelled as bounds.** The API publishes no total, so its
  30-row ceiling was printed as if it were the number of matching gems:
  `ghfind pkg rails --registry rubygems --count` prints `30+`, and the packages
  toolbar and browser footer say the same.
- **`--help` lists every sort `--sort` accepts.** The row named four strategies
  while the parser took seven (`score`, `downloads`, `name` were undocumented).
- **A mistyped registry id can no longer resolve to an `Object.prototype`
  member.** `registryMeta("constructor")` returned the `constructor` function
  wearing `RegistryMeta`'s type; the catalog's lookup tables are now
  own-property tables and refuse the id.

## [9.11.0] — 2026-10-14 (released)

### Added

- **`ghfind clone <owner/repo>` — clone a repository to disk.** Cloning was
  previously only reachable as a command you copy: `--pipe clone` and
  `--format clone-commands` print `git clone …` lines. This runs it. The ref is
  validated with the same `parseRepoRef` the other repo subcommands use, the
  repo lands in `<dir>/<name>` (default: the cwd), and HTTPS is the default
  transport — `--ssh` switches to `git@github.com`, `--dir <path>` moves the
  destination root. No GitHub API call is made, so a clone is never blocked by
  the 60/hr unauthenticated budget, and git's own output and exit code are
  passed through untouched. The TUI gets the same action under
  `Esc` → Repo → Clone: git runs in the background with its output captured for
  `GHFIND_LOG`, and the status bar carries git's own diagnosis, because the TUI
  owns the screen and cannot render a progress bar or a credential prompt.
  `ghfind --doctor` now reports whether git is on PATH.

## [9.10.3] — 2026-10-14 (released)

### Fixed

- **The help overlay documents `Ctrl+E`.** The utility-keys section listed `t`,
  `Ctrl+X` and `Ctrl+C` but not the export shortcut, so the keybinding
  reference was the one place `Ctrl+E` went unmentioned — the startup tip and
  the README both advertised it. It now appears alongside the other utility
  keys as `Ctrl+E` — "Export results (CSV / Markdown / JSON / text)".

## [9.10.2] — 2026-10-14 (released)

### Fixed

- **`Ctrl+E` opens the export chooser.** The startup tip list advertises
  "Press Ctrl+E to export results as CSV or Markdown", but no handler ever
  claimed the chord: `Ctrl+E` did nothing on the results screen, and while the
  query input was focused its emacs binding read the same chord as "move to
  line end". The key handler now claims `Ctrl+E` before the input sees it and
  opens the export overlay (JSON / CSV / Markdown / plain text). With results on
  screen that is the shortest route to a `ghfind-export-<ts>.<ext>` file; with
  an empty result list the status bar reports "No results to export — run a
  search first" instead of opening an empty chooser.

## [9.10.1] — 2026-10-08 (released)

### Fixed

- **`--interval` is parsed again.** The flag was documented in `--help`, the
  README, the shell completions and `docs/HOW-TO.md`, but `parseArgs` had no
  case for it — so `ghfind --watch --interval 60` silently searched for
  `"--interval 60"` and polled at the default 300s. It now parses a positive
  whole number of seconds and rejects anything else.
- **`--format` and `--pipe` validate up front.** A typo like `--format jsonn`
  used to throw `Unknown format` mid-run and route into the crash-report flow
  (which prints "ghfind encountered an unexpected error" and opens a GitHub
  issue tab); `--pipe clonee` silently did nothing and exited 0. Both now fail
  fast with the list of valid values and exit 1.
- **An empty query no longer reaches GitHub.** `ghfind --count` sent `q=" "`,
  got a 422 back, and surfaced it as "⚠ Network error — check your connection.
  Retrying in 5s…". The search/format/pipe/watch handlers now fail fast with a
  usage hint instead.
- **Bare `ghfind --trending` launches the trending view** (as TRACKER.md
  documents) instead of falling through to the landing menu.
- **`--since` validates its value** (`daily|weekly|monthly`) instead of
  silently falling back to daily for anything it did not recognize — matching
  the existing `--sort` validation.
- **Watch mode honors `--since`.** The trending period was derived from the
  query string (`ghfind --watch --trending weekly`), so `--since weekly` was
  ignored in watch-trending. An explicit `--since` now wins; the query-string
  convention still applies when the flag is absent.
- **The MCP `ghfind_user_profile` tool returns formatted text** like
  `ghfind_org_profile` (and like the CLI's default `ghfind user`), instead of
  raw JSON; the structured profile still rides along in `data`.
- **Trending TUI footer matches the `/` key** (scroll-to-top: `/ top`, not
  `/ search`), and the quit paths of the main TUI, trending and package browser
  call `renderer.destroy()` before `process.exit(0)` so the terminal is
  released (raw mode, alternate screen).

### Removed

- Dead modules with no importers: `src/search-state.ts` (stale
  `config.githubTokens` reference from before token unification),
  `src/export.ts` and `src/pipe.ts` (byte-for-byte duplicates of the formats
  in `src/output.ts`, which is what everything imports), and the unused
  `historyCount()` export.

## [9.10.0] — 2026-10-03 (released)

### Added

- **The TUI is now fully clickable.** The mouse was already enabled — OpenTUI
  emits SGR mouse tracking and hit-tests every event — but nothing consumed the
  events, so they were silently discarded. Every list, card, tab and button now
  responds:
  - **Click** selects a row; the detail pane updates exactly as it does with
    `↑`/`↓`, because clicks ride the same `selectionChanged` event the keyboard
    already used.
  - **Double-click** opens the repo in your browser, or runs the overlay's
    action — the same code path as `Enter`, so the two can't drift apart.
  - **Scroll wheel** moves the selection in a list and scrolls long panes
    (README, help, org profile, update notes). This also fixes a pre-existing
    bug: the wheel previously fell through to whichever renderable held focus,
    so scrolling while the README viewer was open scrolled the wrong pane.
  - **Click outside an overlay** dismisses it, the same as `Esc`.
  - Landing cards, trending tabs, the update dialog's buttons, and every
    overlay list (history, bookmarks, saved searches, topics, export, share,
    command menu) are clickable. Hovering shows a pointer cursor and lifts the
    row background.
- **A <kbd>☰ menu</kbd> button in the bottom-right corner** opens the command
  menu. It floats above the layout and hides while an overlay is open.

### Changed

- **`Esc` now opens the command menu; `Space` no longer does.** `Space` opened
  the menu only while the query input was _not_ focused, which made one key mean
  two different things depending on invisible state — and it meant `Space` could
  not type a space in a query. More confusingly, it worked only _after_ you had
  clicked a result row: clicking moved focus to the list as a side effect of
  OpenTUI's auto-focus-on-press, and `Space` was gated on that focus being gone.
  `Esc` is now the sole binding (it already closed overlays), and `Space` always
  types. The bottom-right <kbd>☰ menu</kbd> button covers mouse users.
- Help, the README keybinding tables and `docs/HOW-TO.md` now document the mouse
  bindings and the `Esc` menu binding.

### Fixed

- **Non-interactive text no longer swallows clicks.** Every `TextRenderable`
  defaults to OpenTUI's `selectable: true`, and a left-press on a selectable
  renderable is consumed as a text-selection drag before the app's own handlers
  run. The detail pane, comparison table, tab bar and other read-only text now
  opt out, so clicks over them behave.
- **A hover highlight no longer painted the list magenta.** OpenTUI's colour
  parser accepts only hex and CSS names; an `rgba(...)` hover tint silently
  resolved to its magenta fallback. Now expressed as 8-digit hex.

---

## [9.9.0] — 2026-10-01 (released)

### Added

- **Queries are understood instead of passed through.** Every surface —
  TUI, CLI, MCP, `--watch` — now parses and checks a query before spending an
  API call, so a typo or a malformed value fails with a specific, actionable
  message instead of an opaque 422 or a misleading "network error".
  - Misspelled qualifiers are corrected: `langauge:Rust` → `language:Rust`,
    `star:1000` → `stars:1000`, `push:>2024-01-01` → `pushed:>2024-01-01`.
    Correction is scoped to the qualifiers ghfind knows, so a qualifier it has
    never heard of (`is:`, `has:`, `props.*`) is passed through untouched
    rather than mangled into something else.
  - Counts accept `k`/`m` sugar: `stars:10k` → `stars:>=10000`,
    `size:1m` → `size:>=1000000`, `stars:1k..10k` → `stars:1000..10000`.
    A bare count keeps GitHub's exact-match meaning — `stars:100` still means
    exactly 100.
  - Values are validated per qualifier: numeric counts, `fork:true|false|only`,
    `archived:true|false`, ISO8601 dates for `created`/`pushed`/`updated`,
    the `visibility:` enum, and the `in:` searchable fields. An invalid value
    reports the bad token and the fix, e.g. `⚠ Invalid query: "stars:abc" is
not a number — use stars:100, stars:>=100, or stars:1k..10k`.
  - `validateQuery` is now called by the CLI, the MCP server and `--watch`, not
    just the TUI. Previously only the TUI enforced the one existing rule.
- **Zero-result searches now suggest how to loosen the query.** Qualifiers are
  ranked by how sharply they narrow results — a star or size threshold empties
  a result set outright, so those are loosened first — and each suggestion
  rewrites one qualifier rather than dropping it: `No results for "rust
stars:>=5000000"` now offers `Try: rust stars:>=500000`.
- **`GHFIND_LOG=<path>` writes TUI diagnostics to a file.** The TUI owns the
  screen and cannot print diagnostics into it, and its logger was previously a
  silent no-op — which made API failures undiagnosable. Token values are
  redacted from logged URLs. Unset by default, so there is no cost in normal
  use.
- **`docs/HOW-TO.md`** — a task-oriented guide: setting up a token, writing
  queries, reading results, and what to do when a search returns nothing or an
  error appears.

### Fixed

- **A forbidden response no longer claims SSO is the cause.** Three unrelated
  conditions return 403 with rate-limit budget remaining — SSO not authorizing
  the token, a secondary/abuse rate limit, and org resource restrictions —
  and the message asserted the SSO case unconditionally, sending people to fix
  a credential problem that did not exist. The message now reports GitHub's
  own reason and names both plausible causes; the response headers and body
  (which identify the real one) are written to `GHFIND_LOG`.
- **`forks` is recognised as a qualifier.** Only `fork` was listed, so
  `forks:100` was fuzzy-matched into `fork:100` and lost its numeric
  validation. `forks`, `topics` and `followers` are now known too, and
  `fork` (boolean) stays distinct from `forks` (count).
- **Custom-property qualifiers are no longer misread as keywords.**
  `props.environment:production` contains a dot, which the parser rejected, so
  it silently became a literal search term instead of a qualifier.
- **`--watch` fails fast on a malformed query** instead of retrying the same
  non-transient error five times.
- **The post-upgrade panel no longer reappears on every launch.** It is
  triggered by `lastInstalledVersion !== currentVersion`, and nothing ever
  cleared `lastInstalledVersion` — so after one upgrade the "Updated ghfind
  X → Y" panel showed again on every single launch, including after dismissing
  it with **later** or **never** (neither touched that field). The panel now
  acknowledges itself when shown. A recorded version _newer_ than the running
  one is deliberately left alone, so a rollback or a mid-session update is
  still reported.
- **A prerelease is no longer offered as an upgrade.** The Node/compiled
  fallback in the version comparison treated `9.9.0-beta.1` as newer than
  `9.9.0` — advertising a downgrade. Comparison now follows npm ordering: a
  prerelease counts only when its numeric core is genuinely ahead, and build
  metadata (`+build.5`) is ignored rather than corrupting the parse.

---

## [9.8.3] — 2026-10-01 (released)

### Fixed

- **The TUI always opens on the landing menu again.** A saved session used to
  skip it on every launch, and one user's session had an MCP handshake request
  saved as its query, so startup auto-ran a garbage search instead of showing
  the menu. Sessions now restore preferences and pre-fill the last query only
  when a mode is picked; they never auto-run a search. Both save and restore
  sanitize the session: JSON-shaped or oversized queries are dropped, and
  malformed fields fall back to defaults, so a corrupted file can't hijack
  startup again.
- **401/403 API errors now say what actually went wrong instead of "Network
  error".** A rejected token (401) shows "Bad GitHub token (401)" with keys to
  fix it; an authenticated-but-forbidden 403 (e.g. SAML/SSO enforcement) names
  the SSO case; only genuine connectivity/server failures keep the generic
  network message. A rate-limited search no longer swallows the error and
  renders as a silent zero-result "success" — the real message reaches the
  status bar, the MCP server reports it as structured backoff advice, and the
  adapter no longer turns rate limits into empty results.
- **Recover-from-errors without leaving the TUI.** While the matching error is
  showing, `t` opens an inline token prompt (saves to config and re-runs the
  failed query), `u` clears the token and retries unauthenticated, `c` swaps in
  a different token after a rate limit, and `r` retries. Documented in the help
  overlay and README.
- **An image wrapped in a link now renders.** The badge-and-screenshot shape
  `[![alt](shot.png)](url)` — used by `sst/opencode` (its only hero image was
  lost) and `withastro/astro` (23 of 25 images lost) — was treated as prose
  because the markdown token walk rejected `link` tokens instead of recursing
  into them. The image now renders and keeps its link as an OSC 8 hyperlink on
  the image cells, so clicking it in the terminal opens the same URL.
- **A README full of small images no longer floods the screen.** Images whose
  README declares an edge under 100 px (`<img width="48">` sponsor avatars,
  badges) are filtered while parsing, before any request is made; images with
  no declared size are measured from their header after the download
  (`Bun.Image.metadata()`, header read only — no pixel decode) and rejected
  before rasterising. On `openclaw/openclaw` (661 `<img>` tags, 648 of them
  48×48 avatars) this takes the README from 649 downloads / 28.3 s to open to
  1 download / ~0.5 s.
- A pure-image block whose refs are all filtered out renders as nothing instead
  of falling back to prose, which would have printed the raw markdown of the
  filtered-out image.

### Changed

- **Images smaller than 100 px on any edge are no longer rendered, even when
  the declared size understates the real one** (two images in
  `openclaw/openclaw` declare `width="48"` but are 420×420). The README is
  treated as the authority on size; the alternative — rendering the avatar at
  whatever the terminal fits — is what made these READMEs unusable.
- The TUI no longer skips the landing menu on startup: a saved session
  restores sort/limit/trending tab and pre-fills the query when you pick Repo
  Search, but the menu always comes first. See the session-sanitizing fix
  above.

---

## [9.8.2] — 2026-09-28 (released)

### Security

- **GitHub tokens no longer leak into crash reports.** An uncaught error
  auto-built a GitHub issue URL from the raw `process.argv`, so a token passed
  as `--token` ended up in a public URL. Every field is now redacted before it
  reaches the URL, title, body or stack trace, and when a credential is
  detected ghfind prints the URL to copy instead of opening a browser.
- **Your token is never sent to `raw.githubusercontent.com`** when fetching a
  README. It is only attached to `api.github.com` requests, and only for a
  repository marked private.
- **Untrusted skill sources are validated** before they can reach a shell
  command or URL. A `source` or `skillId` containing shell metacharacters
  (`;`, `$`, backticks, newlines, path traversal) is now dropped from
  registry results instead of being interpolated into `npx skills add`.
- **The config file holding your token is written with `0600` permissions**
  (effective on POSIX; on Windows the file still inherits the directory ACL).
- `--doctor` masks the token with `maskToken()` instead of printing a
  raw 7-character prefix.

### Fixed

- **Recoverable errors no longer open a bug-report tab.** The catch in
  `src/cli.ts` tested `err.name === "SearchCliError"`, which is never true
  because each subclass sets its own name, so rate-limit, network and
  layout-change errors all fell through to the crash reporter. Routing now uses
  `instanceof SearchCliError`.
- **`--compare` and the MCP tool `ghfind_compare_repos` resolve repos
  exactly.** Both used a free-text search with no `repo:` qualifier and never
  checked the returned `fullName`, so they could silently compare a different
  repository. They now use the existing `resolveRepoFromRef()` seam
  (`GET /repos/{owner}/{repo}`).
- **State files are written atomically.** Bookmarks, history, sessions, saved
  searches, notifications and the update check were written straight to their
  live path; a crash or a full disk left a truncated JSON file that was then
  silently replaced with defaults, destroying user data. Writes now go to a
  temp file and are renamed into place.
- **Notification IDs no longer restart** after "dismiss all" — the id counter
  was recomputed from an already-empty list.
- **`ghfind history --delete` no longer removes every duplicate entry.** The
  delete matched by value instead of by index.
- **An invalid `--sort` value is rejected** with the list of valid choices and
  a non-zero exit code instead of silently degrading to the default.
- **A failed "load more" in the TUI no longer clears the results** already on
  screen; the error goes to the status bar.
- **`--markdown` escapes `|` in cells**, matching `--csv`.
- Local skill scanning is memoised per process, so a search no longer re-walks
  the skill roots on every keystroke.
- `MemoryCache.set` is a true LRU — a refreshed entry now moves to the end of
  the insertion order.
- Skill ids and sources may contain `_` (e.g. `my_org/my_repo`), which
  are common on GitHub and were wrongly rejected.

### Changed

- **`postinstall` and the bundled agent skill are unchanged in behaviour**; the
  skill now states that `--compare` resolves a repository exactly.
- Internal `--compare` resolution is now shared by the CLI and the MCP server
  instead of duplicated in both.

---

## [9.8.1] — 2026-09-26 (released)

### Added

- **`ghfind skill search <query>`** finds agent skills by keyword and prints
  why each one matched. The default scan reads `SKILL.md` files under
  `~/.codex/skills`, `~/.agents/skills`, `<project>/.codex/skills` and
  `<project>/.github/skills`, in that priority order and de-duplicated by name
  (the user-level roots overlap heavily on real machines). `--remote` queries
  the public [skills.sh](https://skills.sh) ecosystem instead and returns each
  hit's install count and `npx skills add` command. `GHFIND_SKILL_ROOTS`
  overrides which directories are scanned.
- **MCP tool `ghfind_skill_search`.** Agents can search skills the moment they
  connect: `source: "local"` (the default) searches installed skills,
  `source: "registry"` searches skills.sh. Read-only — it returns install
  commands rather than running them, and never writes to disk.
- **Read-only CLI views of local state:** `ghfind bookmarks [query]`,
  `ghfind history [query]`, `ghfind saved` and `ghfind topics`, each with
  `--json` for agents. They print what the TUI has stored and never modify it.
- **`ghfind readme <owner/repo>`** prints a repository's README (`--raw` skips
  the header, `--json` returns `{ owner, name, sourceUrl, text }`), bringing the
  TUI's README viewer to scripts and agents.
- **`ghfind share <owner/repo>`** prints a share snippet
  (`--as markdown|plain|gh-cli|short`), with `--copy` to also put it on the
  clipboard.
- Shell completions (bash, zsh, fish) cover every new subcommand and flag.

### Changed

- The bundled `ghfind-cli` agent skill documents the skill search and the new
  read-only commands, so CLI-first agents discover them without reading
  `--help`.

### Fixed

- **README image rendering does not work on real repositories.** The v9.8.0
  notes described inline images as working; that was wrong. An image wrapped
  in a link (`[![alt](shot.png)](url)`) renders nothing, and a README with
  many small images — `openclaw/openclaw` has 648 48x48 avatars — becomes
  15,552 rows tall. Images declaring an edge under 100px are skipped, and
  SVG is not rendered at all. Plain `![]()` images and large banners do
  render correctly. Root causes and remaining work:
  `.issues/tickets/readme-image-rendering.md`.

---

## [9.8.0] — 2026-09-22 (released)

### Added

- **README viewer now renders full markdown, including inline images.** The
  viewer used to approximate markdown with box-drawing text; it now drives
  OpenTUI's `MarkdownRenderable` with a theme-derived syntax style, so
  headings, emphasis, links, lists, blockquotes, boxed tables, and fenced
  code blocks render as markdown rather than as decorated plain text.
- **Images in READMEs render in the terminal.** Relative and root-relative
  paths resolve against the branch the README was loaded from,
  `github.com/.../blob/...` links are rewritten to raw content, and downloads
  are cached and capped by size. SVG and badge-service images are skipped
  (they carry text that survives rasterising poorly), and anything that fails
  to load falls back to an `🖼 alt text` caption. Images are drawn with
  truecolor half blocks, so they work on any truecolor terminal with no image
  protocol support; press `i` in the viewer to toggle them off. The pipeline
  lives in `src/png.ts` (PNG decoder), `src/image-render.ts`
  (image → cells), `src/image-loader.ts` (URL resolution + fetch cache),
  `src/markdown-images.ts` (token helpers) and `src/markdown-view.ts` (the
  renderable), and degrades to captions on runtimes without `Bun.Image`.

### Changed

- **The update modal's release notes render as markdown too.** The in-app
  update panel reused the same text approximation as the README viewer; it
  now shares `MarkdownRenderable` via the new view, so release notes show
  real headings, lists, inline code, and boxed tables. Inline images stay
  off there (the panel is narrow and notes are prose).
- With both surfaces migrated, the plain-text markdown renderer
  (`src/markdown-render.ts`) is no longer used and has been removed.

---

## [9.7.1] — 2026-09-20 (released)

### Fixed

- **In-app update installed to the wrong location when running under Bun** —
  `performUpdate()` ran `bun install -g github-search-cli`, which targets
  Bun's own global dir (`~/.bun`), not the npm prefix the running copy and
  its `ghfind` shim live in. The command exited 0 while the running install
  never changed. The updater now detects which package manager owns the
  running tree (`detectInstallLocation`: npm global vs `~/.bun` global) and
  shells out to `npm install -g --prefix <prefix>` for npm-owned installs,
  so the update lands exactly where the running install is.
- **Node fallback could not launch npm on Windows** — `child_process.spawn`
  without a shell cannot execute `npm.cmd` (and recent Node rejects it with
  `EINVAL`). The update spawn now goes through `node:child_process` on every
  runtime with `shell: true` on win32 and properly quoted arguments, so the
  Node fallback path actually works on Windows.
- **Compiled binaries / dev checkouts no longer fake an update** — when the
  running install has no `node_modules` ancestor, self-update is refused
  with a debug hint instead of npm-installing a copy the user isn't running.
- **Windows: URLs with query params were truncated at the first `&`** when opened via `cmd /c start` (every pre-filled crash-report/issue link lost its body and labels). Both openers now use `explorer.exe` on Windows, which receives the URL as a single argument.
- **`open-url.ts` crashed under Node** (`Bun.spawn` unconditional); now runtime-agnostic with a detached `child_process.spawn` fallback.
- **`--doctor` now detects stale/PATH-shadowing global installs** — multiple `ghfind` copies resolving to different versions are flagged with their prefixes and the exact uninstall command. This is the "updater said OK but nothing changed" trap.
- Lint gate was permanently broken: `package.json` pinned `biome@2.5.13` (package never existed on npm); now uses `@biomejs/biome` ^2.5.14 with a migrated `biome.json`.
- First clean lint baseline: 198 diagnostics triaged (auto-fixes + hand-fixes, incl. a dead `|| true` gate in `tui.ts` startup tips and an unsafe-autofix regression in `TrendingAdapter`); `tests/**` lint overrides for mocks/assertions; `tests/fixtures/**` excluded. CI now runs lint + typecheck on every push/PR (previously excluded as known-broken).
- `mcp-server.ts`: assignment-in-expression violations; `trending-parser.ts`: stateful `RegExp.exec` loop replaced with `matchAll` (lastIndex reuse hazard); `themes.ts`: documented ANSI control-char regex.

---

## [9.7.0] — 2026-09-19 (released)

### Added

- **CLI parity with the MCP tools** — the three MCP-only capabilities are now
  first-class CLI commands:
  - `ghfind deep-dive <owner/repo> [--json]` — language breakdown, top
    contributors, and a README excerpt (previously MCP-only; the agent skill
    doc told agents to `curl` instead).
  - `ghfind --compare` accepts `--json|--csv|--markdown` (previously
    text-only) and reports repos that failed to resolve; it exits non-zero
    when fewer than 2 repos resolve.
  - Trending language filter on the CLI: `ghfind trending <lang>` (the form
    the README already advertised), `ghfind --trending <lang>`, and
    `ghfind --trending --language <lang>` — validated against the same
    accepted-language list as the MCP tool.
- `ghfind deep-dive --json` exposes a structured payload (language percents,
  contributor counts, raw README) suitable for agents and scripting.

### Changed

- The MCP server now shares its repo-ref parsing, trending-language
  validation, and deep-dive data pipeline with the CLI via new seams in
  `deepdive.ts` and `search.ts` (no protocol behavior change).

### Fixed

- **`ghfind mcp` failed to typecheck** — `processServerLine` declared `msg`
  as a `let` binding, so TypeScript's aliased-conditional narrowing did not
  apply and every `respond`/`respondError` call site errored on
  `JsonRpcId | undefined`. HEAD did not compile. The id is now extracted
  into a `const` before the notification check; runtime behavior is
  unchanged (all 31 MCP tests pass against the previous behavior).
- **Deep-dive ran on a zeroed repo stub** — `ghfind deep-dive a/b --json`
  reported `stars: 0`, `description: null`, and no timestamps because the
  repo ref was never resolved. Both the CLI and the `ghfind_deep_dive` MCP
  tool now fetch real repo metadata first (a 404 exits with
  `Repo not found: owner/name`; network failures still degrade gracefully
  to the stub).

---

## [9.6.0] — 2026-09-18 (released)

### Added

- **MCP server (beta)** (`ghfind mcp`) — ghfind now speaks the
  [Model Context Protocol](https://modelcontextprotocol.io): any MCP client
  (Claude Code, Cursor, Codex, …) can call GitHub search as tools over stdio.
  Zero new dependencies — the server is a small JSON-RPC 2.0 layer over the
  existing modules. Nine tools: `ghfind_search_repos`, `ghfind_trending`,
  `ghfind_npm_packages`, `ghfind_org_profile`, `ghfind_user_profile`,
  `ghfind_compare_repos`, `ghfind_deep_dive`, `ghfind_bookmarked_releases`,
  and `ghfind_skill`. Implements the 2025-06-18 lifecycle (initialize →
  initialized notification → operation), speaks 2025-06-18 / 2025-03-26 /
  2024-11-05, reports tool failures as `isError` results per spec, and logs
  agent searches into the TUI history. `ghfind mcp --token <t>` pins a token;
  otherwise config/`GITHUB_TOKEN` applies.
- **Agent skill (beta)** (`ghfind skill [name]`) — a token-efficient CLI usage guide
  for coding agents (search syntax, flags, rate limits, token-efficiency
  tips) so they stop parsing `--help`. Bare `ghfind skill` lists the catalog;
  the registry (`src/agent-skill.ts`) is generic, so third parties can
  register their own skills alongside the built-in `ghfind-cli` one.
- **Trending language filter** — `SearchOptions.trendingLanguage` and the
  `ghfind_trending` MCP tool accept a github.com/trending language slug
  (`rust`, `python`, …); `buildTrendingUrl` validates against the known
  language list and drops unknown slugs instead of scraping an error page.
- **`NO_COLOR` support** — `ghfind --doctor` no longer emits ANSI color
  codes when `NO_COLOR` is set (any value, per
  [no-color.org](https://no-color.org/)) or when stdout is not a TTY.
- **curl installer** (`scripts/install.sh`) — downloads the standalone
  binary for the detected platform from GitHub Releases, verifies it
  against the release's `SHA256SUMS.txt`, installs to `~/.local/bin` or
  `/usr/local/bin` (overridable with `GHFIND_INSTALL_DIR`, never needs
  sudo), and prints a PATH hint when needed.
- **`SHA256SUMS.txt` on every release** — new `checksums` job in the
  release workflow merges all platform binaries' checksums into one
  file attached to the GitHub Release; the curl installer and package
  maintainers verify against it.
- **Community health files** — `SECURITY.md` (private vulnerability
  reporting), `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1), and
  `SUPPORT.md` (routes users to `--doctor`, issues, and discussions).

### Fixed

- **`scripts/brew.rb` formula was stale and broken** — pointed at the
  wrong repo (`frank/search-cli`), version 0.1.0, and `search-cli-*`
  asset names that never matched the release artifacts. Now targets
  `codersdfs/search-cli` releases with the correct `ghfind-*` asset
  names (plus linux-arm64), a livecheck block, and a version-pinning
  test. Still a template: SHA256 placeholders are filled from
  `SHA256SUMS.txt` when the tap lands.

---

## [9.5.1] — 2026-09-15

### Fixed

- **Landing-screen keys leaked into the main view** — pressing `/` on the
  landing menu focused the search input on top of it, and `Space`, `t`, `c`,
  `?`, and `q` all double-fired through the second key listener (help opened
  and instantly closed; quit ran cleanup twice). The landing handler now
  claims its keys with `stopPropagation()` via the `landingKeysActive` /
  `landingConsumesKey` seam (previously built and tested but never wired),
  and the global handler ignores everything while the landing menu owns the
  screen. Also fixed while routing keys: `b` on the landing screen now opens
  bookmarks (hint bar updated), and overlays opened from landing hide the
  menu instead of drawing on top of it.
- **Update panel clipped the changelog** — the modal was hard-capped at 16
  rows and put the release notes in a single unsized text block, so anything
  past the first ~10 lines of the notes was invisible with no hint that more
  existed. The notes area is now a scrollable region (same mechanics as the
  README/org viewers): `↑↓/jk` move a fifth of a page, `PageUp`/`PageDown`
  and `Home`/`End` jump, a scrollbar shows when content overflows, and scroll
  position resets each time the panel opens. The box is taller (24 rows), and
  notes render at the panel's actual width so wrapped lines no longer clip
  horizontally on narrow terminals.
- **`--help` listed `ghfind user <name>` twice** — the 9.5.0 usage block
  carried a duplicated line, so the profile examples were printed twice. It
  now appears once, and the `ghfind pkg` line is aligned with its neighbours.

### Internal

- **Test isolation** — seven suites derived their temp dirs from a
  `Date.now()` stamp (`tmpdir()/<name>-<ms>`), a name two concurrent
  `bun test` processes can collide on, which intermittently failed
  bookmarks / config / doctor / history / login / saved-searches /
  update-check tests. They now use `mkdtempSync`, which is unique and
  collision-proof (the pattern `tests/releases.test.ts` already used), and
  the login `readGhCliToken` / `persistToken` dirs are removed after use
  instead of accumulating in the temp folder.
- **Docs sync** (README ↔ `src/help.ts` ↔ `--help`): README gained
  `--releases` / `--compare` / `pkg` examples plus Packages and Releases
  feature rows; the TUI help screen gained the `Org profile` command-menu
  entry the leader menu already had. `tests/cli-help.test.ts` pins the
  `--help` usage block (no duplicate rows, one description column).
- `package-lock.json` root version synced to 9.5.1 (`bun.lock` carries no
  root version), and the release workflow's manual dispatch now runs the
  gate only — the GitHub Release and npm publish jobs are tag-gated, so
  dispatching from a branch can't create a release on a non-tag ref.
- `--doctor` tests remove their temp config dirs after each test instead of
  leaving them behind.
- **CI was red on `windows-latest`** — `tests/landing.test.ts` source-greps
  `src/tui.ts` for a snippet containing `\n`, but Windows checks the tree out
  with CRLF, so the assertion could never match there while every other OS
  passed. The source-grep helpers now normalise line endings before
  asserting; `tests/overlay-registry.test.ts` does the same.

---

## [9.5.0] — 2026-09-15 (released)

### Added

- **`ghfind user <name>`** — GitHub user profiles from the terminal, the
  user-side counterpart to `ghfind org <name>`. Fetches the user's metadata
  and public repos from the GitHub REST API and aggregates them into one
  summary: public repo count, total stars/forks of the fetched repos,
  followers/following, top languages by repo count, top 5 repos by stars, and
  the 5 most recently pushed repos. Supports `--json`, `--csv`, `--markdown`,
  `--count`, and `--limit` just like `org`, and honors `--token` for higher
  rate limits. Leading `@` is stripped (`ghfind user @torvalds` works), and
  Organization / Bot accounts are labeled with an `[org]` / `[bot]` badge in
  text output (`[staff]` for site admins).

### Fixed

- `ghfind org <name>` mangled multi-word names with dashes (`ghfind org "in
tech"` looked up `in-tech`) — names are now joined with spaces, which the
  API handles. In practice org logins are single tokens, so existing one-word
  lookups are unaffected.

### Internal

- `src/user.ts` mirrors the org-profile module shape: pure
  `normalizeUser`/`normalizeUserRepo` aggregate functions testable with
  fixtures, thin formatters, and a `fetchUserProfile` wrapper that degrades
  gracefully when the repos request fails (metadata is still returned).
- 27 new tests in `tests/user.test.ts` covering normalization, aggregation,
  `@`-stripping, 404/network error paths, token headers, zero-repo users,
  non-array API responses, badges, and all four formatters.
- **TUI overlay registry seam** — `src/tui.ts` is 2,867 lines and was the
  most-changed file in the repo (28 of the last 200 commits). A new
  `src/tui/overlays/registry.ts` introduces the seam that future
  migrations will consume: `Overlay` interface plus `OVERLAYS` array and
  `getOverlay()` lookup. The first overlay (`help`) is extracted behind
  it. Behaviour is unchanged. Migration is gradual; subsequent commits
  move one overlay at a time and rewire `showOverlay()` to query the
  registry. 6 guard tests in `tests/overlay-registry.test.ts` pin the
  registry contract and source-grep `src/tui.ts` to fail on drift between
  the registered ids and the dispatcher's union type.

---

## [9.4.3] — 2026-09-13 (released)

### Added

- nothing added

### Changed

- tui bug that local works but global doesn't

### Fixed

- tui bug that local works but global doesn't

## [9.4.2] — 2026-09-12 (released)

### Added

- **Standalone binaries** — the release workflow now compiles
  self-contained `ghfind-<os>-<arch>` executables (Linux, macOS, Windows)
  via `bun build --compile` and attaches them to GitHub Releases. No
  Node.js or Bun needed — unblocks Homebrew / Scoop / winget / curl
  install channels.
- **npm provenance** — `publish-npm` runs `npm publish --provenance` with
  `id-token: write`, so published tarballs carry a verifiable provenance
  badge on npmjs.com.
- `src/version.ts` — single source for version resolution. Primary
  source is the `__GHFIND_VERSION__` constant injected at build time
  (tsup `define`, bun `--define`); falls back to reading package.json
  relative to the module in source/dist trees.
- **README trust & comparison** — npm version / weekly downloads / CI /
  TypeScript / license badges; a "Why ghfind?" table vs `gh search` and
  `hub`; standalone-binary install section.
- **`ghfind login`** — stores a GitHub token for 5,000 req/hr rate limits.
  Detects a token managed by the GitHub CLI (`~/.config/gh/hosts.yml`) and
  offers to import it, or accepts a pasted token; warns if it doesn't look
  like a GitHub credential (`ghp_` / `gho_` / `github_pat_`). Writes the same
  config file as `ghfind init`.
- **Better failure hints** — the `bin/ghfind.js` entry now points broken
  installs at `ghfind --doctor` instead of failing silently (previously a
  missing `src/` + `dist/` exited 0 without a word).
- **Hardened trending parser** — `parseTrendingHtml` moved to its own module
  (`src/trending-parser.ts`, no TUI/@opentui dependency). Layout changes that
  previously produced an **empty trending list with no explanation** now throw
  a friendly `ParseError` ("GitHub may have changed the layout. [r]etry").
  New golden-test harness: `tests/fixtures/trending.html` is a live capture
  of the page, and 11 tests pin the parser to it (including the login
  `/login?return_to=…` href and `/owner/name/stargazers`-link false positives).

### Changed

- Package description and keywords rewritten around real search intent
  (9 → 17 keywords, e.g. `github-search`, `trending-repositories`,
  `commandline`, `npm-search`, `octokit`).

### Fixed

- **In-app update loop was broken** — `performUpdate()` ran
  `npm install -g ghfind`, but no `ghfind` package exists on npm; every
  "Yes" on the update modal failed. Now installs `github-search-cli`,
  and works under Node.js too (previous code used `Bun.spawn`
  unconditionally).
- **`--version` crashed in compiled binaries** — version was read from
  `package.json` via filesystem paths in `cli.ts`, `tui.ts`,
  `update-check.ts`, and `error-report.ts`, which do not exist inside a
  single-file executable. Version is now embedded at build time.
- **TUI crashed on boot with upgrade state (`bun start` → exit 1)** — the
  update modal's `showOverlay("update")` called `updateSelect.focus()`, but
  `updateSelect` was never declared (vestigial reference from the 9.4.0
  refactor). Every launch where `update-state.json` recorded a version
  upgrade threw `ReferenceError: updateSelect is not defined` before the
  render loop started. The vestigial call is removed; the modal is driven by
  `updateSelectedOption` + the global key handler, which now renders
  correctly ("Updated ghfind X → Y" panel). Guarded by a source-grep test in
  `tests/overlay-registry.test.ts`.

---

## [9.4.0] — 2026-08-28

Release tracking for bookmarked repos, plus a bookmarks page and toast notifications in the TUI.

### Added

**Release tracker** — follow releases of repos you've bookmarked

- `src/releases.ts` — checks each bookmarked repo against `GET /repos/{owner}/{repo}/releases?per_page=5`
- Seen state is `lastSeenAt` per bookmark; "new" means published after that timestamp
- ETag conditional requests + `GITHUB_TOKEN` when available to conserve rate budget
- Prereleases shown and tagged `[pre]`; drafts never shown
- `ghfind --releases` prints the new-release feed, then marks everything seen; `--releases --json` for machine output
- Opening the Notifications panel (Space → System → Notifications) now runs a check in the background and files each new release as a `🚀` notification

**Bookmarks page** — bookmarks are now a first-class mode, not an overlay

- Reachable from the landing screen (`b`, or `Enter` on the new button) and from Space → Navigate → Bookmarks
- `Enter` opens the repo in a browser, `d` removes, `Esc` / `←` returns to landing
- `SessionState.mode` accepts `"bookmarks"`, so a restart restores you onto the page

**Landing bookmarks button** — fourth selectable row below the three mode cards, with a live count (`4 saved` / `none yet`) refreshed on every visit

**Toast popup** — top-right rounded card confirming bookmark changes; green border for bookmarked, yellow for unbookmarked, auto-hides after 2s

**`b` keybinding** — toggles bookmark on the selected repo from the main view (previously only reachable via Space → Repo → Bookmark)

**Diagnostics: `ghfind --doctor`** — environment troubleshooting command for the interactive TUI

- 10 checks: runtime, bundled Bun, system Bun, Node version, build output, source, TTY, config validity, GitHub token, state/cache dirs
- Per-check status: green `PASS`, yellow `WARN`, red `FAIL`; non-zero exit on any FAIL so scripts can detect broken installs
- `src/doctor.ts` is purely diagnostic (no TUI, no network) and exits with code 1 if any check fails
- `bin/ghfind.js` Strategy 1 now prefers the bundled `vendor/bun` (downloaded by `postinstall.js`) and falls back to a system-installed `bun` on PATH; doctor confirms which one wins

**Error report on uncaught exceptions** — never auto-posts

- When `ghfind` hits an unexpected error, builds a pre-filled `https://github.com/codersdfs/search-cli/issues/new?title=...&body=...&labels=bug` URL with the error class, message, stack, command line, and environment (ghfind version, runtime, platform)
- Tries to open the URL in the user's default browser (Bun.spawn when available, child_process.spawn detached fallback for Node); prints the URL when no browser can be launched
- Known user-facing errors (`SearchCliError` subclasses) keep their existing friendly message and skip the report flow
- `src/error-report.ts` is the new module; `tests/error-report.test.ts` covers URL format, ANSI stripping, long-message truncation, non-Error throwables, env + command in body

### Fixed

- Landing screen vanished after the bookmarks page landed — `showLanding()` revealed `landingBox` before `hideMainContent()` hid it again; ordering corrected
- Arrow keys moved the landing selection _and_ the bookmarks list at the same time — the landing handler only checked `currentMode`, which opening bookmarks doesn't change. Now gated on `landingKeysActive(mode, overlay)`
- `Enter` on the landing bookmarks button immediately opened the first bookmark in a browser — the same key event reached the global handler after the page opened. Consumed keys now call `key.stopPropagation()`
- `q` inside the bookmarks overlay quit the app instead of closing it — same double-handling root cause
- `tests/tips.test.ts` imported a `TipRotator` class that `src/tips.ts` never exported, so its module-load error was misattributed to whichever test file ran next. Added the class and `defaultRotator`; behavior unchanged

### Changed

- Help screen: new "Bookmarks Page" section; `b` / `c` / `t` documented under Main View; Landing section documents the button; "Overlay Keys" no longer lists bookmarks
- Leader menu "Notifications" now reads "View alerts — checks bookmarks for new releases"
- Landing hint line includes `[b]ookmarks`
- `Bookmark` type gains `lastSeenAt`; `src/bookmarks.ts` exports `getLastSeen()` / `markSeen()`

### Internal

- Extracted `src/toast.ts` and `src/landing.ts` so the toast, button, and key-routing predicates are testable without booting the TUI
- Tests: 187 passing — `tests/landing.test.ts` (30), `tests/toast.test.ts` (6), `tests/releases.test.ts`, `tests/tips.test.ts`, `tests/doctor.test.ts` (2), `tests/error-report.test.ts` (6)

---

## [9.3.0] — 2026-08-24

### Fixed

- `c` keybinding in the TUI not adding repos to comparison — a missing closing brace in the space-key handler broke every later key handler (`c`, `t`, `?`)
- README viewer now renders full markdown (headings, code blocks, lists, tables, blockquotes, rules) instead of stripping formatting

### Changed

- Widened compare table columns (min 35 chars) and added Description + URL rows
- Compare table shows up to 5 topics per repo (was 3)

---

## [9.2.1] — 2026-08-23

### Added

- npm package search (beta)
- New landing screen with selectable mode cards

### Fixed

- TUI layout issues on small terminals
- Trending not visible when launched from the landing screen — `loadTrending()` was the only mode switch that didn't set `body.visible`
- Trending tabs now fetch independently, with an active-tab underline

### Changed

- Removed the bundled Bun binary from the npm package; it is downloaded at install time on all platforms
- Package size reduced from 39.5 MB to 100 KB
- Postinstall no longer fails `npm install` when the Bun download fails (graceful fallback)
- Removed `bun` from the engines field — Bun need not be pre-installed
- Non-interactive modes (`--json`, `--csv`, …) run on Node.js 20+ alone

---

## [9.1.1] — 2026-08-11

### Fixed

- Postinstall now exits with code 1 on Bun download failure
- Removed dead Strategy 3 fallback in `bin/ghfind.js` (Node cannot import `.ts`)

### Changed

- Bundle `vendor/` and `dist/` in the npm package for offline install
- Bundled Bun updated from 1.3.12 to 1.3.14

---

## [9.1.0] — 2026-08-07

### Added

- Automatic update checking against the npm registry, with a Y/N/L modal (install now / skip / dismiss)
- Leader menu (Space) consolidating all contextual actions
- Topic explorer, notifications panel, and saved searches overlay
- Activity graph toggle (commit chart fullscreen)
- README viewer
- Tab auto-complete for search qualifiers
- PageUp / PageDown navigation
- `Ctrl+X` clears history, `Ctrl+C` clears all notifications

### Fixed

- Postinstall downloads the Bun binary correctly on all platforms
- Zip asset names match Bun's current release naming
- Zip parsing uses the central directory instead of local file headers
- `postinstall` uses `node` instead of `bun run`, so Bun need not be pre-installed
- TUI works on Node.js 20+ via the downloaded Bun binary

### Changed

- Removed `vendor/` from the npm package (Bun downloaded at install time)
- Improved export error handling and format selection

---

## [0.9.0] — 2026-07-31

### Added

- Watch mode (`--watch`) for polling a query
- Notifications panel and UI refinements

### Fixed

- Trending browser fixes

---

## [0.8.2] — 2026-07-31

### Fixed

- TUI stability fixes; rewritten keybindings reference

---

## [0.8.1] — 2026-07-27

### Fixed

- Follow-up fixes to the 0.8.0 breaking change

---

## [0.8.0] — 2026-07-26

### Added

- Trending browser, deep-dive, compare, export, share, topics, saved searches
- Activity graph, README viewer, notifications panel

**Breaking:** entry point and command surface changed; 0.8.1 shipped the same day as an emergency follow-up

---

## [0.7.0] — 2026-07-25

### Added

- Bookmarks and search history

---

## [0.6.1] — 2026-07-24

### Fixed

- Fixes for the initial release

---

## [0.6.0] — 2026-07-23

### Added

- First public release: repo search with qualifiers, sorting, and JSON output

---

## A note on version numbers

The jump from `0.9.0` to `9.1.0` was a one-time renumbering, not 9 major releases. The `9.x` line begins with the update checker and leader menu. There is no `9.0.0`, and `9.2.0` was never published — `9.2.1` superseded it before release.
