Repository navigation
fix(content): leave rules held by quoted passages to the person, so the agent and Next step move on - #1516
Merged
Conversation
…adings' answers and what the last rewrite came to, and offer a Length it can reach Co-Authored-By: Claude Opus 5.5 <[email protected]>
… for, keep its numbers on the row (00285), and read the floor's sections closer (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and count the last rewrite only within its Length's band and the same kept text (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… one more pass Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er to rewrite the cited passages too when they hold the Length out of reach Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e back, release an unused hold, keep a cited-too miss as evidence, and offer it only when cited passages hold the Length (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he agent and Next step move on, and count open rules as the Rules tab does Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es read the page, keep the Length's own words, and wait for the passages before dropping skips (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 of 12 tasks
gkhngyk
approved these changes
Oct 26, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
What I checked:
- Stack. The PR's own change is a369990 and 109d174, on #1515's head (65515ec), with no merge commits. With the stack, it merges cleanly on main. It's web only, with no route, migration or server change of its own, so nothing here waits for the API deploy. The Fix request keeps its shape; it just lists fewer rules.
- Sentence, held.
htmlWithoutLockedtakes out the blocks whose words make a key that's still locked. Unlocked passages stay in.- The editor reads what's left with the rule's own
readPage+checkRule. So Sentence is held only when every long sentence the rule counts is in a passage the agent must keep word for word. - When one long sentence is outside, the rule stays the agent's. It becomes held once that sentence is fixed. Edit anyway gives a passage back to the agent.
- Keys are made the plugin's way (
passageKeyof the block's words). A block whose HTML text reads differently is simply not held, which is how it worked before.
- Length, held only when
lengthOutOfReachsays so, so the agent still gets any Length a rewrite can reach. - Where held rules leave the agent's work.
- The Fix request (
fixRules, with or withoutonly). - The card's Run Agent and the Rules tab's Run Agent.
rewriteAdvice's open count.rulesForNext.- The order of messages is the same in the toast, the card and the Rules tab: One H1 or the feed first, then held. The Sentence row's note shows only while Sentence is held and not met.
- The Fix request (
- Skips.
nextReadwaits forcitedRead.loadCitedsets that infinally, whether the read worked, failed or found nothing quoted. It starts true for a page without a source URL, so it can't hang. A skip made at the old set of rules is dropped once, when the held rule leavesopenRules. - Cost. The held read parses the page only while Sentence is open and a passage is locked. It reads
pageHtml, which is already debounced, and is memoized. - Copy. The new
en.jsonkeys don't clash. Every test that clicks Skip now clicks "Skip this step".
Low, follow-up:
- Next step's Fix reason (
_next-step.tsx:101-105,_draft-editor.tsx:2865).othersis every open rule lessopenRules, so a Length that's only a little off counts as "yours to decide in the Rules tab".- Fix open rules sends that Length, though:
fixRules(_draft-editor.tsx:2135-2139) asks the agent for everyforAgentrule, Length included. The reason can then say "1 rule is still open for the agent… 1 more is yours to decide" while the run asks the agent for both. - Count as
othersonly the rules the run leaves out (notForAgentandheld) and a rule that'snotSet(Who it's for).
- Both rules held (
rules.ts:822-823,en.json:5255). With Sentence and Length both held,heldMessagesays only that what's left is kept by AI citations. The Length can be out of reach because of the headings and their answers, or the last rewrite, not the citations. When both are held, name both, e.g. add "…, and the Length is out of a rewrite's reach."
7 of 12 tasks
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
Stacked on #1515 (and so on #1514). The PR's own changes are its last two commits.
In the live editor test (2026-10-25), 3 of the 4 sentences over 150 characters sat inside passages AI answers quote. Those passages are locked: the agent keeps them word for word, so no Fix run could close the Sentence rule. The Length was out of a rewrite's reach too. The agent kept being offered for both, Next step never left Fix / Rewrite ("bi adım sonraya geçemiyorum"), and Next step's "N rules are still open" didn't match the Rules tab's "N rules are not met".
Rules held by what the page keeps (
rules.tsopenRulesForAgent(rules, only, held), which now returnsheldbesideforAgentandnotForAgent):htmlWithoutLocked) with the rule's own reader (readPage+checkRule), so it counts exactly the sentences the rule counts.Where held rules leave the agent's work:
rewriteAdvice's open count;rulesForNext).So when only held rules are left, Fix isn't offered and Next step moves on to proof / check.
What the person sees:
Next step doesn't drop a skip until the quoted passages are read (
nextReadwaits forcitedRead). Before that, the Sentence rule would read as the agent's, and a skip would be lost on every opening.Related issue
Editor test findings 2026-10-25 (group A, part 1).
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
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): 0 errors; the 6 warnings are in files this PR doesn't touchyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Web:
yarn testandyarn build. A pre-push review ran; its findings are the last commit. The editor test checks that a held Sentence rule isn't sent to Fix. The browser check is in the next batched local test session.🤖 Generated with Claude Code