Repository navigation
fix(progress): list what Paseo's preview blocks in the skill and command help; bump to 1.14.4 - #132
Merged
Merged
Conversation
…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.
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.
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:
if (e.target.id \!== "notes")is a syntax error, so the browser dropped the whole script.localStoragecall. Paseo 0.14.0 opens previews in aniframe 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 addhelp (which the agent tool also shows) now list what the preview blocks and what to do instead:alert,confirm,promptandwindow.opendo nothing (confirmreturns false,promptreturns null). Show messages in the page.navigator.clipboardthrows. Copy through a selected textarea anddocument.execCommand("copy").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
mainis text, version and changelog only.Verification
sandbox="allow-scripts", as Paseo 0.14.0 previews pages: storage APIs andnavigator.clipboard.writeTextthrew (SecurityError,NotAllowedError),alertreturned undefined,confirmfalse,promptnull,window.opennull,form.submit()did not navigate, andexecCommand("copy")returned true.npm testpasses 230 of 230. Typecheck, oxlint and oxfmt are clean.npm run check:installpasses 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).