Skip to content

fix: Protect against large files#1241

Merged
dawsontoth merged 2 commits into
stagefrom
large-file-protections
Jun 11, 2026
Merged

fix: Protect against large files#1241
dawsontoth merged 2 commits into
stagefrom
large-file-protections

Conversation

@dawsontoth

Copy link
Copy Markdown
Contributor
Failed to execute 'postMessage' on 'Worker': Data cannot be cloned, out of memory. DataCloneError: Failed to execute 'postMessage' on 'Worker': Data cannot be cloned, out of memory.

```
Failed to execute 'postMessage' on 'Worker': Data cannot be cloned, out of memory. DataCloneError: Failed to execute 'postMessage' on 'Worker': Data cannot be cloned, out of memory.
```
@dawsontoth dawsontoth requested a review from a team as a code owner June 11, 2026 19:13

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a file size limit (MAX_WORKER_MODEL_CHARS set to 512 KB) for Monaco editor models and language worker registration. Files exceeding this limit are rendered as plaintext and skipped during type intelligence processing to prevent out-of-memory errors and performance degradation in the language worker. Feedback suggests combining consecutive .filter() calls in useApplicationTypeIntelligence.ts into a single filter to optimize performance and readability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/features/instance/applications/hooks/useApplicationTypeIntelligence.ts Outdated
Address PR review: combine the two .filter() passes over the loaded
source files into one so we don't iterate twice or build an intermediate
array.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dawsontoth dawsontoth merged commit bf6e3b3 into stage Jun 11, 2026
2 checks passed
@dawsontoth dawsontoth deleted the large-file-protections branch June 11, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant