* feat: Add filtering to tables in the editor
* Show the column filter button on header hover in edit mode
* Keep the filter button shown while its menu is open
* Move focusEditor to its own module
* Anchor the filter menu to the filter button
* Address review feedback on table filtering
* Show the filter button background while its menu is open
* Always show the filter button background with its icon
* Remove value counts and hide Clear when there is no filter
* Translations
* placeholder
* fix: Keep notices and rules nested in lists and quotes when serialized to Markdown
* fix: Keep the blank line above notices and rules, written per line
* feat: Display links as preview cards
Adds a display attribute to mentions so a link can render either inline
or as a card with image, title and description from its unfurl. Pasting
a URL offers a "Card" option, and selecting a link mention shows a
toolbar to switch between the two displays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016MJXFgeTUqKhSTriUHfG3z
* feat: Arrow key selection, full width and Return for link cards
Cards fill the document width, hide the blank line below them, are selected
by the up and down arrow keys like images, and Return on a selected card
adds a paragraph below it.
* feat: Display document and collection mentions as cards
Document and collection mentions can be switched to a card from the
selection toolbar. Document cards show the summary, collection and the
first image larger than 100x100. Collection cards show the first line of
the description. On public shares the preview image is signed, as the
share page already signs the attachments of that document. Card images
are hidden until they load and removed if they fail.
* feat: Keep mention cards through Markdown
The card display is written as the link title, so URLs are not changed.
Document and collection cards are written as @ links to their id and
parsed back into mentions.
* refactor: Move mention cards to their own file
Document cards show the collection after the title instead of below it.
* fix: Address review feedback on mention cards
- Include the share id in the document card unfurl URL for root shares.
- Return on a card in a heading adds a paragraph.
- URL cards keep their URL in Markdown, and the server does not narrow
their type.
- Unfurl results apply to the current node, not the node at first render.
- Collection card descriptions stop at the first line break.
* refactor: Reuse existing helpers for mention cards
- Sign the preview image with TextHelper.attachmentsToSignedUrls.
- Check document and collection ids with isUUID.
- Return lines from getFirstText without changing an input array.
* fix: Preserve JSON output for inline mentions
* refactor: Centralize mention selection classes
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Clicking Edit scrolls to the top of the document
* fix: Restore scroll after node views render
* fix: Switch to editing without redrawing the document
* fix: Keep Yjs undo working after switching to editing
* fix: Viewers attributed as editors when their editor repairs remote changes
* fix: Rescan after remote changes and assign block ids when parsing markdown
* chore: Import uuid as generateUuid in ToggleBlock
* refactor: Add RepairPlugin to repair only on local changes, checking remote changes for pending repairs
* fix: Assign block ids on the server so patches keep existing ids, keep unchanged mention ids
* fix: Store API edits in the editor's trailing node form
* perf: Copy only the patched path when recreating transforms
recreateTransform deep copied the whole document for each patch
operation, and diffArrays compared elements with a generic isEqual. Copy
only the containers on the operation path and compare with a JSON-only
equality check. Revision changesets are about 6x faster.
* Use fast-deep-equal in place of a custom JSON equality check
* Restore isJSONEqual, fast-deep-equal throws on null-prototype attrs
A heading whose text ends in a number could get the same slug as a
numbered duplicate. Heading slugs now come from one HeadingSlugger that
skips taken IDs, and the server section lookup counts nested headings
like the editor does.
The document container and editor exposed their measured widths as inherited
CSS variables, so each frame of a width animation restyled every element in
the document. Full width blocks now use a container unit, and media resizing
measures the editor content width when it is needed.
* chore: Prune redundant comments and normalize lint directives
Removes comments that restate the following line and stale TODOs, drops
the passive event listener feature check now that all supported browsers
support it, and renames eslint directives to oxlint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BehTjuZwKbN5csMCp3H4QH
* fix: Evaluate restricted team domains at validation time
The restricted email provider list was captured when the model loaded, so
it could not follow the hosting environment and the tests that covered it
never reached the model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BehTjuZwKbN5csMCp3H4QH
* chore: Replace type suppressions with accurate types
Adds a Concrete helper type for registries of abstract classes, declares
missing Sequelize and refractor typings, uses public ProseMirror APIs, a
typed mock context helper in middleware tests, and a StaticLink component
for sidebar rows being edited.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BehTjuZwKbN5csMCp3H4QH
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: Render uploading images and videos with their node component
* fix: Insert uploaded block nodes next to the paragraph instead of inside it
* fix: Insert dropped block nodes on the nearest side of the paragraph
* feat: Fade in uploaded images and videos from their placeholder
* feat: Preview the new image while it replaces an existing one
* fix: Keep the placeholder size and preload pasted images after upload
* fix: Move the selection off an image while an upload replaces it
* feat: Play uploaded videos from the local file in the uploading editor
* feat: Display uploaded images from the local file in the uploading editor
* feat: Soften image and video corners, round them fully when selected
* feat: Render uploading attachments with the attachment component
* feat: Show the file size of an attachment while it uploads
* feat: Show upload progress on the placeholder instead of a toast
* fix: Fade the content of an uploading file but not its progress bar
* fix: Keep the local file of an upload when its placeholder is mapped away
* chore: Simplify upload placeholder state and remove unused progress callback
* Remove test
* fix: Address review feedback on upload placeholders
Expose upload progress to assistive technology outside the inert placeholder, free local files when the editor state is replaced, reuse the fadeIn animation and move the video wrapper class to EditorStyleHelper.
* chore: Move image and PDF wrapper class names to EditorStyleHelper
* feat: Scale in an upload placeholder when it appears
* chore: Make the upload placeholder scale-in more subtle
* perf: Coalesce editor React renders into an animation frame
dispatchTransaction ran calculateDir and forceUpdate synchronously on every
transaction, adding a style read and a React render to each keystroke. These
now run in an animation frame, at most once every 50ms.
Refs #14069
* fix: Reset the pending render frame on unmount
StrictMode remounts the same instance, and a stale handle would stop all later renders.
* perf: Render editor UI from observable state instead of forceUpdate
Replace the coalesced animation frame render with an observable editorState.
The editor no longer re-renders its widget tree on every transaction; the
selection toolbar observes the state only while it is active, so updates stay
synchronous and typing with a collapsed caret renders nothing. The floating
toolbar no longer measures the selection while hidden.
Refs #14069
Table grip and insert widgets at the start of a cell made ProseMirror treat the
grip as the first block of the cell, so RTL deletion was always blocked. The
add row and column controls now also show above the grips while hovered.
* fix: Repair table cells with invalid spans
Fixes OUTLINE-CLOUD-AG8
Fixes OUTLINE-CLOUD-D9J
* fix: Check every table on the first edit, lowercase JSDoc params
* wip
* fix: Position grips in merged cells from the rendered layout
* fix: Only merge row and column selections that cover whole rows or columns
* perf: Find merged cell spans without scanning the table map
* refactor: Extract helpers for cells starting in a row or column
* React 18 upgrade
* fix: Force synchronous React rendering in server HTML export
React 18 can defer a legacy ReactDOM.render commit when sync work is
queued, leaving exported component nodes empty. Wrap the render in
flushSync, and flush unmount-scheduled passive effects before global
env cleanup so React never runs without a window.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor: Move server ComponentView to createRoot
ReactDOM.render and unmountComponentAtNode are removed in React 19.
flushSync around root.render keeps the mount synchronous for the
HTML-export path, which reads the DOM immediately after.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Enable CI
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The changeset token encoder cached node type ids in an object created
with a null prototype, but tested for a cache miss with `=== null`. The
miss reads as undefined, so the cache was never filled and every node
end encoded to undefined — making the closing token of any node compare
equal to that of any other.
As a result revision diffs could omit a node's closing token when its
type changed, and attribute an inserted wrapper's closing token to the
node it wraps.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Selection toolbar not displaying on mobile
The mobile branch of FloatingToolbar rendered nothing until `position.visible`
was true, but `usePosition` only reports a visible position once the menu
element has been measured through `menuRef`. On desktop the wrapper is always
mounted (it animates in via opacity) so the ref is populated on first render,
while on mobile the toolbar is the only thing that mounts the ref — leaving it
permanently null and the bar never displayed.
Gate the mobile bar on there being toolbar content instead. Position is
irrelevant on mobile: the bar is fixed to the bottom of the viewport and its
vertical offset is owned by useKeyboardStickyOffset.
Also size the bar with border-box and center its content vertically, so the
declared 60px is the height of the bar rather than 60px of content plus
padding with the buttons pinned to the top.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GhGyxA663bMFZ1NxBhLAoF
* fix: Keep the mobile selection toolbar visible while editing
On mobile the toolbar is a bar docked above the on-screen keyboard rather than
a floating menu anchored to the selection, but it was only rendered while
something was selected — so it appeared and vanished as the selection came and
went while typing.
The formatting menu was already written for this: `canFormatBlock` shows
headings, quotes, toggles and list indent/outdent precisely when the selection
is empty on mobile, mirroring `canFormatInline` for selected text. That branch
was unreachable, as an empty selection always resolved the toolbar to nothing.
Show the menu whenever the editor is focused on mobile, so the bar carries
block formatting for a bare cursor and swaps to inline formatting on selection.
Visibility is derived at render rather than folded into `activeToolbar` so that
focus moving into the link editor's input cannot tear down a toolbar the user
opened. Focus is threaded to widgets through WidgetProps.
Tapping the bar now also prevents the default action of mousedown, keeping
focus (and the keyboard) in the editor. Without it a tap would blur the editor
and unmount the bar before the tap became a click; fields inside the bar are
excluded so the link editor still takes focus.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GhGyxA663bMFZ1NxBhLAoF
* fix: Mobile toolbar is not visible
* Update mobile toolbar styling
fix: Does not account for stored marks
---------
Co-authored-by: Claude <noreply@anthropic.com>
Focusing the editor can flush pending DOM changes, so the selection
captured before the focus call may no longer point at the current
document. Only restore it when the document is unchanged.
Fixes OUTLINE-CLOUD-CP6
* fix: Uncaught error handling messages from the diagram editor
The diagram editor also posts plain text messages, such as "ready", which
were passed straight to JSON.parse and threw from the window listener.
- Ignore any message that is not a JSON object.
- Ignore messages when the editor window is not open. A blocked popup left
the window null, which matched the null source of unrelated messages.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Validate messages from the diagram editor against a schema
Replaces the message interface with a zod schema, so arrays and known
fields with unexpected types are rejected rather than trusted.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Render React node views in server-side HTML export
Passes nodeViews to the headless EditorView used for export so that nodes
with a React component render with it, matching the editor, and falling
back to toDOM when a component cannot render server-side.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Let nodes opt out of component rendering in static HTML
Replaces the hardcoded set of node names in the server nodeViews factory with
an allowComponentInStaticHTML getter on Extension, so a node declares the
behavior alongside its own definition rather than in a server file that does
not know about it.
Mention opts out: its component requires stores and a router, so it always
threw and fell back to toDOM, at the cost of a React render, an exception and
a log line per node. A document with 100 mentions now exports in ~12ms rather
than ~25ms and emits no warnings.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Yield one less macrotask turn when flushing React effects
Only two turns are needed: the first flushes passive effects, the second fires
Frame's own setTimeout(0) whose setState commits the iframe. The third turn
absorbed nothing that the components produce.
Each turn is roughly a millisecond of idle time held inside the render lock, on
every export — including plain documents, share page SSR and notification
emails — so dropping it takes a small export from ~6ms to ~4ms.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Removing the first node from the pasted slice kept the original open
depths, which are no longer valid for the remaining content. When the
clipboard held a single top-level node the content became empty while
openEnd stayed above zero, and ProseMirror walked into a null child.
Fixes OUTLINE-CLOUD-51V
* fix: Pasting a table from Google Sheets does not create a table
Spreadsheet cells containing currency amounts caused isMarkdown to
misread the tab-separated plain text flavour of the clipboard as inline
LaTeX, so the paste handler discarded the HTML table and reparsed the
text as Markdown.
Tighten the LaTeX heuristic to require delimiters that hug their content
and a closing delimiter not followed by a digit, and always prefer the
HTML parser when the clipboard HTML contains a table.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove lookbehind in regex
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Skip revision diff when too expensive to compute
Recreating steps from a JSON patch copies and validates the full document
once per operation, so a structure collapse on a very large document could
block the worker event loop for minutes. Skip the changeset when the
product of operation count and document size exceeds a bound, and send
notification emails without the inline preview in that case.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* perf: Apply complexity guard to every patch computation
Centralize patch creation and the maxComplexity check in recalculateOps
so the recomputed patch in addSetNodeMarkup is bounded as well.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
- Serialize code fences longer than any backtick run in the content, so
content lines cannot terminate the fence early on reparse
- Reduce the fence info string and language attribute to a single safe
token when parsing and serializing
- Share the markdown parser and serializer through the editor test helper
* fix: Table cell background pasted as text highlight
A background color styled on a table cell by an external application was
dropped, while the matching background on the span inside the cell became a
highlight on the text – rendered yellow, as the color did not match a preset.
Cell backgrounds are now read from pasted HTML onto the cell, and only a
background that matches a highlight preset creates a highlight mark.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Skip unpainted ancestors when comparing backgrounds
An ancestor with a transparent or unparseable background ended the search, so
shading painted higher up – such as on a table cell – was missed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Invalid sort comparator for frequently used items (#13241)
Extracts frequency tracking for icons, emojis, and code languages into a
shared FrequencyTracker with a spec-compliant, stable sort.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Snapshot frequently used icons while picker is open
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Sync frequent custom emojis to tracked ids, preserving order
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Image and video dimension loading failures now warn and resolve undefined
rather than rejecting, which surfaced as unhandled errors in Sentry.
Co-authored-by: Claude <noreply@anthropic.com>