Skip to content

Bound local Code editor file reads - #15835

Open
warp-agent-staging[bot] wants to merge 4 commits into
masterfrom
factory/app-4844-bound-code-editor-read
Open

Bound local Code editor file reads#15835
warp-agent-staging[bot] wants to merge 4 commits into
masterfrom
factory/app-4844-bound-code-editor-read

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

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 --check
  • cargo nextest run -p warp_files --no-fail-fast — 39 passed
  • cargo nextest run -p warp -E 'test(/file_load_error_message|oversized_content_is_rejected_before_initial_and_fallback_population/)' --no-fail-fast — 3 passed
  • cargo test -p warp --lib code_review::code_review_view::tests --no-fail-fast — 18 passed
  • cargo build -p warp --lib
  • Presubmit clippy matrix from script/presubmit — passed
  • cargo clippy --workspace --all-targets --all-features --tests -- -D warnings — blocked by existing incompatible feature-gated execution-profile tests and unrelated dead-code errors; script/presubmit explicitly omits --all-features
  • I have manually tested my changes locally with ./script/run (computer-use verification was closed for this implementation)

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI 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

ticket_source=linear
ticket_id=APP-4844
@cla-bot cla-bot Bot added the cla-signed label Sep 5, 2026
@warp-agent-staging warp-agent-staging Bot added the area:performance:memory Memory usage, allocation, leaks, and memory-bound performance. label Sep 5, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

View run View conversation

@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review September 5, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:performance:memory Memory usage, allocation, leaks, and memory-bound performance. cla-signed factory:wilson

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants