Skip to content

Conversation

@ben-fornefeld
Copy link
Member

@ben-fornefeld ben-fornefeld commented Nov 27, 2025

Note

Adds a 15MB max preview limit with pre-read size checks, introduces explicit unreadable states (file_type, too_large), and updates viewer messaging accordingly.

  • Sandbox Inspect:
    • Preview size limit: Introduces MAX_VIEWABLE_FILE_SIZE_BYTES (15MB) and pre-checks file size via files.getInfo before reading. Oversized files set unreadable with reason: 'too_large' and include size.
    • File content states: Refactors to explicit types: TextFileContentState, ImageFileContentState, UnreadableFileTypeContentState, UnreadableTooLargeContentState.
    • Error mapping: On read errors and non-text/image blobs, sets unreadable with reason: 'file_type'.
  • Viewer UI:
    • Renders size-specific message for oversized files and generic message for unreadable type; wires new state variants.
  • Utils:
    • determineFileContentState now returns unreadable with reason: 'file_type' on decode failures.

Written by Cursor Bugbot for commit 254300b. This will update automatically on new commits. Configure here.

@ben-fornefeld ben-fornefeld added bug Something isn't working improvement Improvements in-code labels Nov 27, 2025
@linear
Copy link

linear bot commented Nov 27, 2025

@vercel
Copy link

vercel bot commented Nov 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web Ready Ready Preview Comment Nov 27, 2025 2:54pm
web-juliett Ready Ready Preview Comment Nov 27, 2025 2:54pm

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copy link
Member

@jakubno jakubno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏻

@ben-fornefeld ben-fornefeld merged commit 7913cd5 into main Nov 27, 2025
6 checks passed
@ben-fornefeld ben-fornefeld deleted the investigate-large-readable-file-crashes-sandbox-inspect-eng-3333 branch November 27, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working improvement Improvements in-code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants