Skip to content

docs: search finds typos, other word endings, keywords, and what each section says - #159

Merged
vite-hub[bot] merged 3 commits into
mainfrom
docs/search-fuzzy
Oct 24, 2026
Merged

vite-hub[bot] merged 3 commits into
mainfrom
docs/search-fuzzy

Conversation

@onmax

@onmax onmax commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Search only matched exact substrings of page titles, headings, and descriptions, so gannt found nothing even though the charts Syntax page has a Gantts heading. Search now finds pages by typos, other forms of a word, aliases, and the text under each heading.

What a query matches, best first:

  • the same word, ignoring case, accents, and a plural s (Gantts matches gantt)
  • the start of a word, for a word still being typed
  • the same word with another ending (theme finds Theming, sorting finds sort)
  • a word one typo away, or two for words of 8 letters or more, counting a swapped pair as one (gannt, screnshot, frontmater). Typos are only tried when the typed word isn't in the index, so video doesn't find Vimeo, and never on short words or on the first letter

The index (search.json) now holds each page's tagline and intro text, each heading's section text (code blocks left out), and a new keywords frontmatter field. Every package overview, guide, recipe, and the comparison page get aliases they don't say themselves: lightbox and medium-zoom for zoom, admonition for github's callouts, accordion and spoiler for details, gantt, timeline, and roadmap for charts, asciinema for cast, and so on.

Ranking weighs where a word was found (title 10, keywords 6, section label and description 3, text 1), adds a bonus when the query covers most of the title, and scores Doctor rule pages at 0.6 so a block's own docs come before the rules about it. When no entry has every word, it shows the entries with the most. Common words such as how, to, and the are dropped unless they're the whole query.

The dialog bolds the matched words. When the title doesn't explain the match, the result shows a two-line excerpt of the text that does. It shows up to 20 results, up from 12, and Doctor results are now labelled Doctor instead of Docs.

search.json grows from 98 KB to 379 KB (101 KB gzipped). It still loads only when search is hovered or opened, and a query takes about 1 ms over the 827 entries.

AGENTS.md says when to add keywords.

