Skip to content

feat: add scoped bookmark search#422

Closed
JustYannicc wants to merge 29 commits into
SuperCmdLabs:mainfrom
JustYannicc:feat/browser-scoped-bookmarks
Closed

feat: add scoped bookmark search#422
JustYannicc wants to merge 29 commits into
SuperCmdLabs:mainfrom
JustYannicc:feat/browser-scoped-bookmarks

Conversation

@JustYannicc

@JustYannicc JustYannicc commented May 17, 2026

Copy link
Copy Markdown
Contributor

Closes #421

Stack / merge order

This is PR 6 of 11 in the browser/root-search stack.

Current PR: #422 feat: add scoped bookmark search
Previous PR: #420 feat: show favicons for browser results
Next PR: #424 feat: add scoped history search

Recommended merge order:

  1. #412 feat: support Chromium profile history and bookmarks
  2. #414 feat: add Chromium browser tab sync bridge
  3. #416 feat: add browser result controls and provider ordering
  4. #418 feat: add scoped open tab search
  5. #420 feat: show favicons for browser results
  6. #422 feat: add scoped bookmark search
  7. #424 feat: add scoped history search
  8. #426 feat: add built-in web search bangs
  9. #428 refactor: split launcher App.tsx into focused modules
  10. #430 feat: improve root query ranking
  11. #432 feat: gate alpha Chromium root search

#434 is independent of this stack and can be merged separately at any time.

Please merge the browser/root-search PRs in this order. Later PRs include the earlier branches so GitHub stays conflict-free. PRs before #428 intentionally keep the feature work in the pre-refactor launcher shape; the App.tsx extraction starts at #428, and #430/#432 build on the extracted modules.

What changed

Adds an explicit Search Bookmarks command for imported browser bookmarks with filtering, profile context, and browser result actions.

Why

This keeps the browser/root-search work split into reviewable slices instead of submitting the full integrated branch as one large change.

Compatibility impact

Depends on browser profile/bookmark import and browser result surfaces.

How tested

Manually tested empty and filtered bookmark search, opening bookmark results, and profile/source labels. Integrated branch checks passed for main TypeScript, Vite renderer, root-search ranking tests, and browser-search lag tests.

Full integrated branch for build/testing: https://github.com/JustYannicc/SuperCmd/tree/my-build

Focused diff for review: JustYannicc/SuperCmd@feat/browser-result-favicons...JustYannicc:SuperCmd:feat/browser-scoped-bookmarks

Feedback and requested adjustments are very welcome; I am happy to reshape the split or behavior to match the project direction.

Discover Chromium-family browser profiles from Local State and expose them through a browser-search profile IPC surface.

The Advanced settings UI now treats browser history as profile enrollment instead of a one-time import: detected Chromium profiles are shown in an available list, added profiles move into a separate SuperCmd list, and each added profile can be refreshed or removed from its row. The UI also notes that Safari and Firefox profile support is deferred.

Enabled profiles are persisted in settings, imported with source profile metadata, refreshed on startup, refreshed when the launcher opens, and refreshed periodically. Refreshes are incremental: each profile reads only history rows newer than the newest stored visit timestamp for that browser/profile.

History import removes the hidden 2,000-row SQL limit and fixed 5,000-entry cache trim so SuperCmd keeps every retained HTTP(S) history row.

Verification: ./node_modules/.bin/tsc -p tsconfig.main.json; ./node_modules/.bin/vite build; focused browser profile locale/key validation. Known pre-existing gaps: node scripts/check-i18n.mjs and ./node_modules/.bin/tsc -p tsconfig.renderer.json still fail on unrelated locale/type issues.
When browser-search input matches an imported Chromium profile history entry, open that entry URL through the source browser with its stored --profile-directory instead of always using the default browser.

This covers Helium, Chrome, Brave, Edge, and Vivaldi. Arc intentionally remains on fallback/default-browser behavior until its profile and space open semantics are verified.

Plain typed URLs and searches keep the existing shell.openExternal path. Profile-aware opens update the matched history entry frecency and fall back to the default browser if the profile-specific open command fails.

Verification: ./node_modules/.bin/tsc -p tsconfig.main.json; ./node_modules/.bin/vite build.
Show import status directly in the Browser Profiles settings lists so users can see what each added profile currently contributes.

Each added profile row now shows its imported history URL count and clearly notes that tabs and bookmarks are not imported yet. Available profiles only show identity because they have not been added/imported yet.

Verification: ./node_modules/.bin/tsc -p tsconfig.main.json; ./node_modules/.bin/vite build; focused browser profile row locale validation.
Pass the URL to macOS open before Chromium profile arguments so opening a matched browser-history entry navigates instead of only focusing the browser app.

For Default profiles, omit --profile-directory because the URL open target is enough and avoids the argument path that caused Helium to focus without opening the page. Non-default Chromium profiles still receive --profile-directory after the URL.

