Skip to content

fix(progress): list what Paseo's preview blocks in the skill and command help; bump to 1.14.4 - #132

Merged
stevecastaneda merged 6 commits into
mainfrom
fix-live-qa-page-preview-js
Nov 7, 2026
Merged

stevecastaneda merged 6 commits into
mainfrom
fix-live-qa-page-preview-js

Conversation

@stevecastaneda

@stevecastaneda stevecastaneda commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Why

Agents' HTML pages should work when Progress opens them in Paseo's preview. A Live QA checklist page opened blank. Paseo wasn't blocking its JavaScript. The page itself had two bugs:

  1. A stray backslash in if (e.target.id \!== "notes") is a syntax error, so the browser dropped the whole script.
  2. Even with that fixed, the script stopped at its first localStorage call. Paseo 0.14.0 opens previews in an iframe sandbox="allow-scripts" (packages/app/src/file-panels/html-preview.web.tsx), where storage throws.

Agents couldn't know either rule, because the skill only said to keep pages self-contained.

What changes

The skill and the deliverable add help (which the agent tool also shows) now list what the preview blocks and what to do instead:

  • localStorage, sessionStorage, cookies and IndexedDB throw. Keep state in variables.
  • alert, confirm, prompt and window.open do nothing (confirm returns false, prompt returns null). Show messages in the page.
  • A form never submits. Handle input in a script.
  • navigator.clipboard throws. Copy through a selected textarea and document.execCommand("copy").
  • One syntax error stops a whole script. Check each script parses before adding the page.

Bumps to 1.14.4 and adds the changelog entry.

What this PR doesn't do

Earlier commits on this branch added an automatic script check. Comparing it against Chromium and two independent reviews showed it needed an HTML parser dependency, kept diverging from the browser, and could stall Progress's server on large pages. Paseo owns the preview, so Progress only documents it. The last commit removes the check, and the branch's diff against main is text, version and changelog only.

Verification

  • Each gotcha was tested in Chromium 156 in a frame with sandbox="allow-scripts", as Paseo 0.14.0 previews pages: storage APIs and navigator.clipboard.writeText threw (SecurityError, NotAllowedError), alert returned undefined, confirm false, prompt null, window.open null, form.submit() did not navigate, and execCommand("copy") returned true.
  • npm test passes 230 of 230. Typecheck, oxlint and oxfmt are clean. npm run check:install passes with npm 10.9.9 and 12.2.2.

Security review

No release blockers found. Report: ~/.local/state/paseo-plugins/security-review/progress-1.14.4.md (commit 744b409).

…agents the preview has no storage; bump to 1.14.4

A Live QA page opened blank in Paseo's preview. Its script had a stray
backslash (`\!==`), so the browser dropped the whole script. Once that was
fixed, the page would still stop at its first localStorage call, because
the preview's sandboxed frame throws on every storage API.

deliverable add and question --file now compile each classic inline script
in an HTML file with node:vm, without running it, and refuse the page with
the line to fix. The command help and the skill now say the preview has no
localStorage, sessionStorage, cookies or IndexedDB.
…zed script tags

The security review found that a 5 MB page full of unclosed <script> tags made
the matcher quadratic. The scan now looks for each opening tag's closing tag
and stops at the first unclosed one, caps an opening tag at 256 characters,
and counts lines as it goes. The worst 5 MB pages take under a second.
The browser never runs a <script> inside <!-- -->, so a broken one there
doesn't break the page. The check used to refuse it anyway.
…using; bump to 1.15.0

A comparison against Chromium 156, loading 85 pages in a frame sandboxed like
Paseo 0.14.0's preview, showed the pattern matcher refused 17 pages that run
fine (scripts in textarea, template, noscript, SVG, quoted attributes, custom
elements) and missed 10 that break. parse5 tokenizes like the browser, and the
script type now follows the HTML standard's rules. Every parsing case now
matches. page-scripts.test.ts records the browser's verdict for 82 of them.

The three pages still flagged use syntax newer than Node 22's engine (using,
regexp modifiers, duplicate named groups). No check run by Node can avoid
that, so Progress now records the page and prints the line to fix instead of
refusing it.
…rror, and never fail a command over the check

An independent review found three problems, each confirmed against Chromium
156 before fixing:

- A page Progress couldn't read, or code too deeply nested for V8, threw and
  failed the whole command. Any error in the check now means no warning.
- parse5 slows to minutes on deeply nested markup. The check now stops after
  one second, parse and compile together.
- It warned about scripts the browser skips: nomodule, for/event other than
  window/onload, SVG scripts with href, and type values padded with
  non-ASCII whitespace or a padded language attribute. It also missed
  scripts in a declarative shadow root, which do run.

The warning now lists every script that won't parse. page-scripts.test.ts
now records Chromium's verdicts for 107 pages.
…has instead; 1.14.4

The automatic check needed an HTML parser dependency, kept diverging from
Chromium in review, and could stall Progress's server on large pages. Paseo
owns the preview, so Progress now only tells agents what it blocks.

Each gotcha was tested in Chromium in a frame sandboxed the way Paseo 0.14.0
previews pages. Storage APIs and navigator.clipboard throw. alert, confirm,
prompt, window.open and form submits do nothing. One syntax error stops a
whole script.
@stevecastaneda stevecastaneda changed the title fix(progress): refuse HTML pages whose scripts won't parse, and tell agents the preview has no storage; bump to 1.14.4 fix(progress): list what Paseo's preview blocks in the skill and command help; bump to 1.14.4 Nov 7, 2026
@stevecastaneda
stevecastaneda merged commit f54bcdd into main Nov 7, 2026
1 check passed
@stevecastaneda
stevecastaneda deleted the fix-live-qa-page-preview-js branch November 7, 2026 17:07
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.

1 participant