Repository navigation
fix(files): bound text preview reads and cancel stalled responses - #785
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to Text previews are bounded and cancellable, and the browser checks are wired into CI. No identified issue needs resolution before merge. Pre-merge checks |
|
…exact-budget file whole A 206 with a known total now shows the specific "Showing the first 256 KB of 1 MB." note; the generic note is left for a 200 that ignored Range and was cut. A 200 that ends exactly at the byte budget is no longer reported as truncated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # CHANGELOG.md
…script Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # CHANGELOG.md
…TS.md edit Co-Authored-By: Claude Opus 5.5 <[email protected]>
Change
A text-file response that ignores Range could make the viewer read its entire body, and an HTTP error body was displayed as file contents. The viewer now enforces a 256 KiB UTF-8 byte budget locally, rejects error bodies, and aborts stalled or closed previews. Headers and body share a five-second deadline. Partial previews keep their download link and show a translated note.
This is a standalone client-side fix from main: plain text and existing media/server contracts are preserved. Includes ko/ja/zh, changelog, documentation and registered/typechecked synthetic browser coverage.
Validation
Synthetic mobile screenshot.