Repository navigation
fix(action-center): leave what changes by itself out of a page's change, and take a bigger one to pass - #1679
Merged
Conversation
…ks that change by themselves Follow-up A from ansvisor#1565's round 37. On pages of 60–400 words, a rotated testimonial of about 28 words, a new 50-word review, and a "Latest posts" list in a <div class="sidebar"> each passed "changed since its first look": 41–66 changed runs, over MIN_CHANGED_RUNS (40). A rewritten 60-word paragraph is 117 or more, a 150-word FAQ 146. - MIN_CHANGED_RUNS is 80. - The words a change is measured on (visibleText's new `steady`) leave out blocks whose class or id names what changes by itself: sidebar, widget(s), promo, announcement, pagination, tags, testimonial(s), latest, recent, popular, trending, with furniture's guard (a block holding more than half the page is the page). Only for "changed" and "published": a written task's text is still looked for everywhere, a testimonial included. The words are task-checks.js's own, so the editor's page import (page-content.js FURNITURE_WORDS) reads as before; page-content.js only exports classIdWords. - A sketch now carries SKETCH_VERSION (2). A first look kept before this (no version) gets a new first look instead of a comparison, so a sidebar left out now never reads as the change. Such a task's first look restarts once. Tests: each of the three blocks above leaves the page unchanged; a rewritten 60-word paragraph passes; a task's text in a testimonial is found; an unversioned first look is replaced. With the old threshold and no blocks left out, the first fails. The guide's "Optimizing, refreshing" line says so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… plan in the "changed" check "widget", "widgets" and "popular" in a block's class or id left it out of the words a change is measured on. Elementor puts elementor-widget on each of the page's blocks, HubSpot widget-span: a page rewritten in full read "not_changed" for good. A pricing page's class="popular" plan was left out too. - They are no longer such words alone. Two words one after the other still are: a theme's widget area (widget-area, Divi's et_pb_widget_area), footer widgets, popular posts or articles. A sidebar is left out as before (its "sidebar", or <aside>). Tests: an Elementor and a HubSpot page rewritten in their widgets pass (both read "not_changed" before); a class="popular" plan's text is read, an <aside class="sidebar">, a widget-area and a popular-posts block aren't. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
9 of 12 tasks
# Conflicts: # server/src/lib/action-center/task-checks.js
8 of 12 tasks
gkhngyk
approved these changes
Oct 28, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with follow-ups.
What I checked:
- The change. d2e779c and 9ed0a9c on 3f6a4d4. This is round 37's follow-up A.
- Merge.
- On b591947 it conflicts in one line: the
page-content.jsimport intask-checks.js, beside #1616's newcheckShoppingDraftimport. Keep both.page-content.jsitself (#1700 changed it since) merges clean. - With #1682 it conflicts in the test file's import list, as the description says. It merges clean with #1680 and #1681.
- On b591947 it conflicts in one line: the
- What's left out.
- Only the "changed" and "published" reads use
steady(task-checks.js:445-453). The page's word count, the written task's text and the structured data and crawler reads are as before. - The words are matched whole, from the class and id split as furniture splits them. So
elementor-widget, HubSpot'swidget-spanand a pricing page'spopularcard are read.widget-area,footer-widgetsandpopular-postsaren't. - A left-out block that holds over half the page is still read, the same guard as furniture. That keeps a wrapper like
has-sidebarorcontent-with-sidebararound the main column read. classIdWordsis the same split furniture used, now exported. The editor's import is unchanged.
- Only the "changed" and "published" reads use
- The first look's version. A sketch with no
v: 2gets a new first look instead of a comparison (:331-341). If no deployed API has run the page checks yet, no first look is stored, so nothing restarts. - Speed. The steady read is a second linear pass. On 512 KB pages (plain paragraphs, thousands of classed blocks, nested sidebars, a 400 KB class or id), the "changed" check took 0.1–0.6 s, up to about 3× the time before this PR on the same page.
- Tests.
task-checks.test.jsandpage-content.test.jspass (62).- With main's
task-checks.jsandpage-content.js, the three new cases fail. - The four PRs together on b591947, with the conflicts resolved, pass
src/lib/action-center,src/lib/auditandpage-content. The only failures readweb/files, which my scratch layout doesn't have, and they fail on main's tree the same way.
- Before the API deploy. Server and docs only. Nothing changes until the API is deployed.
Follow-ups:
- The call-to-action task (round 36, item 9).
improve_cta_pathis a "changed" task, and a CTA band is often apromoorannouncementblock, which this now leaves out. When item 9 is done (checking it by itsaftertext, or making it Manual), this stops mattering. Until then, such a task can't pass on a change to that band.
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 A from #1565's round 37: an Action Center page check no longer counts the parts of a page that change by themselves as the task's change.
On pages of 60–400 words, each of these passed "changed since its first look", with 41–66 changed runs, over
MIN_CHANGED_RUNS(40):<div class="sidebar">.For comparison, a rewritten 60-word paragraph is 117 changed runs or more, and a 150-word FAQ is 146.
MIN_CHANGED_RUNSis now 80.visibleText's newsteadyoption) leave out blocks whose class or id names something that changes by itself:page-content.jsFURNITURE_WORDS) reads as before.SKETCH_VERSION(2). A first look kept before this (no version) gets a new first look instead of a comparison, so a sidebar that's now left out never reads as the change. Such a task's first look restarts once.Pre-push review fix (9ed0a9c): "widget", "widgets" and "popular" on their own no longer leave a block out.
elementor-widget elementor-widget-text-editoron every content block, and HubSpot useswidget-span widget-type-*. A fully rewritten Elementor page would have stayed "not changed" forever.class="popular"plan card is counted too.widget-area,footer-widgetsandpopular-posts. Real sidebars are already left out bysidebaror<aside>.Known limits (by design, in the guide):
Merge note: this PR and #1682 both add a name to
task-checks.test.js' import list, and both edit the guide's Automatic paragraph. Whichever merges second keeps both.Where people see it: Action Center tasks checked as "changed" or "published", and how soon they close.
Related issue
Follow-up from #1565 (round 37, item A).
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 server && npx vitest run src/lib/action-center/task-checks.test.js src/lib/page-content.test.jsThe tests cover:
<aside>,widget-areaandpopular-postsare still left out;Checklist
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 eight follow-up branches merged (after the review fixes):
npm test(noSUPABASE_*env, as in CI): 249 files, 3,365 tests passed;vitest(445 files, 4,353 tests) and build: all pass.Browser check (local, 1024 px): Prompts › Topics › Add Topic stops at 100 characters; the Action Center drawer opens without errors, and Check now doesn't show on tasks the API doesn't check.
A pre-push review was run on all eight branches of this batch, and its before-merge findings are fixed.
🤖 Generated with Claude Code