Skip to content

fix(action-center): leave what changes by itself out of a page's change, and take a bigger one to pass - #1679

Merged
gkhngyk merged 4 commits into
ansvisor:mainfrom
cihan-gyk:fix/task-check-page-noise
Oct 28, 2026
Merged

gkhngyk merged 4 commits into
ansvisor:mainfrom
cihan-gyk:fix/task-check-page-noise

Conversation

@cihan-gyk

@cihan-gyk cihan-gyk commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

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):

  • a rotated testimonial of about 28 words;
  • a new 50-word review;
  • a "Latest posts" list in a <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_RUNS is now 80.
  • The words a change is measured on (visibleText's new steady option) leave out blocks whose class or id names something that changes by itself:
    • sidebar, promo, announcement, pagination, tags, testimonial(s), latest, recent, trending;
    • with furniture's guard: a block holding more than half the page is the page.
  • This applies only to "changed" and "published". A written task's text is still looked for everywhere, including a testimonial.
  • The editor's page import (page-content.js FURNITURE_WORDS) reads as before.
  • 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 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 puts elementor-widget elementor-widget-text-editor on every content block, and HubSpot uses widget-span widget-type-*. A fully rewritten Elementor page would have stayed "not changed" forever.
  • A pricing page's class="popular" plan card is counted too.
  • Only these word pairs still leave a block out: widget-area, footer-widgets and popular-posts. Real sidebars are already left out by sidebar or <aside>.

Known limits (by design, in the guide):

  • A page with fewer than about 43 counted words, or a new section under 75 words, doesn't pass "changed".
  • A change made in the night between a task's last check and this deploy falls inside the new first look; such tasks are marked done by hand.

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 feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

cd server && npx vitest run src/lib/action-center/task-checks.test.js src/lib/page-content.test.js

The tests cover:

  • the testimonial, review and sidebar cases stay unchanged;
  • a rewritten paragraph passes;
  • Elementor and HubSpot rewrites pass;
  • the popular plan card is read;
  • <aside>, widget-area and popular-posts are still left out;
  • an unversioned first look is replaced.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Full checks were run in one tree with this batch's eight follow-up branches merged (after the review fixes):

  • server format, lint and npm test (no SUPABASE_* env, as in CI): 249 files, 3,365 tests passed;
  • web format, lint (0 errors; 7 warnings already on main), typecheck, 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

cihan-gyk and others added 2 commits October 28, 2026 08:32
…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]>
@mintlify

mintlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 78d0b39.

Approve preview

# Conflicts:
#	server/src/lib/action-center/task-checks.js

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js import in task-checks.js, beside #1616's new checkShoppingDraft import. Keep both. page-content.js itself (#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.
  • 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's widget-span and a pricing page's popular card are read. widget-area, footer-widgets and popular-posts aren'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-sidebar or content-with-sidebar around the main column read.
    • classIdWords is the same split furniture used, now exported. The editor's import is unchanged.
  • The first look's version. A sketch with no v: 2 gets 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.js and page-content.test.js pass (62).
    • With main's task-checks.js and page-content.js, the three new cases fail.
    • The four PRs together on b591947, with the conflicts resolved, pass src/lib/action-center, src/lib/audit and page-content. The only failures read web/ 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:

  1. The call-to-action task (round 36, item 9). improve_cta_path is a "changed" task, and a CTA band is often a promo or announcement block, which this now leaves out. When item 9 is done (checking it by its after text, or making it Manual), this stops mattering. Until then, such a task can't pass on a change to that band.

@gkhngyk
gkhngyk merged commit e9d4021 into ansvisor:main Oct 28, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants