Skip to content

fix(server): preserve asset content types when compression is accepted - #235

Merged
lastobelus merged 1 commit into
lastcode/mainfrom
port/upstream/pr-10948-asset-content-types
Sep 9, 2026
Merged

lastobelus merged 1 commit into
lastcode/mainfrom
port/upstream/pr-10948-asset-content-types

Conversation

@lastobelus

@lastobelus lastobelus commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Browser compression strips Content-Type from file assets in Effect rc.112, causing HTML previews to display source and sibling stylesheets to fail. This imports the upstream no-transform workaround for asset responses, including mutable videos, while retaining cache policy and sandbox headers. Assets travel uncompressed; static app bundles and JSON responses are unaffected.

Source: pingdotgg#10948 by Gigioxx, open and unmerged when checked on 2026-09-09. Pinned head: 2f188c075c91ae0aba0547aed9cd774fd9a6d3d6. Fixes the behavior reported in pingdotgg#10935. Neither destination contained the fix at intake, so LastCode adopts it now to restore file previews.

Imported the single commit with cherry-pick -x, preserving authorship and the exact code patch. No conflicts or code adaptations; downstream commit adds carry ownership and pinned upstream provenance. Upstream checks passed, Macroscope approved the pinned head, CodeRabbit reported no actionable findings, and there were zero upstream review threads. Independent local semantic review found no blocking issues.

Validation: 52 focused HTTP and asset-access tests passed; targeted lint, server typecheck, and committed-range whitespace check passed. Quick CI passed at 6a24ec70da8dc1fa5ea4446e417776e43724312a against 811dd22a0b9280dd963bd606c523735e207ab2c7. In the actual LastCode web client at 1440 x 1000 with isolated state, the same HTML preview displayed raw source before the fix and rendered correctly with its sibling CSS afterward. Browser responses preserved HTML/CSS content types and sandbox/nosniff headers after the fix. Matched before/after screenshots are attached.

Implemented upstream with GPT-6 in Codex; imported and verified with GPT-6 Astra in Codex.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T22:11:15.997779Z 6a24ec7 Manual request
ℹ️ 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.

@lastobelus

lastobelus commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner Author

Verified in the LastCode web client, Chromium at 1440 x 1000, using the same HTML file and sibling stylesheet in isolated test state.

Before: the preview shows raw source; HTML and CSS responses are Brotli-compressed with no Content-Type.

Before: HTML preview displays raw source

After: the preview renders the document and green panel from its sibling stylesheet. HTML and CSS retain their correct Content-Type, and sandbox/nosniff headers remain intact.

After: HTML preview renders with its sibling stylesheet

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 90acf3b27b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

(cherry picked from commit 2f188c0)
Carry-Group: upstream-bugfixes
Carry-Fix: pingdotgg#10935
Carry-Upstream: pingdotgg#10948 head 2f188c0
Carry-Observation: Preserve asset MIME types by bypassing broken Effect rc.112 file compression.
@lastobelus
lastobelus force-pushed the port/upstream/pr-10948-asset-content-types branch from 90acf3b to 6a24ec7 Compare September 9, 2026 22:07
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6a24ec70da

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit 015844d into lastcode/main Sep 9, 2026
13 checks passed
@lastobelus
lastobelus deleted the port/upstream/pr-10948-asset-content-types branch September 9, 2026 23:43
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.

2 participants