Bound local Code editor file reads - #15835
Open
warp-agent-staging[bot] wants to merge 4 commits into
Open
Conversation
ticket_source=linear ticket_id=APP-4844
Contributor
Author
|
This PR was generated with Warp. Comment |
ticket_source=linear ticket_id=APP-4844
chenchangzhong
pushed a commit
to chenchangzhong/zap
that referenced
this pull request
Sep 6, 2026
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.


Description
Bounds local Code editor reads to 100 MiB before full string or editor-buffer materialization, preventing oversized files from amplifying memory use across Code Editor and Code Review. The guard covers initial opens, direct rereads, and watcher reloads; exact-limit files retain existing behavior, while oversized loads show a limit-aware error instead of an empty editor. Subscribed oversized files remain watched and automatically populate the editor after shrinking below the limit.
Linked Issue
APP-4844
Testing
./script/format --checkcargo nextest run -p warp_files --no-fail-fast— 39 passedcargo nextest run -p warp -E 'test(/file_load_error_message|oversized_content_is_rejected_before_initial_and_fallback_population/)' --no-fail-fast— 3 passedcargo test -p warp --lib code_review::code_review_view::tests --no-fail-fast— 18 passedcargo build -p warp --libscript/presubmit— passedcargo clippy --workspace --all-targets --all-features --tests -- -D warnings— blocked by existing incompatible feature-gated execution-profile tests and unrelated dead-code errors;script/presubmitexplicitly omits--all-features./script/run(computer-use verification was closed for this implementation)Agent Mode
CHANGELOG-BUG-FIX: Prevented oversized local files from exhausting memory when opened in Code Editor or Code Review.
ticket_source=linear
ticket_id=APP-4844