fix(web): search palette — line hits from one page flood results, duplicate rows, exact title match buried #76

Open
opened 2026-07-04 10:59:48 +00:00 by anuna-02 · 0 comments
anuna-02 commented 2026-07-04 10:59:48 +00:00 (Migrated from codeberg.org)

Summary

In the search palette (⌘K), a single page can flood the entire first screen of results with one entry per matching line, burying pages whose title exactly matches the query. There are also literal duplicate rows (same page, same line anchor, same snippet).

Found during UAT of v0.9.3 (zetl serve on the bundled demo-vault).

Reproduction

  1. cd demo-vault && zetl serve --port 3777
  2. Open any page, press ⌘K, type cache.

Actual

  • Results 1–13 are all theories/caching — one row per matching line (#line-2, #line-9, #line-10, #line-26, #line-30, #line-33, #line-38, #line-39, #line-40, #line-41, #line-43, #line-45), each displayed with the same score (1.72).
  • Rows 2 and 3 are identical duplicates: both theories/caching/#line-9 with the same snippet ("Cache is mtime-based (from architecture/Cache.md)").
  • The page literally titled Cache (architecture/cache) first appears at rank 14 — below the fold; a user typing "cache" cannot see it without scrolling.

Expected

  • Line hits grouped per page (page row + a few matching snippets), so one verbose page can't crowd out every other page.
  • No duplicate rows for the same page+line.
  • Title matches (exact/prefix) ranked above content-line matches.

Environment

zetl 0.9.3, zetl serve, demo-vault, Chromium 140.

## Summary In the search palette (⌘K), a single page can flood the entire first screen of results with one entry per matching line, burying pages whose *title* exactly matches the query. There are also literal duplicate rows (same page, same line anchor, same snippet). Found during UAT of v0.9.3 (`zetl serve` on the bundled demo-vault). ## Reproduction 1. `cd demo-vault && zetl serve --port 3777` 2. Open any page, press ⌘K, type `cache`. ## Actual - Results 1–13 are **all** `theories/caching` — one row per matching line (`#line-2`, `#line-9`, `#line-10`, `#line-26`, `#line-30`, `#line-33`, `#line-38`, `#line-39`, `#line-40`, `#line-41`, `#line-43`, `#line-45`), each displayed with the same score (1.72). - Rows 2 and 3 are **identical duplicates**: both `theories/caching/#line-9` with the same snippet ("Cache is mtime-based (from architecture/Cache.md)"). - The page literally titled **Cache** (`architecture/cache`) first appears at rank 14 — below the fold; a user typing "cache" cannot see it without scrolling. ## Expected - Line hits grouped per page (page row + a few matching snippets), so one verbose page can't crowd out every other page. - No duplicate rows for the same page+line. - Title matches (exact/prefix) ranked above content-line matches. ## Environment zetl 0.9.3, `zetl serve`, demo-vault, Chromium 140.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
anuna-research/zetl#76
No description provided.