Verification: ./node_modules/.bin/tsc -p tsconfig.main.json; ./node_modules/.bin/vite build.
Import HTTP(S) bookmarks from added Chromium-family browser profiles alongside history.

Bookmark entries are stored with source browser/profile metadata, included in browser autocomplete by URL and title, opened through the existing source-profile URL path, and counted per added profile in Settings.

Unlike history, bookmarks are replace-on-refresh per profile so removed or renamed bookmarks do not accumulate as stale rows. Bookmark entries are also excluded from history retention pruning.

Verification: ./node_modules/.bin/tsc -p tsconfig.main.json; ./node_modules/.bin/vite build; focused bookmark row locale validation.
Add a local MV3 browser extension scaffold that sends debounced tab snapshots to a loopback SuperCmd dev bridge.

Store live tabs and pending extension-fed navigations in memory, expose pending navigations through the existing browser history list, and flush them once durable browser history imports catch up.

Use the cached live tab/history surface in root search and show per-profile tab counts in Settings without adding any automatic extension install or browser restart behavior.
Add a browser result command channel for focusing existing tabs with Cmd+Enter while keeping plain Enter on browser results as the normal open action.

Render browser matches in a dedicated root-search Browser section with source badges/icons for open tabs, bookmarks, and history.

Add browser-profile settings for ordered result providers with per-provider row counts, including migration defaults and localized labels.
Use the configured browser result provider order for both the root Browser section and the top browser result.

Replace the top-result path with a shared browser candidate model inspired by omnibox provider scoring: match quality, recency/frequency, tab activity, and last-focused browser window are scored within provider groups.

Add a full browser-results view from the Browser section so ranking can be inspected across bookmarks, open tabs, and history.
Add a built-in Search Open Tabs command that opens a dedicated browser tab result view. The scoped view lists live extension tabs with an empty query, filters by title or URL, groups results by browser window, and keeps tabs in browser tab order.

Invert scoped activation so Enter focuses the existing tab while Cmd+Enter opens normally, and surface those actions in the footer instead of per-row badges.

Make live tab snapshots independent from the browser history/search toggle, refresh tabs when the command opens, and make the development extension recover when SuperCMD starts after the extension by retrying undelivered snapshots.
Pass live tab favicon URLs from the development browser extension into SuperCMD tab snapshots and preserve them through the renderer browser-search result model.

Render browser result favicons in root search and scoped browser result views, with existing tab/bookmark/history glyphs kept as fallbacks when a favicon is unavailable or fails to load.
Add a built-in Search Bookmarks command that opens the browser results view in a bookmark-only scope. Empty queries list imported bookmarks, typed queries filter by title or URL, and selected bookmarks open normally.

Preserve Chromium bookmark folder paths and browser order during import so the scoped view can group bookmarks by folder, including nested folder paths such as Bookmarks Bar - Work.
# Conflicts:
#	src/main/main.ts
#	src/renderer/src/hooks/useBrowserSearch.ts
#	src/renderer/src/i18n/locales/de.json
#	src/renderer/src/i18n/locales/en.json
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/fr.json
#	src/renderer/src/i18n/locales/it.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/ru.json
#	src/renderer/src/i18n/locales/zh-Hans.json
#	src/renderer/src/i18n/locales/zh-Hant.json
#	src/renderer/src/settings/AdvancedTab.tsx
# Conflicts:
#	browser-extension/background.js
#	src/main/browser-tabs.ts
#	src/main/main.ts
#	src/main/preload.ts
#	src/renderer/src/hooks/useBrowserSearch.ts
#	src/renderer/src/i18n/locales/de.json
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/fr.json
#	src/renderer/src/i18n/locales/it.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/zh-Hans.json
#	src/renderer/src/i18n/locales/zh-Hant.json
#	src/renderer/types/electron.d.ts
@JustYannicc JustYannicc force-pushed the feat/browser-scoped-bookmarks branch from 5791f38 to dbf673c Compare May 19, 2026 21:46
# Conflicts:
#	browser-extension/background.js
#	src/renderer/src/App.tsx
#	src/renderer/src/hooks/useBrowserSearch.ts
#	src/renderer/src/i18n/locales/de.json
#	src/renderer/src/i18n/locales/en.json
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/fr.json
#	src/renderer/src/i18n/locales/it.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/ru.json
#	src/renderer/src/i18n/locales/zh-Hans.json
#	src/renderer/src/i18n/locales/zh-Hant.json
#	src/renderer/src/utils/command-helpers.tsx
@JustYannicc

Copy link
Copy Markdown
Contributor Author

Superseded by the combined conflict-free PR #434, which contains this work and the rest of the remaining stack.

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.

Add scoped Search Bookmarks command

1 participant