Skip to content

pm-stack: make the fragment watchdog script valid JavaScript - #11423

Closed
dezren39 wants to merge 1 commit into
mainfrom
fix/frag-watchdog-js
Closed

dezren39 wants to merge 1 commit into
mainfrom
fix/frag-watchdog-js

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Fixes #11410

Before:
Every dashboard shell page embedded a fragment watchdog whose notice line had doubled quotes inside a JavaScript string. Browsers could not parse the script at all, so a fragment that failed to load stayed on its loading skeleton with no way out.

After:
The watchdog parses and runs. After 10 seconds a stalled skeleton becomes the notice with a working "load the full page" link to ?full=1.

How:
The link is built with createElement and textContent instead of an innerHTML string, which also keeps location.pathname out of HTML parsing. A new test extracts the emitted script, runs it against a stub DOM, and checks the notice and link. It fails on the old code with SyntaxError: Unexpected string literal.

Testing:
bun test test/frag-watchdog-1503.test.ts: 5 pass. Full aggregator suite: same 35 failures as main before and after this change (none in touched files).


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The recovery notice used doubled quotes inside a JS string, so browsers
could not parse the watchdog and a failed fragment stayed on its
skeleton forever. Build the link with DOM APIs instead, and add a test
that parses and runs the emitted script.

Fixes #11410

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 17, 2026 22:14
@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 22:14
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1b31b6fe-6a1a-4412-9316-45d199aca0ed
Commits

Reviewing files that changed from the base of the PR and between 1e681d2 and 0f32873.

Files selected for processing: 2

  • pm-stack/aggregator/src/render.ts
  • pm-stack/aggregator/test/frag-watchdog-1503.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T22:16:14.515271Z 0f32873 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39 dezren39 closed this Nov 17, 2026
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.

fix(pm-stack): fragment watchdog emits invalid JavaScript in recovery notice

2 participants