Skip to content

feat(spotlight): rework !bang search UX#4813

Open
ajnart wants to merge 20 commits intodevfrom
feat/rework-search
Open

feat(spotlight): rework !bang search UX#4813
ajnart wants to merge 20 commits intodevfrom
feat/rework-search

Conversation

@ajnart
Copy link
Member

@ajnart ajnart commented Jan 7, 2026

What

Reworks Spotlight search to support !bang selection (configured engines + DuckDuckGo), and makes the default Spotlight view a launcher-like help screen.

Changes

  • Default Spotlight shows launcher/help (removed ? mode)
  • Select a bang via click/Enter to lock it into the query
  • Uses DuckDuckGo bangs from https://duckduckgo.com/bang.js as fallback
  • Reduced overlay blur

Screenshots

image

CleanShot 2026-01-07 at 17 48 43

CleanShot 2026-01-07 at 17 55 24@2x

@ajnart ajnart requested a review from a team as a code owner January 7, 2026 16:53
@deepsource-io
Copy link
Contributor

deepsource-io bot commented Jan 7, 2026

Here's the code health analysis summary for commits 2354510..bc296f3. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript❌ Failure
❗ 4 occurences introduced
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Member

@Meierschlumpf Meierschlumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something is broken when you choose a built in search engine:

Image

Also we would need to add a user option if he wants to have ddg bangs

@ajnart
Copy link
Member Author

ajnart commented Jan 25, 2026

I think something is broken when you choose a built in search engine:

Image Also we would need to add a user option if he wants to have ddg bangs

Changes done, I fixed as much as I could, the commit fb15e1e is a bit big but it adds the user option to toggle on/off ddg bangs

@ajnart ajnart requested a review from Meierschlumpf January 25, 2026 14:32
Replace generic Error with ResponseError from @homarr/common/server
for better error handling consistency across the codebase.
Add JSDoc comment explaining why lowerBound uses binary search (O(log n))
instead of findIndex (O(n)) for searching ~13,000+ DuckDuckGo bangs.
Consolidate the DuckDuckGo bangs toggle into the existing search
preferences form instead of having a separate form section.

- Add ddgBangsEnabled to userChangeSearchPreferencesSchema
- Update changeSearchPreferencesAsync to handle ddgBangs
- Add toggle to ChangeSearchPreferencesForm component
- Remove standalone DdgBangsForm component
- Deprecate standalone changeDdgBangs endpoint (kept for API compat)
Generated migrations using pnpm db:migration:mysql:generate and
pnpm db:migration:postgresql:generate for the ddgBangs user column.
@ajnart ajnart requested a review from Meierschlumpf January 30, 2026 16:32
@ajnart
Copy link
Member Author

ajnart commented Feb 5, 2026

@Meierschlumpf I addressed the changes, let me know if it works for you

@Meierschlumpf
Copy link
Member

It almost works, but when disabling it then this is still shown:
image

Also not sure if we should enable them by default

@ajnart
Copy link
Member Author

ajnart commented Feb 10, 2026

It almost works, but when disabling it then this is still shown: image

Also not sure if we should enable them by default

This should be the default one, bangs will still work but not the ddg ones, can't disable built-in bangs

@Meierschlumpf
Copy link
Member

Okay makes sense, can you fix the CI? Then we can merge IMO

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