Search: app:"…" breaks on app names with spaces
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- search
Research direction
Start with the tokenizer in parseQuery in src/shared/search.ts, the regex /"[^"]*"|\S+/g, and the quote stripping in the app: branch. Reproduce with app:"Visual Studio Code" hello and check that it yields one app filter visual studio code plus the term hello. Add cases to tests/search.test.ts for quoted app names, a bare quoted phrase, and app:slack, then run pnpm test.
Written by the indexing model from the issue text.
Description
Filtering by an app whose name has a space doesn't work. parseQuery keeps quoted text together only when the quote starts the token, so app:"Visual Studio Code" hello currently parses as:
{ terms: ['studio', 'code"', 'hello'], kinds: [], apps: ['visual'] }
It should be:
{ terms: ['hello'], kinds: [], apps: ['visual studio code'] }
The same happens with app:"Google Chrome", app:"Microsoft Word" and so on.
Where to look
src/shared/search.ts: the tokenizer inparseQuery(input.match(/"[^"]*"|\S+/g)) and the quote stripping in theapp:branchtests/search.test.ts: theparseQuerytests
Done when
app:"Two Words"becomes a single app filter, lowercased, without the quotes- A quoted phrase on its own (
"exact words") and an unquotedapp:slackstill work as before - New cases in
tests/search.test.tscover these, andpnpm testpasses
Suggested pull request title: fix(search): support quoted app names with spaces
New to OpenPaste? CONTRIBUTING.md covers setup, the code conventions and the checks to run before a pull request (pnpm typecheck, pnpm test, pnpm format, pnpm cleaner). Leave a comment if you're picking this up so nobody doubles up.
Generated by Claude Code
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alexsilver8/openpaste
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
alexsilver8/openpaste#31 ·
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
alexsilver8/openpaste#32 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
alexsilver8/openpaste#30 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
alexsilver8/openpaste#29 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
alexsilver8/openpaste#27 ·
All issues in alexsilver8/openpaste
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dsh-market/dsh-market#877 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-dev-skill#151 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:arcade game ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fderuiter/deruiter.dev#2281 · 1 comment ·
Maintainers usually reply within 1 day
-
scope: data grid type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days