Skip to content

feat(listings): add ignore list context menu to listing description - #497

Merged
orangecoding merged 7 commits into
orangecoding:masterfrom
chbndrhnns:feat/context-menu-ignore-list-v2
Oct 31, 2026
Merged

orangecoding merged 7 commits into
orangecoding:masterfrom
chbndrhnns:feat/context-menu-ignore-list-v2

Conversation

@chbndrhnns

@chbndrhnns chbndrhnns commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Allows users to highlight words or phrases in the listing description on the listing detail page, right-click, and directly add them to the parent job's ignore list (blacklist).

  • Backend API & Storage:
    • Added jobStorage.appendJobBlacklist(jobId, wordsToAppend) wrapped in a SQLite transaction with case-insensitive deduplication and whitespace trimming.
    • Added POST /api/jobs/:jobId/blacklist endpoint validating user ownership (doesJobBelongsToUser), job existence, demo mode constraints, and payload terms.
  • Frontend:
    • Added jobsData.addJobBlacklistWord(jobId, word) to store action state.
    • Added context menu listener (onContextMenu) to ListingDescriptionCard that anchors a floating menu item to mouse click coordinates when text is selected.
    • Provides feedback toast notifying whether terms were added or were already present in the job's blacklist.
  • Locales:
    • Added translation keys across all supported locales (en, de, es, fr, it, tr).
  • Tests:
    • Added test/api/jobBlacklist.test.js testing permission enforcement, 404s, input validation, deduplication, and admin modification.
    • Added unit test cases to test/storage/jobStorage.test.js.

Related issue

Closes #496

AI disclosure (required)

Fredy accepts AI assisted contributions, but they have to be declared. An
undeclared AI PR will be closed. Tick exactly one box:

  • ai:none - I wrote this myself. No AI generated code, text or commit messages.
  • ai:assisted - AI helped with parts of it (autocomplete, refactoring, tests, docs). I reviewed and understand every line.
  • ai:generated - AI produced most or all of this PR. I reviewed it, but it is largely machine written.

If you ticked ai:assisted or ai:generated, the three answers below are
mandatory. Keep them on the same line as the label.

Which AI: OMP, Gemini 3.8 Flash

How much: I gave my feature request to AI and let it generate the required changes.

Why: Prototype generation, feel free to adopt/reject

Checklist

  • yarn test:offline passes (or yarn test if the change touches a live provider)
  • yarn lint and yarn format:check pass
  • The change is useful for everybody, not a custom tweak for my own setup
  • I have read and answered the AI disclosure above honestly

@orangecoding orangecoding left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Backend part looks fine. The context menu needs work before this can go in: see the inline comments (shared jobs, error handling, the hijacked native menu, and the filter only seeing the search snippet).

Comment thread ui/src/locales/en.json Resolved
Comment thread lib/services/storage/jobStorage.js Resolved
@orangecoding

Copy link
Copy Markdown
Owner

lgtm. thanks!

@orangecoding
orangecoding merged commit bc38677 into orangecoding:master Oct 31, 2026
3 checks passed
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.

feat: add selected text to job ignore list (blacklist) directly from listing description

2 participants