Skip to content

feat(search): add a search palette for drafts, commands, settings and pages - #111

Merged
Deityhub merged 2 commits into
devfrom
feat/search-palette
Nov 14, 2026
Merged

Deityhub merged 2 commits into
devfrom
feat/search-palette

Conversation

@Deityhub

Copy link
Copy Markdown
Owner

What

A search palette for finding anything, on every page but the home page.

Opening it

  • Ctrl/⌘ Shift P anywhere; Ctrl/⌘ K anywhere except in the editor's text, where it stays Link.
  • A Search button in the editor's top bar, the Settings header and the public pages' header.

What it finds

  • Drafts by name, title or folder; In drafts: drafts whose text holds every word, with the matching line, opening the draft at that line.
  • Headings of the open draft.
  • Commands: in the editor, new draft, import, the exports, views, panels, focus mode, insert link, image or table, save a version, the rules, AI and shortcuts dialogs, and share, edit together and publish for a cloud draft; everywhere, theme.
  • Settings: each row of the Settings page (from a small catalog), opening its tab.
  • Pages: editor, settings, guides and each guide, privacy, terms, and admin for an admin.

How

  • Built in the project (no new dependency). src/lib/search/: ranking (every word must match; titles starting with them first), entries, and a registry a mounted page adds its commands to. The palette (src/components/search/) is mounted from the root and its code loads on first open.
  • The Export menu's handlers became named functions shared with search. The shortcuts dialog lists the new keys.

Tests

  • Unit tests for ranking, the matching line, the registry and the entries.
  • E2E: a word in another draft opens it at that line; the two shortcuts; an editor command and a setting; works on a guides page, not on home.
  • Full unit and e2e suites (246), typecheck, lint, Tailwind and Worker size checks pass. Specs updated (UI_SPEC, SYSTEM_SPEC).

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The preview for this pull request was removed.

@Deityhub
Deityhub merged commit e6fc13c into dev Nov 14, 2026
5 checks passed
@Deityhub
Deityhub deleted the feat/search-palette branch November 14, 2026 19:36

This branch was successfully deployed

1 active deployment
preview — ea47ca86 Deployed Nov 14, 2026 by Deityhub via Deploy preview #175
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