[Production] Release 2026-08-29 - #211
Merged
Merged
Conversation
* Serve the run report as an MCP App so hosts can reuse the web UI. Co-authored-by: Cursor <cursoragent@cursor.com> * Stop the MCP run-report View from looping and refresh expired file URLs. Co-authored-by: Cursor <cursoragent@cursor.com> * Derive the MCP Apps CSP origin synchronously and document the View. The origins came from presigning a throwaway key per bucket. That is async, so `registerResource` snapshotted a possibly-empty cache for `resources/list` while `resources/read` awaited the real list, and a cold instance advertised no origins on its first listing. `s3BucketOrigin` now composes the origin beside the `S3Client`, so one synchronous `runReportUiMeta` serves both paths and they cannot disagree. It also skips the S3 hosts under `LOCAL_S3_MIRROR`, where the mirror already serves bytes from the app's own origin. Expands `developer-docs/mcp-apps.md` into a full implementation reference: host render flow, the three app-only tools, the shared data source, the build, and known limitations. Co-authored-by: Cursor <cursoragent@cursor.com> * Read report file bytes from S3 in the view, not through the server. `report_view_table` and `report_view_artifact` streamed CSVs and JSON artifacts into the function, parsed them, and returned rows. The web app has always read the same files straight from S3 through the download redirect, so one `report_view_file_url` now replaces both and returns a signed URL that the view fetches and parses in the iframe. That removes the 50,000-row scan cap, the `truncated` flag three of four callers discarded, and the double serialization into `structuredContent` and pretty-printed text. Resolving an uncached file id drops from four tool calls to one. Tools go from 35 to 34. The content security policy listed only the raw and archives buckets, but processed artifacts sit in their own bucket and are most of what the report renders, so images, video, and CSVs would have been blocked in production. It now lists raw plus processed through a new `S3_PROCESSED_BUCKET`, drops archives, and repeats those origins in `connectDomains`. Both buckets move to a `*` GET CORS rule because the sandbox origin is chosen by the host and cannot be allowlisted ahead of time. Also trims the comment blocks in `template.yaml` to two lines each. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix local CORS and layout so the run-report View can show full-width plate maps. Co-authored-by: Cursor <cursoragent@cursor.com> * Cancel superseded report-item requests and warn on an unset bucket. `fetchReportItems` now takes an optional `AbortSignal`. The controllers in `useReportItems` were only gating `setState`, so a debounced search or a held-down paging button left every superseded request running to completion. The REST source hands the signal to `fetch`; the View hands it to `callServerTool`, which tells the host to drop the in-flight `tools/call`. The post-resolve `aborted` checks stay, because the signal is optional and an implementation may ignore it. `clearSearch` built a controller that nothing ever aborted, so its guards could never fire and unmounting mid-request still wrote to dead state. It now shares the controller `extend` uses: both load one window for the current query, so the later action cancels the earlier one. An unset `S3_RAW_DATA_BUCKET` or `S3_PROCESSED_BUCKET` silently produced a content security policy that blocks that bucket's files, and the only symptom was blank images in someone else's chat client. It now warns once per process, naming the variable. It deliberately does not throw: `mcp-handler` rebuilds the server on every request, so throwing would fail every tool rather than just the run report View. Also folds in comment edits across the View, CSP, and infra files that were already sitting in the working tree. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
No description provided.