fix(files): fix large file editor performance and selection toolbar placement - #7171
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis follow-up improves large-file editor performance and selection-toolbar placement while bounding XLSX conversion to the displayed preview window.
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.tsx | Adds cached Monaco value tracking and stable editor options to reduce work during local edits while retaining external-content reconciliation. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview-data.ts | Extracts bounded XLSX preview conversion with explicit row and column truncation metadata. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview.tsx | Uses bounded worksheet data and reports whether rows, columns, or both were truncated. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/use-bubble-menu-floating.ts | Collapses whole-document selection geometry to a leading-position anchor while preserving ordinary selection ranges. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor-sync.test.tsx | Covers local-edit fast-path behavior and external-update reconciliation. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview-data.test.ts | Covers row limits, exact-boundary behavior, and extremely wide worksheet ranges. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/use-bubble-menu-floating.test.ts | Covers whole-document anchor collapse and preservation of ordinary text-selection geometry. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[File viewer] --> B{File type}
B -->|Text| C[Monaco editor]
C --> D[Cached editor value]
D --> E[External-content reconciliation]
B -->|XLSX| F[Decode worksheet range]
F --> G[Bound to 1000 rows and 200 columns]
G --> H[Data table preview]
B -->|Markdown| I[ProseMirror selection]
I --> J{Whole-document selection?}
J -->|Yes| K[Collapse anchor to leading position]
J -->|No| L[Preserve selection range]
K --> M[Floating formatting toolbar]
L --> M
Reviews (2): Last reviewed commit: "fix(files): bound wide spreadsheet previ..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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
Testing
Compatibility
No migrations, API changes, or environment changes. Text and Markdown editor limits are unchanged. XLSX files remain fully downloadable; only the in-app preview uses the existing 1,000-row boundary plus a 200-column safety boundary to prevent rendering more than 200,000 cells at once.