Search: exclude results with a leading minus (-is:image, -app:slack, -word)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 75/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
Research direction
Start in src/shared/search.ts with ParsedQuery, parseQuery and matchesQuery to see how filters and terms are split today. Check shelf-app.tsx, which highlights parseQuery(search).terms, so excluded words go into separate fields such as excludeTerms. Done when the three leading-minus forms work alone and mixed with normal filters, hyphenated words still match as before, tests/search.test.ts covers the new cases and pnpm test passes, and the README search bullet mentions the minus.
Written by the indexing model from the issue text.
Description
Search can narrow results down but can't leave things out. Today -is:image is searched as the literal text "-is:image". Most search boxes let you exclude with a leading -, and the shelf should too:
-is:imagehides images-app:slackhides everything copied from Slack-drafthides items that contain "draft"
Where to look
src/shared/search.ts:ParsedQuery,parseQueryandmatchesQuerysrc/renderer/src/shelf/shelf-app/shelf-app.tsxhighlights matches on cards withparseQuery(search).terms. Keep excluded words in their own fields (sayexcludeTerms,excludeKinds,excludeApps) rather than interms, or the shelf would highlight words it's hidingtests/search.test.ts
Done when
- The three forms above work, on their own and mixed with normal filters (
is:code -app:terminal) - Words with a hyphen inside (
well-known,e-mail) are searched as before - Tests in
tests/search.test.tscover these, andpnpm testpasses - The search bullet in
README.md("Finds things fast") mentions the minus
Suggested pull request title: feat(search): exclude results with a leading minus
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
-
area:ui effort:S enhancement priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
QuantumNous/new-api#7839 ·
Maintainers usually reply within 1 day
-
good first issue maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
dark-princezz/stellar-hooks#1010 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
interledger/rhyza#352 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day