Skip to content

Conversation

@reidbarber
Copy link
Member

@reidbarber reidbarber commented Jan 13, 2026

This is difficult to consistently reproduce, but occasionally in the S2 docs build, an extra </script></body></html> is getting left in the HTML output.

Example in production at: https://react-aria.adobe.com/examples/photos

(View page source and search </script></body></html>)

This seems like it might be due to the trailer being split across chunk boundaries in rsc-html-stream. This PR applies the fix from devongovett/rsc-html-stream#12 as a patch and adds a script that will fail the docs build if it detects the issue again.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@reidbarber reidbarber changed the title DNM: docs: fix early HTML end tags in build docs: (DNM) fix early HTML end tags in build Jan 13, 2026
@rspbot
Copy link

rspbot commented Jan 13, 2026

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

why is this actually happening? is it a bug in rsc-html-stream? or does that just make the existing issue worse?

@rspbot
Copy link

rspbot commented Jan 14, 2026

@rspbot
Copy link

rspbot commented Jan 14, 2026

@rspbot
Copy link

rspbot commented Jan 14, 2026

@reidbarber reidbarber changed the title docs: (DNM) fix early HTML end tags in build docs: fix extra HTML end tags in docs build Jan 14, 2026
Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

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

Let's merge this with the verification script for a few days and see if it catches anything else. If not, we'll update rsc-html-stream with this patch.

@reidbarber reidbarber added this pull request to the merge queue Jan 14, 2026
Merged via the queue into main with commit bed17e4 Jan 14, 2026
35 checks passed
@reidbarber reidbarber deleted the fix-html-escape-build-issue branch January 14, 2026 22:25
@reidbarber
Copy link
Member Author

Looks like that didn't fix it: https://app.circleci.com/pipelines/github/adobe/react-spectrum/31023/workflows/21159712-3276-4bc4-8cae-6bfd1c7bcb2a/jobs/568803

We can keep the script around until we do.

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.

5 participants