Search: contextual search inside each mode #63

Open
opened 2026-09-24 15:53:04 +00:00 by kayg · 3 comments
Owner

Owner decision S8 (DESIGN §32): besides global ⌘K, each mode has its own contextual search: Files — ⌘F filters the current folder (and optionally subfolders) instantly; Photos — photo search (CLIP semantic, places, dates, people later); Calendar — finds events and log entries and jumps the calendar to the match. Same floating-window visual language, scoped results, Esc returns to the unfiltered view.

Context for the owning job

  • Repo: kayg/calternal (~/Developer/calternal). Read CLAUDE.md, CONTEXT.md and docs/DESIGN.md (§15, §18 budgets, §31, §32) first. Prior art: calternal.js docs/search.md (read-only at /home/kayg/Developer/calternal.js) — its palette UX, > command mode, ranking weights, a11y combobox pattern and recents carry over.
  • Existing code: crates/calternal-search (Tantivy index, watcher + reconcile, providers via calternal-plugin fan-out), the ⌘K registry in apps/web.
  • Owner rules: search must be ultra fast (⌘K results < 50 ms p95 at 100k items; first keystroke to first results < 16 ms for client providers); file over app (indexes are derived and rebuildable); performance first but never at the cost of finesse; calternal.js design system (Claude reviews screenshots; floating window over a dimmed + blurred background, spring motion, reduced-motion respected); never ship sample data; atomic commits (commit every 30–45 min); adversarial testing after API work.
  • Comment on this issue when you start, on findings, when blocked, and when finished. Never close it.
Owner decision S8 (DESIGN §32): besides global ⌘K, each mode has its own contextual search: Files — ⌘F filters the current folder (and optionally subfolders) instantly; Photos — photo search (CLIP semantic, places, dates, people later); Calendar — finds events and log entries and jumps the calendar to the match. Same floating-window visual language, scoped results, Esc returns to the unfiltered view. ## Context for the owning job - Repo: kayg/calternal (~/Developer/calternal). Read CLAUDE.md, CONTEXT.md and docs/DESIGN.md (§15, §18 budgets, §31, §32) first. Prior art: calternal.js `docs/search.md` (read-only at /home/kayg/Developer/calternal.js) — its palette UX, `>` command mode, ranking weights, a11y combobox pattern and recents carry over. - Existing code: `crates/calternal-search` (Tantivy index, watcher + reconcile, providers via calternal-plugin fan-out), the ⌘K registry in apps/web. - Owner rules: search must be **ultra fast** (⌘K results < 50 ms p95 at 100k items; first keystroke to first results < 16 ms for client providers); file over app (indexes are derived and rebuildable); performance first but never at the cost of finesse; calternal.js design system (Claude reviews screenshots; floating window over a dimmed + blurred background, spring motion, reduced-motion respected); never ship sample data; atomic commits (commit every 30–45 min); adversarial testing after API work. - Comment on this issue when you start, on findings, when blocked, and when finished. Never close it.
Author
Owner

Starting the search window UI job for #57, #61, #63 and #64 (one job, one worktree). Branch: job/search-ui; base SHA: 8c216759f01d704e69ecf37ef8293f422abf5552.

Plan: extend the existing ⌘K dialog and registry in apps/web (no second palette) into one floating search window with pills, previews and an in-place expanded view; add Files ⌘F and Calendar contextual search; add a saved-search CRUD API (JSON files through calternal-fs) and smart folders. I will post findings and a finish comment here.

Starting the search window UI job for #57, #61, #63 and #64 (one job, one worktree). Branch: `job/search-ui`; base SHA: `8c216759f01d704e69ecf37ef8293f422abf5552`. Plan: extend the existing ⌘K dialog and registry in apps/web (no second palette) into one floating search window with pills, previews and an in-place expanded view; add Files ⌘F and Calendar contextual search; add a saved-search CRUD API (JSON files through `calternal-fs`) and smart folders. I will post findings and a finish comment here.
Author
Owner

Finished #63 for Files and Calendar on branch job/search-ui at a8d2f644b41c0ebdd2eeff2bf4cfca6c6a3cfa5c (not pushed, not merged). Photos has no UI yet, so Photos search is not built.

Files ⌘F:

  • ⌘F (or the magnifier in the folder actions) opens the shared search capsule over the folder. It filters the loaded rows inside the keystroke with no request (case- and accent-insensitive, every word must match).
  • "Include subfolders" asks the server search with in:<folder> and lists the matches with their folder, like Recent. Enter opens a folder, or a file's folder with the file in Quick Look.
  • The filter lives in the URL (?filter=…&deep=1), so a filtered folder is a link. Esc clears the text; a second Esc returns to the whole folder.

Calendar:

  • ⌘F or a new search button in the calendar header opens the one search window with a removable "Calendar" scope chip. Results are log entries, events and tasks. Choosing one jumps the calendar to it: /d/<date>#^<block> opens the Day view, reveals the entry and opens its popover. Esc leaves the calendar as it was.
  • Event hits now link to /e/<id>, a new route that opens the event's day.

The e2e covers both flows (apps/web/e2e/search.mjs).

Finished #63 for Files and Calendar on branch `job/search-ui` at `a8d2f644b41c0ebdd2eeff2bf4cfca6c6a3cfa5c` (not pushed, not merged). Photos has no UI yet, so Photos search is not built. Files ⌘F: - ⌘F (or the magnifier in the folder actions) opens the shared search capsule over the folder. It filters the loaded rows inside the keystroke with no request (case- and accent-insensitive, every word must match). - "Include subfolders" asks the server search with `in:<folder>` and lists the matches with their folder, like Recent. Enter opens a folder, or a file's folder with the file in Quick Look. - The filter lives in the URL (`?filter=…&deep=1`), so a filtered folder is a link. Esc clears the text; a second Esc returns to the whole folder. Calendar: - ⌘F or a new search button in the calendar header opens the one search window with a removable "Calendar" scope chip. Results are log entries, events and tasks. Choosing one jumps the calendar to it: `/d/<date>#^<block>` opens the Day view, reveals the entry and opens its popover. Esc leaves the calendar as it was. - Event hits now link to `/e/<id>`, a new route that opens the event's day. The e2e covers both flows (`apps/web/e2e/search.mjs`).
Author
Owner

Hygiene review: Files and Calendar contextual search are merged, but the final report says Photos contextual search is not built. Keeping #63 open for that remaining mode.

Hygiene review: Files and Calendar contextual search are merged, but the final report says Photos contextual search is not built. Keeping #63 open for that remaining mode.
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
kayg/calternal#63
No description provided.