Repository navigation
fix: preserve pending content opportunities - #63
Conversation
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
|
Clean fix — exactly what the issue asked for. Merging shortly. Nice catch on the intra-batch dedupe inside the filter ( Welcome to Ansvisor — looking forward to the next one. |
The Generate button deleted every open opportunity a brand had before inserting three new ones, so pressing it threw away the list someone was working through. #63 moved the nightly generator from delete-and- replace to keep-and-append, but the button path was never updated. The button now adds to the open list and follows the same rules as the nightly run: prompts at the per-prompt cap are skipped, the rest list their open titles as "Already suggested", and exact repeats are dropped. Both generators share the open-opportunity read (lib/open-opportunities) and the prompt-data helpers and rule (opportunity-limits), so the two paths cannot drift apart again.
Summary
newcontent opportunities before each generationprompt_id+ normalized titleCloses #62
Verification
node --check server/src/lib/opportunity-generator.jsgit diff --check