taskflow icon indicating copy to clipboard operation
taskflow copied to clipboard

[bug] Search in docs do not work

Open semiholectus opened this issue 3 months ago • 1 comments

Describe the bug Search in docs do not work

To reproduce

  1. Go to the docs page: https://heggria.github.io/taskflow/en/docs
  2. Click search (or CMD + K for macos)
  3. Type something that must show up, like flow or phase
  4. Results should show up, but they don't
  5. Observe browser console (See attachments, there are 404 error messages)

Expected behavior Results shown after search

Observed behavior

  • No results shown after search
  • No errors

Environment

  • OS: macOS
  • Browser: Chrome

Screenshots

Image Image Image

semiholectus avatar Aug 13 '26 07:08 semiholectus

Fixed in rc/0.3.0-beta.2 (commit 7ab9818 fix(website): wire static search index for docs).

Root cause: Fumadocs 16's default search client fetches /api/search, which was not emitted on the static GitHub Pages export — every Cmd+K query 404'd and returned no results.

Fix:

  • Added website/app/api/search/route.ts using createFromSource + staticGET so the full zbsearch index is pre-rendered into the static export.
  • Configured RootProvider with type: 'static' and a basePath-aware API URL so the dialog loads the exported index.

Verified: pnpm build emits dist/api/search (advanced, i18n, 10358 docs); smoke search returns hits for flow/phase/budget/recompute in both en and zh-cn. Full suite 2357 pass / 0 fail.

This fix currently lives on rc/0.3.0-beta.2 and will ship with the 0.3.0-beta release. If you need it on the live docs sooner, it can be cherry-picked to main as a standalone patch.

heggria avatar Aug 14 '26 04:08 heggria