Repository navigation
DISCO-282: Report why the local preview doesn't load - #462
Open
Philipp Koytek (philippkoytek) wants to merge 3 commits into
Open
Philipp Koytek (philippkoytek) wants to merge 3 commits into
Philipp Koytek (philippkoytek) wants to merge 3 commits into
Conversation
sdk preview now adds the Celonis app reporter as the first element of every proxied HTML page and allows it by its hash in the preview CSP. The reporter tells the Celonis preview that the page loaded, how many inline scripts the preview blocks, and which errors stopped the app, so the Codehub can show the matching hint right away. Co-Authored-By: Claude <noreply@anthropic.com> Includes-AI-Code: true
The reporter is copied from ems-frontend's SANDBOX_APP_REPORTER, which is now built from typed observers. The proxy hashes the copy it injects and adds that hash to script-src, so LOCAL_PREVIEW_HEADERS stays equal to ems-frontend's localPreviewHeaders(). The spec checks the report messages, which are the contract with ems-frontend. Co-Authored-By: Claude <noreply@anthropic.com> Includes-AI-Code: true
Co-Authored-By: Claude <noreply@anthropic.com> Includes-AI-Code: true
|
Philipp Koytek (philippkoytek)
marked this pull request as ready for review
November 11, 2026 17:54
Philipp Koytek (philippkoytek)
requested a review
from a team
as a code owner
November 11, 2026 17:54
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.



Description
content-cli sdk previewnow injects a small reporter script as the first element of every proxied HTML page and adds its SHA-256 hash toscript-src. The app's own inline scripts stay blocked unless--allow-inline-scriptsis passed.The reporter posts to the Celonis preview that the page loaded, how many inline scripts the preview blocks, and which uncaught errors, rejections and CSP violations stopped the app. With that, the Codehub Local preview can show the matching hint right away instead of waiting for the SDK: preview not reachable, inline scripts blocked, or the app's error.
preview-app-reporter.ts: copy ofSANDBOX_APP_REPORTERfrom ems-frontend andinjectAppReporter(). The proxy computes the hash at runtime, soLOCAL_PREVIEW_HEADERSstays equal to ems-frontend'slocalPreviewHeaders().Relevant links
Checklist
localStorageerror, blocked external request)Co-Authored-By: Claude noreply@anthropic.com
Includes-AI-Code: true