Skip to content

fix(knowledge): scroll the whole chunk editor area instead of the textarea - #6300

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/chunk-editor-scroll-area
Aug 5, 2026
Merged

fix(knowledge): scroll the whole chunk editor area instead of the textarea#6300
waleedlatif1 merged 1 commit into
stagingfrom
fix/chunk-editor-scroll-area

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Move the scrollbar out of the centered text column — the whole editor area now scrolls, matching the rich markdown editor
  • Sync the textarea height to its content so the container owns the only scrollbar, with a ResizeObserver so a width change that re-wraps lines can't clip the tail
  • Preserve scroll offset across the measure, so typing below the fold no longer snaps the view to the top
  • Reserve a stable scrollbar gutter so the centered column doesn't shift when the scrollbar appears
  • Keep the tokenizer bar from being crushed at short viewport heights

Type of Change

  • Bug fix

Testing

Typecheck and repo lint pass. Not yet verified in a running browser.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 5, 2026 11:09pm

Request Review

@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only scrolling and layout in the chunk editor; no auth, data, or API changes.

Overview
The knowledge chunk editor now scrolls like the rich markdown editor: one scrollbar on the outer editor area instead of inside the centered textarea or tokenizer view.

Scrolling and layout: The scroll container uses overflow-y-auto with a stable scrollbar gutter so the centered column does not jump when the bar appears. The textarea is grown to match content via syncTextareaHeight (with scroll position preserved during the height reset), and a ResizeObserver on the scroller re-measures when width changes re-wrap lines so the tail is not clipped. Toggling tokenizer still restores scroll offset after layout; the footer bar is shrink-0 so it stays visible on short viewports.

Reviewed by Cursor Bugbot for commit 8541556. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR moves scrolling from the textarea to the surrounding chunk-editor area while preserving position during content measurement.

  • Auto-sizes the textarea to its content and observes container resizes.
  • Preserves the shared scroll offset when resizing or toggling tokenizer mode.
  • Adds a stable scrollbar gutter and prevents the tokenizer footer from shrinking.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsx Moves scrolling to the editor container, synchronizes textarea height with content and width changes, and preserves scroll position across layout transitions.

Reviews (2): Last reviewed commit: "fix(knowledge): scroll the whole chunk e..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8541556. Configure here.

@waleedlatif1
waleedlatif1 merged commit 7193035 into staging Aug 5, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/chunk-editor-scroll-area branch August 5, 2026 23:15
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