feat(docs): improve search with Pagefind tuning, section badges, and test coverage#482
Merged
bradygaster merged 6 commits intobradygaster:devfrom Mar 22, 2026
Merged
Conversation
…ind tuning Phase 1 of docs search improvements: - W1.1: Add pagefind.yml with exclude_selectors and longer excerpts (200 chars) - W1.2: Add data-pagefind-meta section attributes to DocsLayout and blog layout, add data-pagefind-weight=2 to h2/h3 via rehype plugin, add data-pagefind-ignore to nav, footer, sidebar, and pre elements - W1.3: Increase search result limit from 8 to 25, add Previous/Next pagination, show result count (e.g. Showing 1-25 of 47 results) - W1.4: Display section badges on search results sourced from Pagefind metadata, styled with Tailwind color-coded badges per section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep metadata attributes, section badges, heading weights, and ignore rules. Roll back pagination UI and custom excerpt length — focus on more meaningful results with fewest changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… e2e) Add 23 tests covering all Phase 1 search changes: Build output tests (13 tests): - pagefind.yml exists with correct exclude selectors - pagefind index generated in dist/ - data-pagefind-body on article elements (docs + blog) - data-pagefind-meta section values on all content pages - Blog pages have section:Blog metadata - data-pagefind-weight=2 on h2/h3 inside articles - data-pagefind-ignore on nav, footer, pre elements Playwright e2e tests (10 tests): - Search modal opens via button click and Ctrl+K - Modal closes on Escape and backdrop click - Typing a query returns results with section badges - Results display title and excerpt - Result count is shown in status bar - Clicking a result navigates to that page - Search handles no-results gracefully Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
@bradygaster This is ready for your review. Our team has reviewed and signed off:
13 files changed, +497 lines. All additive — no breaking changes. |
bradygaster
approved these changes
Mar 22, 2026
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
…aster#482) * test: human journey — Power user (bradygaster#396) Add E2E journey test covering advanced shell features: - /help and /status slash commands - Tab completion for /commands and @agent names - Ctrl+C cancel during processing - Double Ctrl+C exit - Multiple slash commands in sequence - @agent direct routing with complex messages Closes bradygaster#396 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: human journey — My first conversation (bradygaster#384) Add E2E journey test covering a new user's first interaction with Squad: - Welcome banner display (title, version, agents, help hint) - First message submission and coordinator routing - Thinking indicator during processing - Receiving agent responses via ShellApi - /help command exploration - /status agent roster check - @agent direct message routing - Graceful exit (exit, quit, Ctrl+C) 28 tests across 8 journey steps using createShellHarness() pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 Docs Search Improvements ΓÇö Phase 1
Problem: The Squad docs site search (Pagefind) runs on pure defaults ΓÇö no content weighting, no metadata, no section awareness. Navigation menus, footers, and code blocks pollute results. Users can't tell which section a result comes from.
Solution: Tune Pagefind with minimal, high-impact configuration changes. No content modifications, no new dependencies beyond Playwright for testing.
Before / After
Search: "agent"
Search: "install"
Search: "ceremony"
What Changed
pagefind.ymlconfigdata-pagefind-meta)data-pagefind-weight)data-pagefind-ignore)<pre>blocks excluded from indexingsection:BlogmetadataFiles Changed (13 files, +497 lines)
docs/pagefind.ymlΓÇö NEW: Pagefind configurationdocs/src/plugins/rehype-pagefind-attrs.mjsΓÇö NEW: rehype plugin for heading weightsdocs/src/components/Search.astroΓÇö Section badges + result countdocs/src/layouts/DocsLayout.astroΓÇö Section metadata on articlesdocs/src/components/Footer.astroΓÇö data-pagefind-ignoredocs/src/components/Header.astroΓÇö data-pagefind-ignoredocs/src/components/Sidebar.astroΓÇö data-pagefind-ignoredocs/src/pages/blog/[...slug].astroΓÇö Blog section metadatadocs/astro.config.mjsΓÇö rehype plugin registrationdocs/package.jsonΓÇö Playwright dev dependency + test scriptdocs/playwright.config.mjsΓÇö NEW: Playwright configdocs/tests/build-output.test.mjsΓÇö NEW: 13 build output testsdocs/tests/search.spec.mjsΓÇö NEW: 10 Playwright e2e testsTest Coverage (23 tests)
Build output tests (13): Verify HTML has correct Pagefind attributes.
Playwright e2e tests (10): Live search ΓÇö modal, badges, results, keyboard shortcuts.
Design Decisions
How to Preview