Skip to content

App Store and Apps search do not trim the query, so " notes" finds nothing #233

Closed

Description

@nixfred

What happens

Both search boxes compare the raw input with includes:

  • web/src/screens/Store.tsx line 83: .toLowerCase().includes(q.toLowerCase())
  • web/src/screens/Apps.tsx line 42: .toLowerCase().includes(q.toLowerCase())

The query is never trimmed. A leading space (from pasted text or a keyboard that adds a space) means the query can no longer match the start of the haystack, and a trailing space means it cannot match the last word. The Omarchy plugins search on the same screen goes through omarchyd/omarchy-plugins.mjs, which does .trim().toLowerCase(), so the three searches behave differently. Also browsing = !q is false for a query of just a space, so the Discover page is replaced by a flat list.

How to reproduce

I ran the Store filter on sample data:

const apps=[{name:'Immich',tagline:'Photos',developer:'Immich team'},{name:'Notes',tagline:'Write',developer:'Acme'}]
const search=(q)=>apps.filter(a=>!q||`${a.name} ${a.tagline} ${a.developer}`.toLowerCase().includes(q.toLowerCase())).map(a=>a.name)
search('notes')   // [ 'Notes' ]
search(' notes')  // []   (expected [ 'Notes' ])
search('acme ')   // []   (expected [ 'Notes' ])

With q.trim() the same queries return [ 'Notes' ].

Suggested fix

Trim the query once (const needle = q.trim().toLowerCase()) and use it for both the empty check and the match, in Store.tsx and Apps.tsx.

Environment

Omarchy Server main (0786ba9, 0.9.50), Node 26.

Activity

  1. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #526, #342, #525, #524, #527, #133, #102, #777, #129, #239, #243, #236, #232, #142, #242, and #443 share the app store with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thanks @nixfred. Search ignores spaces around the words you type. This ships in #876.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions