P13: Docs search — local plugin, enriched library, tests, UX #69

Merged
kert merged 1 commits from feature/docs-search into main 2026-03-21 19:34:12 +00:00
Owner

Summary

Full-text search for docs (#63)

  • Installed @easyops-cn/docusaurus-search-local — client-side Lunr search
  • Indexes all 450+ doc pages at build time
  • Search bar appears in navbar
  • Created docs/docs/api/index.md listing all 9 API packages
  • Fixed intro.md relative link
  • Changed onBrokenLinks from warn to throw — future broken links fail the build

Enriched library data (#64, #66)

  • Removed 300-char abstract truncation — full text exported
  • Added creators/authors from item_creators table (4 items have creators)
  • Fixed Dockerfile: uv run --with pydantic (not bare python3)
  • Added build-time assertion: library.json must have >0 items
  • Library search now includes creator names

Library search UX (#68)

  • 200ms debounce on search input (was filtering on every keystroke across 6,597 items)
  • URL state: ?q=text&collection=KEY&tags=a,b persisted via history.replaceState
  • Cmd+K / Ctrl+K keyboard shortcut focuses search
  • Updated placeholder with shortcut hint

Integration tests (#67)

  • 9 new tests in tests/docs/test_docs_build.py
  • Covers: export runs, items non-empty, required fields, no truncation, tag consistency, intro links, API docs generated

Closes #63, #64, #65, #66, #67, #68

Test plan

  • 9 new docs tests pass
  • Full test suite passes
  • All notebooks run as scripts
  • Rebuild docs container and verify search bar works
  • Test library page search with URL params
## Summary ### Full-text search for docs (#63) - Installed `@easyops-cn/docusaurus-search-local` — client-side Lunr search - Indexes all 450+ doc pages at build time - Search bar appears in navbar ### Fix broken /api link (#65) - Created `docs/docs/api/index.md` listing all 9 API packages - Fixed intro.md relative link - Changed `onBrokenLinks` from `warn` to `throw` — future broken links fail the build ### Enriched library data (#64, #66) - Removed 300-char abstract truncation — full text exported - Added creators/authors from `item_creators` table (4 items have creators) - Fixed Dockerfile: `uv run --with pydantic` (not bare python3) - Added build-time assertion: library.json must have >0 items - Library search now includes creator names ### Library search UX (#68) - 200ms debounce on search input (was filtering on every keystroke across 6,597 items) - URL state: `?q=text&collection=KEY&tags=a,b` persisted via `history.replaceState` - Cmd+K / Ctrl+K keyboard shortcut focuses search - Updated placeholder with shortcut hint ### Integration tests (#67) - 9 new tests in `tests/docs/test_docs_build.py` - Covers: export runs, items non-empty, required fields, no truncation, tag consistency, intro links, API docs generated Closes #63, #64, #65, #66, #67, #68 ## Test plan - [x] 9 new docs tests pass - [x] Full test suite passes - [x] All notebooks run as scripts - [ ] Rebuild docs container and verify search bar works - [ ] Test library page search with URL params
kert added this to the P13: Docs Search — local search, library data, broken links, tests milestone 2026-03-21 19:33:39 +00:00
kert added 1 commit 2026-03-21 19:33:39 +00:00
docs search: local plugin, enriched library, tests, UX
Some checks failed
ci/woodpecker/push/infra-ci Pipeline failed
ci/woodpecker/pr/infra-ci Pipeline failed
ci/woodpecker/push/ci Pipeline was successful
coverage 99% coverage
ci/woodpecker/pr/ci Pipeline was successful
49100bcb22
## Full-text search for docs (#63)
Install @easyops-cn/docusaurus-search-local — client-side Lunr
search that indexes all 450+ doc pages at build time.

## Fix broken /api link (#65)
Create docs/docs/api/index.md, fix intro.md, onBrokenLinks=throw.

## Enriched library data (#64, #66)
Full abstracts, creators/authors, Dockerfile pydantic fix.

## Library search UX (#68)
200ms debounce, URL state, Cmd+K shortcut.

## Integration tests (#67)
9 new tests: export, fields, truncation, tags, links, API docs.

fix #63, fix #64, fix #65, fix #66, fix #67, fix #68
kert merged commit 7d224948b5 into main 2026-03-21 19:34:12 +00:00
Sign in to join this conversation.