Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Search: exclude results with a leading minus (-is:image, -app:slack, -word)

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

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
Domain
frontend, search

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

enhancement good first issue

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:image hides images
  • -app:slack hides everything copied from Slack
  • -draft hides items that contain "draft"
Where to look
  • src/shared/search.ts: ParsedQuery, parseQuery and matchesQuery
  • src/renderer/src/shelf/shelf-app/shelf-app.tsx highlights matches on cards with parseQuery(search).terms. Keep excluded words in their own fields (say excludeTerms, excludeKinds, excludeApps) rather than in terms, or the shelf would highlight words it's hiding
  • tests/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.ts cover these, and pnpm test passes
  • 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from alexsilver8/openpaste

All issues in alexsilver8/openpaste

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.