Fix cookbook search to filter every card - #663
Merged
Merged
Conversation
The search only matched cards linking to kernel/cookbooks on GitHub, so cards pointing to guides or partner sites never hid. Filter all cards in the page content instead, and hide a section and its heading when none of its cards match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
masnwilliams
approved these changes
Oct 2, 2026
This branch was successfully deployed
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.
Summary
The search box on the cookbooks page only filtered cards whose link started with
https://github.com/kernel/cookbooks/tree/main/. The other 11 cards link to internal guides, partner sites, or other repos, so they never hid. Searching for something that matches nothing still showed 11 cards and no "no cookbooks match" message.This change:
.cardinside the page's.columnssections, whatever it links toH2heading when none of its cards match, so you don't get empty "Common patterns" / "Harnesses & models" headingsTesting
Ran
mint devlocally and drove the page with headless Chromium:modalcaptchavercelzzzz🤖 Generated with Claude Code
Note
Low Risk
Client-side DOM filtering only on the cookbooks page; no auth, data, or API changes.
Overview
Cookbook search no longer limits filtering to cards whose links point at the GitHub
kernel/cookbookstree. It now walks every.cardunder#content .columns, so internal guides and external links are included in match counts and visibility.When a query hides every card in a section, that
.columnsblock and its precedingH2are hidden too, avoiding orphan section titles. The “no cookbooks match” state now reflects zero visible cards instead of leaving non-GitHub cards on screen.Reviewed by Cursor Bugbot for commit 11be274. Bugbot is set up for automated code reviews on this repo. Configure here.