Repository navigation
fix(files): share one served-bytes predicate between the serve route and large downloads - #9548
Conversation
…and large downloads
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryShares
No new actionable issues were found. Tests were not run during this review.
|
There was a problem hiding this comment.
All reported issues were addressed across 20 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…tate the stream helper's caller precondition
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
.html/text/x-sim-pagefiles (buffered), while the client treated them as streamable and handed large ones to the browser's download manager after its probeservesStoredBytes(contentType, fileName)(not a page, notneedsRenderedArtifact), and route both the serve route'sservesStoredObjectgate andtriggerFileDownloadthrough it, so the two can't drift — a page or generated document now always uses the in-page fetch path, where a render/compile rejection surfaces as an errorSIM_PAGE_CONTENT_TYPEinto a dependency-freepage-content-typemodule so client code can recognize a page without loading the page compiler (js-yaml, marked, schemas built at import); its importers now read it from therestreamAuthorizedWorkspaceFileType of Change
Testing
lib/uploads/client/download.test.ts: largetext/x-sim-pageand.htmlrecords stay on the in-page fetch path (both red on staging before the fix)check:api-validation:strict,check:comment-hygiene,check:source-conventions,check:client-boundary,check:test-patterns,check:file-names,check:boundaries,check:utils, block registry check, lintbun run test,check:auditsandtype-checkleft to CIChecklist
test-auditauthoring gate)🤖 Generated with Claude Code