* fix: Toggling a nested list no longer converts parent lists
When the selection was inside a nested list, toggling the list type from
the toolbar or keyboard shortcut converted every list in the tree,
including ancestors of the selected list. This was caused by
doc.nodesBetween visiting ancestor nodes whose range overlaps the
selected list - these are now skipped so only the closest list and its
children are converted. Also guards against converting nested lists with
incompatible content such as checkbox lists.
Closes#12653https://claude.ai/code/session_01Q5hkRNp1Fo3jAc9fW5t68h
* test: Throw when selection text is not found in toggleList test helper
https://claude.ai/code/session_01Q5hkRNp1Fo3jAc9fW5t68h
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Block math not closed by trailing $$ on a content line
The closing delimiter check compared a 3-character slice against the
2-character "$$" delimiter, so block math closed on the same line as
content (e.g. "c = d$$") was never detected and the block swallowed the
rest of the document. Use the delimiter length rather than a hardcoded
slice. Also fix the indexOf sentinel comparison (!== 1 instead of
!== -1) in inline math parsing, which terminated correctly only by
coincidence.
Adds tests for the math markdown rules and moves the findNodes test
helper into shared/test/editor for reuse.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: NaN width and height parsed for video and image nodes
Video parseDOM and parseMarkdown used parseInt on a missing attribute,
storing NaN instead of null and persisting it to markdown as NaNxNaN.
Image size syntax with a missing dimension (e.g. "=x100") hit the same
issue through optional regex groups. Parse dimensions only when
present, matching the existing guard in Image parseDOM, and correct the
video getAttrs element type.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: Normalize non-numeric video dimensions, avoid serializing nullxnull
Review feedback: parseInt could still produce NaN when the attribute
exists but is not numeric (e.g. width="auto"), and toMarkdown wrote
null dimensions as "nullxnull". Parse dimensions through a helper that
normalizes non-finite values to null, and serialize nullish dimensions
as empty strings, which still round-trips as a video node.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The collaborativeEditing toggle has been unused since collaborative
editing became always-on. The column is no longer defined in the Team
model nor referenced anywhere in the codebase, so this drops it.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Add "+:emoji:" reaction shorthand to comment form
Typing a comment that consists solely of a leading "+" followed by a
single emoji now adds that emoji as a reaction to the comment above,
instead of posting a new reply — mirroring the Slack shorthand.
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
* Move parseReactionShorthand into editor/lib/emoji
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
* Open emoji menu when colon is preceded by a plus
The suggestion menu's trigger boundary excluded "+", so typing "+:" never
opened the emoji menu — preventing the "+:emoji:" reaction shorthand from
being typed. Add a configurable `precededBy` option to the Suggestion
extension and set it to "+" for the emoji menu.
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
* Always allow "+" before suggestion trigger
Simplify by adding "+" to the trigger boundary for all suggestion menus
rather than making it a per-menu option. This lets the "+:emoji:" reaction
shorthand open the emoji menu.
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Fix editor find freezing on long documents
In-document search (Ctrl+F) blocked the UI for several seconds while
typing in long documents. Two compounding causes:
- The find command ran a full-document search and highlight rebuild on
every keystroke. Debounce it so typing stays responsive; the input
value still updates immediately and pending searches are flushed when
navigating between matches.
- search() de-duplicated matches with an O(n) scan of all prior results
per match, making a common term that matches many times quadratic.
Track seen positions in a Set for constant-time lookups.
* Skip redundant search highlight rebuilds, lower debounce to 100ms
The highlight plugin rebuilt every match's DOM range via domAtPos on
every editor view update while a search was active, forcing synchronous
layout on cursor moves, selection changes, and collaboration cursors.
Track the built ranges and, when the result set is unchanged, only
rebuild when they are actually stale — a referenced node has detached or
some matches were not yet resolved to ranges. isConnected checks are
cheap property reads with no layout, versus domAtPos which forces
reflow, so this is strictly less work than before and skips entirely in
the common case where all matches are resolved and connected.
Also lower the find debounce from 250ms to 100ms for snappier feedback.
* Shorten highlight rebuild comment
* PR feedback
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Before/After creation options appear in menu when no permission on parent
closes#12624
* fix: Manager of root document sees non-functional Before/After create options
Before/After only gated on the team-level createDocument ability, so a user
with document-level manager access (but no collection access) saw the options
yet hit a backend rejection. Gate on the actual sibling location instead,
mirroring authorizeDocumentCreate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The position prop is omitted at several call sites (App, Settings,
Shared sidebars) and relied on the top default for inset-titlebar
padding. Make the prop optional and restore the default so the lint
rule stays satisfied without changing runtime behavior.
Co-authored-by: Claude <noreply@anthropic.com>
* fix: place cursor at start of inserted table row/column
When using Insert before for a table row or column, the selection was
collapsed onto the mapped previous selection — landing at the bottom of the
shifted neighbouring column rather than in the newly inserted cell. Move the
cursor to the start of the first cell of the inserted row/column instead.
* feat: Inline editor menu (#12611)
* wip
* Mobile support
* Address review feedback on inline menu
- Mark selection-restore transaction as not added to history
- Only open desktop inline menu when an anchor is available
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: place cursor at start of inserted table row/column
When using Insert before for a table row or column, the selection was
collapsed onto the mapped previous selection — landing at the bottom of the
shifted neighbouring column rather than in the newly inserted cell. Move the
cursor to the start of the first cell of the inserted row/column instead.
* Add handling for After variants
Add lint rule
---------
Co-authored-by: Claude <noreply@anthropic.com>
* wip
* Mobile support
* Address review feedback on inline menu
- Mark selection-restore transaction as not added to history
- Only open desktop inline menu when an anchor is available
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Add restore_document MCP tool and archived/trashed listing
Closes the delete/restore asymmetry in the MCP server: previously documents
could be archived or trashed via delete_document but never recovered.
- Add restore_document tool to recover archived or trashed documents,
optionally into a different collection.
- Add a status option ("archived" | "trashed") to list_documents so agents
can discover what to restore.
- Extract the documents.restore route logic into a shared documentRestorer
command, used by both the REST endpoint and the MCP tool.
https://claude.ai/code/session_01HpFcYtgEZJ96iaFMuGGCmc
* Use type-only import for Document in documentRestorer
https://claude.ai/code/session_01HpFcYtgEZJ96iaFMuGGCmc
* Revert archived/trashed status option on list_documents
Keeps the restore_document tool and shared documentRestorer command;
removes the list_documents status filter and its tests.
https://claude.ai/code/session_01HpFcYtgEZJ96iaFMuGGCmc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: New Czech translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* Avoid empty webhook processor work via cached subscription lookup
WebhookProcessor ran for every event but most teams have no matching
webhook subscription, costing an empty processor job and a database query
per event.
Cache a team's enabled subscriptions ({ id, events }) in Redis, invalidated
by model lifecycle hooks, and add an optional BaseProcessor.shouldQueue hook
consulted by the global event queue so the webhook processor only enqueues a
job when a matching subscription exists.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feedback
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>