feat: add verified coupon code suggested action - #2719
Conversation
|
@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
this is good start but we need to expand it with all e-commerce sites that https://www.coupons.com/ etc. list. because these would be the sites that offer coupons most of the time.Even create a js or python script which will generate that list under scripts/ for us so it's automated. also would be nice if the list could be automatically updated at every launch of the sidebar. According to chatgpt they are: RetailMeNot — probably the closest direct analogue; huge promo-code database.
Source: https://chatgpt.com/share/6a787742-3c20-83eb-b913-e825cc0ef9de |
|
Thanks — I agree that the original hand-maintained list was too narrow, and I implemented the directory-generated approach in The new I deliberately did not fetch or replace the list on every sidebar launch. That would make sidebar startup depend on third-party availability and create a new runtime data/privacy path tied to the user's current merchant. Shipping the reviewed snapshot keeps the extension deterministic and offline; maintainers can refresh it explicitly before a release (and a future scheduled bot PR could automate that reviewable step). I also did not copy the proposed open-ended multi-site crawler as-is: several proposed sources currently return Cloudflare challenges to automated clients, and the recursive fallback has no default page bound. The fixed CouponFollow all-stores indexes provide a reproducible first source without those failure modes, while the generator remains small enough to extend with another stable public index later. Validation after the change: 1,573 core tests passed (one pre-existing changelog/version mismatch), toolbar 33/33, security 60/60, CI 14 scenarios plus cloud capture, deterministic 3,767-domain regeneration, Chrome/Firefox parity, and successful Chrome/Edge/Firefox package builds. The two known selection-dialog fixture failures and WebMCP teardown timeout remain unchanged and are documented in the updated PR body. |
|
I did a deeper pass across Honey, Capital One Shopping, Edge, SimplyCodes, and the open-source Caramel implementation. I agree with broadening coverage, and I think the safest next step is a small follow-up PR focused on data quality and trigger precision rather than adding more runtime behavior to this PR. One important distinction is that directory membership does not mean a merchant currently has working codes. For example, the current SimplyCodes store directory lists 645,414 stores, but 51,521 with verified codes right now (about 8%). I therefore propose treating directory membership as a useful prior, not as a sufficient trigger by itself. Proposed scope for the follow-up:
This should improve long-tail recall without turning every historical directory listing into a potentially noisy recommendation, while retaining the deterministic and offline behavior of the current implementation. I would keep transactional coupon application/restoration and stateful synthetic checkout fixtures as separate later contributions once we agree on the trigger and data model. Would you be comfortable with this scope as the next PR after #2719, or would you prefer PSL/provenance and tiered triggering to be split into two smaller PRs? I will wait for your feedback before starting it. |
Summary
Motivation
Issue #2707 asks for a one-click way to find active coupon codes, especially at checkout. A useful slice needs to distinguish a candidate found elsewhere from a discount the merchant actually accepts, while avoiding accidental checkout changes.
The first revision used a conservative hand-maintained domain list. Maintainer feedback correctly identified that this would not scale to the merchants represented by coupon directories, so the list is now generated by an explicit maintenance command instead.
Design
npm run update:coupon-domainsreads CouponFollow's 27 bounded numeric/A-Z merchant indexes with concurrency, timeout, response-size, host, route, and domain validation. It fails closed if any index yields no merchants.--checkverifies reproducibility without modifying files.Setplus host-label suffix traversal, so subdomains are supported without scanning the complete list.get_accessibility_treeas the immediate tool. The existing permission gate and untrusted-page-content boundary remain unchanged for later actions.Testing
npm run update:coupon-domains -- --check— passed; 3,767 domains, no changes.node test/run.js— 1,573 passed; the sole failure is the pre-existing changelog/package mismatch (27.1.0vs27.1.5).npm run test:toolbar-guard— 33/33 passed.npm run test:security— 60/60 passed, including Chrome/Firefox prompt-injection parity.npm run test:ci— 14 scenarios validated; cloud capture test passed.npm run test:fixtures— 143/145 passed. The same two selection-dialog failures reproduce independently of this source seam and were already documented against the clean base revision.WEBMCP_DEBUG=1 WEBMCP_TIMEOUT_MS=60000 npm run test:webmcp— protocol and extension functional assertions pass, then teardown times out; the identical timeout was already reproduced on the clean base revision.node --checkon the generator and all changed runtime/data modules, plusgit diff --check— passed.npm run build:zip— Chrome, Edge, and Firefox archives built successfully; each containssrc/ui/coupon-domains.jsandsrc/ui/recommended-actions.js.Compatibility and risks
Scope
Closes #2707