Comments, revamped
Faster load times, virtualized sidebar, and a refreshed comment UI.
Documents with hundreds of comments no longer slow down your app. The comment sidebar is faster, cleaner, and handles large documents without breaking a sweat.
The problem
Documents with heavy review workflows — 500+ tracked changes, dozens of comment threads — were painful. The sidebar froze on load because every comment bubble mounted at once. Scrolling stuttered. Opening a large legal contract or compliance document meant waiting 5+ seconds before you could interact with anything.
What changed
Performance: 2x faster load times
Comment creation during document import used to dispatch a ProseMirror transaction for every single tracked change. For a document with 872 tracked changes, that meant ~824 dispatches and ~824 full document scans — an O(n²) operation.
Now tracked change comments are created in a single batch. A pre-computed lookup map replaces the repeated document scans, and one final dispatch refreshes decorations. Load time dropped from 5+ seconds to ~2.5 seconds on real-world documents.
Virtualized comment sidebar
The floating comments sidebar used to mount every comment bubble at once. For a document with 588 tracked change comments, that meant 588 Vue components rendered simultaneously.
Now only the ~5 comments near the viewport are mounted. The rest are lightweight placeholder divs. An IntersectionObserver watches which placeholders enter the viewport and mounts or unmounts comment dialogs as you scroll. The sidebar also no longer flickers when you type — a reactivity bug that toggled the entire component on every keystroke has been fixed.
Cross-page comment layout
Comment bubbles previously handled collision avoidance per page, which broke down when threads spanned page boundaries. The new layout uses a single continuous column. The active comment pins to its anchor position while other comments flow around it. Scrolling to a comment now only happens when the anchor is off-screen — no more jarring jumps when clicking between threads.
Refreshed comment UI
The comment dialog got a visual refresh:
- Faded highlights — when a comment is active, other comment highlights dim to ~12% opacity instead of disappearing entirely. You always see where comments live in the document.
- Tracked change styling — focused insertions and deletions now show a solid border and tinted background, making it clearer which change a comment refers to.
- Reply pill — replying to a thread starts with a compact pill that expands into the full editor on click. Less visual noise when you're just reading.
- Collapsible threads — long threads collapse to keep the sidebar scannable.
- Resolve badge — resolved comments are visually distinct so you can tell at a glance what's been addressed.
- Cleaner typography — author names are now 14px semibold, body text is 14px, and spacing is more consistent with the rest of the UI.
Get started
These improvements ship with the latest release. No configuration changes needed — your existing comments module works as before, just faster and cleaner.