Repository navigation
fix(content): say both what to check in the feed and which product links to change when both rules are open - #1654
Merged
Conversation
…nks to change when both rules are open Follow-up from ansvisor#1610 (item 3). With "Matches your product feed" and the shopping links rule both open, Run Agent's note (and its toast) gave only the feed's message, so the links to products that no longer sell went unmentioned. notForAgentMessage now answers notForAgentFeedShopping then, one message that says both; the extra H1s' message still comes first. A test checks that each of its answers has a message in the editor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 28, 2026
7 of 12 tasks
gkhngyk
approved these changes
Oct 28, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
What I checked:
- Own change. 6f354b2 on main (3f6a4d4):
rules.ts, its test and oneen.jsonkey. It merges cleanly on main and with #1653, #1662, #1663 and #1664.en.jsonmerges on its own with #1662's change two lines below. - The answers.
notForAgentMessagestill gives the H1 message first, the feed message with onlyfeedMatchopen, and the shopping message with onlyshopLinksLiveopen. With both open it now givesnotForAgentFeedShopping, which says both what to check in the feed and which links to change. No other rule inNOT_FOR_AGENTis left without a message. - Tests.
rules.test.tspasses on this head. With main'srules.tsput back, both the changed test and the new one fail. With main'sen.jsonput back, the new "has a message for each answer" test fails, so a missing key is caught too. - With #1662 merged as well, the four agent messages all describe a product that doesn't sell as "out of stock", and the rule is named "No out-of-stock or refused product linked", so they read the same way.
Before the API deploy: web only. It works on merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up from #1610 (item 3). The Content Editor's Run Agent note and its toast now cover both open rules when the page has both of these:
Before, the note only gave the feed rule's message, so the product links to change went unmentioned.
notForAgentMessagenow returns a new message,notForAgentFeedShopping, that says both:The message about extra H1s still comes first.
A new test checks that every answer
notForAgentMessagecan give has a message inen.json.(The commit message calls the feed rule "Matches your product feed"; its real name is "Price, GTIN and stock match the feed".)
Where people see it: Content Editor › Rules tab, the note above Run Agent and the toast after it, on a shop draft with both rules open.
Related issue
Follow-up from #1610's review.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd web && npx vitest run src/lib/content/rules.test.tsChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Full checks were run in one tree with this batch's six follow-up branches merged:
🤖 Generated with Claude Code