Checks

  • e2e/play.e2e.ts: the search test now also checks a typo (gannt opens /charts/syntax/#gantts), a keyword-only word (lightbox opens /zoom/), and a text-only word (heatmap opens Any chart with heatmap marked in its excerpt).
  • Local runs: docs.e2e.ts and play.e2e.ts (17 passed) against the static build, tsc --noEmit, vp lint and vp fmt on the changed files, pnpm run lint:docs, and test/workspace.test.ts. navigation.e2e.ts needs the Nuxt output, which only CI's pnpm docs:build produces, so it was not run locally.

… section says

Search matched only exact substrings of titles, headings, and descriptions, so "gannt" found nothing although Gantts has its own heading. The index now holds each page's and heading's text and a page's keywords frontmatter, and the dialog matches typos, prefixes, and word endings, ranks by where a word is found, marks the matches, and shows the text that matched when the title doesn't.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 986127e 2026-10-24T14:52:35.191Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 9123162 2026-10-24T12:29:31.116Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 14215d4 2026-10-24T11:00:34.559Z Visit the dashboard ↗

@vite-hub

vite-hub Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-10-24T14:57:14.988Z 1m 27s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request c37e0f28-062d-4ada-a80a-39a91a7cea2e.

View session

Verified the prepared HEAD, clean worktree, successful required checks, and current search logic. Both prior common-word findings are fixed and their threads are explicitly resolved; no actionable P0/P1 findings remain. No repair commit or push was needed.

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

Session

Command failed: git -C /home/workspace/babysitter-data/tmp/vitehub-provider-NDYLsg update-index --no-skip-worktree -- AGENTS.md fatal: Unable to mark file AGENTS.md

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T11:01:43.723110Z 14215d4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14215d4c4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/build.ts Resolved
@pkg-pr-new

pkg-pr-new Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@159

comark-badge

pnpm add https://pkg.pr.new/comark-badge@159

comark-cards

pnpm add https://pkg.pr.new/comark-cards@159

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@159

comark-cast

pnpm add https://pkg.pr.new/comark-cast@159

comark-charts

pnpm add https://pkg.pr.new/comark-charts@159

comark-chips

pnpm add https://pkg.pr.new/comark-chips@159

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@159

comark-code

pnpm add https://pkg.pr.new/comark-code@159

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@159

comark-colors

pnpm add https://pkg.pr.new/comark-colors@159

comark-critic

pnpm add https://pkg.pr.new/comark-critic@159

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@159

comark-details

pnpm add https://pkg.pr.new/comark-details@159

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@159

comark-diff

pnpm add https://pkg.pr.new/comark-diff@159

comark-embed

pnpm add https://pkg.pr.new/comark-embed@159

comark-fields

pnpm add https://pkg.pr.new/comark-fields@159

comark-figure

pnpm add https://pkg.pr.new/comark-figure@159

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@159

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@159

comark-github

pnpm add https://pkg.pr.new/comark-github@159

comark-icon

pnpm add https://pkg.pr.new/comark-icon@159

comark-include

pnpm add https://pkg.pr.new/comark-include@159

comark-keys

pnpm add https://pkg.pr.new/comark-keys@159

comark-links

pnpm add https://pkg.pr.new/comark-links@159

comark-linter

pnpm add https://pkg.pr.new/comark-linter@159

comark-mark

pnpm add https://pkg.pr.new/comark-mark@159

comark-media

pnpm add https://pkg.pr.new/comark-media@159

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@159

comark-outline

pnpm add https://pkg.pr.new/comark-outline@159

@onmax/comark

pnpm add https://pkg.pr.new/@onmax/comark@159

comark-properties

pnpm add https://pkg.pr.new/comark-properties@159

comark-qr

pnpm add https://pkg.pr.new/comark-qr@159

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@159

comark-sources

pnpm add https://pkg.pr.new/comark-sources@159

comark-steps

pnpm add https://pkg.pr.new/comark-steps@159

comark-table

pnpm add https://pkg.pr.new/comark-table@159

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@159

comark-tests

pnpm add https://pkg.pr.new/comark-tests@159

comark-xref

pnpm add https://pkg.pr.new/comark-xref@159

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@159

commit: 986127e

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Exact searches for common words are broken even though the PR documents them as searchable when they are the whole query.

Reviewed changes

  • Search index — Added keyword aliases and indexed page intros plus h2/h3 section prose while excluding code blocks.
  • Fuzzy matching — Added normalization, prefixes, word endings, typo distance, common-word filtering, and ranking across indexed fields.
  • Search results — Added up to 20 results, matched-word highlighting, and text excerpts when the title does not contain the match.
  • Docs metadata and coverage — Added keywords across the docs and expanded the browser search checks for typos, keyword-only terms, and section text.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread docs/build.ts Resolved
@vite-hub

vite-hub Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Fixed both common-word search findings: exact equality is checked first, while common query words now skip prefix, ending, and typo matching, so the matches only indexed the and still works as a whole query.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Common-word exact matching — Restored exact matches for queries made entirely of common words while preserving filtering for common words in mixed queries.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Documentation guidance — Updated AGENTS.md and the Agents guide wording in the merge commit; no search behavior changed since the prior review.
  • Common-word matching — Re-reviewed the exact-match fix at docs/build.ts; all-common queries remain searchable while common words stay filtered from mixed queries.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit 640f01e into main Oct 24, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
onmax added a commit that referenced this pull request Oct 24, 2026
Main gained the quiz package (#167), search keywords (#159), and the rename to comark-ui (#169). This
branch folds each package's docs into one page, so quiz's five pages become packages/quiz/docs/index.md,
and the preset's keywords move to Getting started. The redirect worker keeps both moves: old hosts go to
comark-ui.onmax.me, and old per-topic pages to each package's page.
onmax added a commit that referenced this pull request Oct 24, 2026
…t the workspace test

#159's search e2e expected the charts sections at /charts/syntax/, but this branch folds them into
/charts/. The rename to comark-ui lengthened the workspace test's homepage line past the formatter's width.
vite-hub Bot added a commit that referenced this pull request Oct 24, 2026
…t UI's (#168)

* feat!: publish the preset as comark-ui, and lay out the docs like Nuxt UI's

@onmax/comark becomes comark-ui, the one install the docs recommend. The
rail drops from one item per package to Docs, Components, Typography,
Linter, and Playground, and each package's pages merge into one page in
Usage, Examples, API, Theme order, ending with how to install it alone.
Old pages redirect to the merged ones.

BREAKING CHANGE: @onmax/comark is now comark-ui; import comarkUi from "comark-ui/html".

* test(e2e): follow the docs' new names and pages

* docs: complete merged API and redirect fixes

* test: move the merged search e2e to the folded charts page, and format the workspace test

#159's search e2e expected the charts sections at /charts/syntax/, but this branch folds them into
/charts/. The rename to comark-ui lengthened the workspace test's homepage line past the formatter's width.

* docs(metrics): document stat tile contracts

---------

Co-authored-by: vitehub-bot[bot] <320448255+vitehub-bot[bot]@users.noreply.github.com>
Co-authored-by: vitehub-bot[bot] <vitehub-bot[bot]@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
@onmax
onmax deleted the docs/search-fuzzy branch November 1, 2026 11:04
vite-hub Bot added a commit that referenced this pull request Nov 17, 2026
* feat(ui): lay out Markdown tables from their cells

A table with ids, links, and two prose columns squeezed its short columns
until `portal #1596` broke into `#159` and `6`, chips included, since a
chip may break anywhere and its icon added nothing to the cell's minimum
width.

The new tableLayout plugin, on by default, reads each top-level table
while parsing. Short columns stay on one line. A table wider than a
readable column goes in a data-wide div and grows into the room beside
the text. A table with two or more prose columns stacks the later ones
under the first when it gets under 85% of its width, and becomes one
column per row on a phone. It's data attributes and container queries
in the typeset, with no script.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(ui): preserve table layout through comments and native geometry

* test(ui): align wide-block assertion with comments wrapper selector

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: vite-hub[bot] <320448255+vite-hub[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant