Skip to content

feat(bookmarks): add browser bookmark search with 'b ' prefix - #108

Open
jishanws wants to merge 1 commit into
typecraft-dev:mainfrom
jishanws:feat/browser-bookmarks
Open

jishanws wants to merge 1 commit into
typecraft-dev:mainfrom
jishanws:feat/browser-bookmarks

Conversation

@jishanws

Copy link
Copy Markdown

Summary

sequenceDiagram
    participant User
    participant Launcher as LauncherWindow / RootSearch
    participant Backend as Backend / BookmarkSource
    participant Browser as Browser Process

    User->>Launcher: types "b <query>"
    Launcher->>Backend: searchAsync("b <query>")
    Note over Backend: Bypasses nativeSearch (apps index)<br/>Queries isolated BookmarkSource
    Backend-->>Launcher: Browser Bookmarks results
    User->>Launcher: presses ↵ (Open in Browser) or Ctrl+Shift+C (Copy URL)
    Launcher->>Browser: omarchy-launch-browser <url>
Loading

Adds native browser bookmark search to oma-cast:

  • Scoped prefix routing: Typing b or B in the launcher immediately queries browser bookmarks.
  • Strict performance isolation: Bookmarks are kept out of backend.candidates and nativeSearch, ensuring general desktop search incurs zero overhead regardless of bookmark count.
  • Multi-browser auto-discovery: Automatically detects bookmarks from Brave, Google Chrome, Chromium, Vivaldi, and Microsoft Edge.
  • Live file watching: Real-time hot-reload when bookmarks are added, removed, or renamed in the browser without restarting omarchy-shell.
  • Keyboard actions: ↵ opens the bookmark via omarchy-launch-browser, and Ctrl+Shift+C copies the URL to the clipboard.

Evidence

  • Before:
    Typing b only matched web fallbacks or general fuzzy candidates; no bookmark search or browser integration existed.

    query: "b "
    results: (no bookmark provider; fallback web search only)
    
  • After:
    Typing b or b <query> lists and fuzzy-ranks browser bookmarks with instant response. Unit tests and doctor pass:

    ✔ cleanUrl removes protocol, www, and trailing slashes (1.78ms)
    ✔ extractDomain extracts domain names from various URLs (0.51ms)
    ✔ parseBookmarks parses nested Chromium bookmark JSON (0.35ms)
    ✔ parseBookmarks handles invalid and empty JSON safely (1.14ms)
    ✔ candidates creates properly formatted search candidates with deduplication (0.53ms)
    ✔ knownPaths returns paths for major Linux browsers (0.29ms)
    ✔ rootSections isolates bookmarks to 'b ' prefix only (7.95ms)
    ✔ actionsFor offers Open in Browser and Copy URL for bookmarks (0.51ms)
    ...
    ℹ tests 195
    ℹ pass 192
    ℹ fail 0
    ℹ skipped 3
    

    omacast doctor reports all checks ok:

    omacast doctor
      ok    omarchy-shell is installed
      ok    omarchy-shell is running
      ok    socat is installed (fast shell IPC)
      ok    Hyprland socket is reachable
      ok    plugin is installed in /home/jishan/.config/omarchy/plugins/typecraft.omacast
      ok    plugin is enabled
      ok    plugin answers IPC
      ok    backend answers system.healthPing
      ok    no QML errors in the shell log
    

Merge Danger

Door: Two-way

All bookmark logic is additive and strictly isolated to the b search prefix. If a browser bookmarks file is absent or malformed, BookmarkSource safely falls back to an empty candidate list without throwing or affecting desktop search.

Blast Radius: Low

Only affects candidate aggregation and adds the prefix handler for b . General search, calculator, clipboard, and script runner paths remain unchanged.

- Add Bookmarks core module to parse Chromium-based browser bookmarks
- Auto-detect Brave, Chrome, Chromium, Vivaldi, and Edge bookmark stores
- Add BookmarkSource QML service with live FileView file watching
- Scope bookmarks search exclusively to 'b ' / 'B ' prefix in RootSearch
- Keep bookmark candidates isolated from general search to ensure zero overhead
- Fast-path searchAsync to bypass nativeSearch for bookmark queries
- Add 'Open in Browser' (↵) and 'Copy URL' (Ctrl+Shift+C) actions
- Support setQuery outcome in LauncherWindow
- Add comprehensive unit tests in tests/bookmarks.test.js (192 passing)
- Update README.md documentation
Copilot AI balanced review requested due to automatic review settings November 18, 2026 13:46

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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.

2 participants