fix(ui): close paste admission edge cases - #7156
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThe PR closes paste-admission edge cases by projecting exact text-editor and rich-Markdown results while preserving structured clipboard references.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor-paste.ts | Projects retained and inserted UTF-8 bytes across Monaco selections, including full and distributed multi-cursor modes. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx | Integrates exact projected-result admission with Monaco’s current model selections and paste mode. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/paste-admission.ts | Adds early clipboard bounds and canonical Markdown transaction validation. |
| apps/sim/app/_shell/paste-admission-guard.tsx | Scopes structured-reference and image exemptions while delegating exact text-result checks to specialized editors. |
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/prompt-editor.tsx | Retains enhanced rendering for long prompts containing skill-chip triggers and opts into structured clipboard references. |
| packages/utils/src/paste.ts | Aligns the text-editor paste ceiling with the existing 50 MiB workspace-file content boundary. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
P[Clipboard paste] --> G[Shell admission guard]
G -->|Structured prompt reference| R[Prompt reference handler]
G -->|Image file for opted-in editor| I[Image handler]
G -->|Monaco text| M[Project multi-cursor result]
G -->|Rich Markdown| H[Check text and HTML payloads]
M --> B{Within 50 MiB result boundary?}
H --> C[Canonical Markdown transaction]
C --> D{Within rich-document boundary?}
B -->|Yes| A[Accept paste]
B -->|No| X[Reject and warn]
D -->|Yes| A
D -->|No| X
Reviews (5): Last reviewed commit: "fix(ui): defer exact Monaco paste admiss..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 13 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Collaborator
Author
Collaborator
Author
Collaborator
Author
Collaborator
Author
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.
Summary
Type of Change
Testing
Checklist