* fix: Allow PDF embed width and height to change independently
Adds an aspect ratio lock toggle to the media dimension toolbar for PDF
embeds, renders PDFs at their stored aspect ratio, and keeps that ratio
when drag resizing.
* feat: Add corner resize handles to PDF embeds and persist aspect ratio lock
Stores the lock as an optional attachment attribute, where unset means
locked, so side handles change only the width of unlocked PDFs.
* feat: Consistent resize handles for images, videos, PDFs and embeds
All media get side, bottom and corner handles driven by one lock rule.
Images and videos stay locked. PDFs and embeds can be unlocked to resize
each axis independently.
* feat: Show width, height and lock in the embed toolbar
* feat: Start embeds unlocked and step media dimensions with arrow keys
Embeds start with an unlocked aspect ratio so full-width embeds can still
be made taller, while PDFs start locked. Up and down arrows step the
dimension inputs by 1, or 10 with shift.
* fix: Align the aspect ratio padlock with the dimension digits
* fix: Move the aspect ratio lock closer to the dimension inputs
* fix: Show the aspect ratio lock state in its tooltip
* feat: Show a display menu on hover for mentions that can be cards
Mentions that can display as a card show an overflow button on hover,
inside the end of the pill or in the top corner of the card. The button
opens a menu to switch between the mention and card display, which
replaces the selection toolbar for these mentions.
* fix: Resolve the mention position on click and hide the button on scroll
The menu looks up the mention position when an item is chosen, as edits
by collaborators can move it while the menu is open. The button follows
the mention when content above it changes and hides when a table is
scrolled.
* feat: Show the mention display button for a selected mention
The button shows for the selected mention as well as the hovered one, so
keyboard users can reach it. Touch devices show it for the selected mention
only. Only the button takes the pointer, so the fade does not block clicks
on short mentions.
* 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
* perf: Faster mention suggestions
Limit each section of suggestions.mention to 1s so a slow query does not
delay the others, debounce mention and link editor requests, ignore stale
responses, and use title search in the link editor.
* fix: Include presentation in the mention suggestion time limits
* test: Use a fixed name in the collection member name filter test
* feat: Filter menu items by typing
Typing in an open context menu, dropdown menu or editor toolbar dropdown shows a filter row and filters the items. Focus stays on the menu items, so the arrow keys still navigate, and the menu keeps its position and width while filtering.
* fix: Focus first menu item when Escape clears the filter
* fix: Accept AltGr characters and emoji in the menu filter
* refactor: Use isTextInput helper in menu filter
* fix: Text cursor, select all and selection delete in the menu filter
* Refactor to use real input
* fix: Keep the focused menu item highlighted while filtering
* 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>
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: Add selection toolbar for video nodes
* fix: Keep video caption on replace, download video as a file
* fix: Drop removed upload progress prop from video replace
* 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
* feat: Personal collections backend
Adds an owner to collections. A personal collection is private, one per user
per team, created lazily through collections.personal, and only its owner can
see or manage it. Admin bypasses in policies, lists, exports, events, webhooks
and file operations exclude the personal collections of other users. Turning
off the PersonalDocs preference makes the collection read-only.
* test: Access matrix for personal collections
Checks that collection and document endpoints, list and search results, MCP
tools, collaboration and websocket rooms agree with the read policy for the
owner, collaborators, members, admins, guests and other teams.
* feat: Personal collection in the sidebar
Adds a Personal sidebar section that renders the personal collection with the
collection document tree, creates the collection on the first new document,
and keeps it out of the Collections section. Adds the workspace setting, the
personal sidebar context, and hides collection sharing and membership UI for
personal collections.
* fix: Drag and drop in shared with me trees
Anchors the reorder drop cursor inside the row, and prefetches documents on
hover so that nested rows that were never opened can be dragged.
* feat: Personal collection owner for collaborators, no collection page
Presents the owner of the personal collection on documents, so that
collaborators see the owner in the share popover. Root rows in the Personal
section show the default document icon. A personal collection has no page:
the scene shows not found, and the breadcrumb, command bar and delete redirect
no longer link to it.
* fix: Personal sidebar indent and breadcrumb items without a link
Children of rows at depth 0 skip a level so that they start beyond the row
icon. Breadcrumb items without a destination, such as the personal and deleted
collection, are shown as plain text.
* test: Reduce personal collection tests to list paths
Endpoints that authorize a single model are already covered by the policy
tests. Keeps the lists and searches, which filter in queries, and the
presenter.
* test: Move personal collection list tests into collections tests
* feat: Create documents in the personal collection by alias
documents.create, documents.import and the MCP create_document tool accept
the collectionId "personal", which refers to the personal collection of the
user and creates it when it does not exist yet.
* refactor: Remove collections.personal route
The sidebar creates its first personal document with the personal
collectionId alias, so documents.create is the only path that creates the
personal collection.
* feat: Personal collection name, starring, templates and default
Personal collections cannot be starred, renamed or hold templates, and the
PersonalDocs preference is on by default. The app shows collections through a
displayName getter, which is the translated "Personal" for a personal
collection.
* fix: Use the same policy for starring and unstarring collections
* fix: No pins or viewer insights for personal documents
* revert: Show personal collection events in the audit log
Admins with audit access should see events in personal collections, even when
they cannot open the documents.
* fix: Load collection owner in share scopes
* fix: Keep personal collections out of workspace exports and webhooks
Workspace exports skip all personal collections, while an explicit export of
a personal collection stays available to its owner. Events in personal
collections, including attachments and documents moved after queueing, are
never delivered to workspace webhooks. Personal collections cannot be
renamed or made public through any path, cannot hold pins, and are not
offered as mentions.
* Change icon to avatar
* fix: Personal documents cannot be unpublished
* feat: Personal collection context for MCP
Collections are presented with an isPersonal flag, the server instructions
explain the personal collection, and move_document and update_document accept
the personal collectionId alias.
* fix: Keep moved personal exports private and remove pins on move
Document exports record the owner of the personal collection they came from,
so they stay private after the document moves. Moving documents into a
personal collection removes their pins, including pins to home.
* fix: Only create the personal collection in MCP when it is used
* perf: Read active models lazily in ActionContextProvider
The root provider read the active document and models during render, so
every navigation rebuilt the context and re-rendered all consumers. These
values are now getters, and overrides are merged without evaluating them.
* perf: Skip urlId scan in Store.get for UUIDs
When an id was not loaded, get() searched every item by urlId, so each
sidebar row observed the whole store. A UUID cannot end with a urlId, so
the search is skipped for UUIDs.
* perf: Stop sidebar rows re-rendering on navigation
- Track expanded nodes in an observable map, as ObservableSet.has tracks
the whole set.
- Do not rebuild the document tree rows when the active document changes.
- Auto-expand the active path in a reaction instead of reading the active
document during render.
- Compute active state per row, and keep row props stable.
* perf: Add useLocationSelector for persistent components
useLocation re-renders on every navigation. The new hook re-renders only
when the selected value changes, and is used where components stay mounted
across navigation. AuthenticatedLayout now keeps its portal element in
state, as it no longer re-renders after mount.
* chore: Send Document-Policy js-profiling header in development
* docs: Add render performance guidance to AGENTS.md
* fix: Check document or collection star exclusively for active state
* fix: Read location from each action context provider's own history
Nested providers inherited the root location getter, so menus inside a
split view pane read the browser route instead of the pane's route.
* fix: Expand starred collection when the active document changes
* fix: Guard node view positions after the view is destroyed
ProseMirror returns undefined from getPos once a node view is destroyed,
but ComponentProps typed it as always returning a number. Async handlers,
such as the mention unfurl, could then call setNodeMarkup with an undefined
position and throw a RangeError.
Fixes OUTLINE-CLOUD-D9N
* Remove excessive test
* 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
* perf: Load templates on demand and cache fetchAll results
fetchAll on the base store now returns the first result for repeat calls
with the same params, with a force option for callers that need fresh
data. Templates load when the command bar, document header, or block
menu needs them instead of on every page load.
* Make fetchAll caching opt-in via fetchAllIfNeeded
fetchAll always fetches again. fetchAllIfNeeded returns the previous
result for the same params until a model is added to or removed from
the store. Mount-effect callers for reference lists use it.
* React 19 upgrade
Bumps react and react-dom to 19.2.8, with the dependency changes React 19
requires: react-is 19, @types/react 19, @types/react-dom 19,
react-helmet-async 3 and react-avatar-editor 15 (which now ships its own
types). framer-motion moves to 13 — its v6 types reference React.ReactHTML,
removed from @types/react 19.
The type changes fall into a few classes:
- The global JSX namespace is gone, so JSX.Element becomes React.JSX.Element
and the custom element declarations move into a module augmentation.
- useRef() now requires an initial value.
- A ref created with a null initial value is typed nullable, so consumers
that accept one are widened to RefObject<T | null>.
- React.ReactChild was removed; tooltips take React.ReactNode.
- Ref callbacks may only return a cleanup function. react-dnd connectors
return the connected node, so useDragRef and useDropRef wrap useDrag and
useDrop and hand back a ref callback.
react-i18next stays on v12: i18next 23 drops compatibilityJSON "v3", which
would rewrite all 64 _plural keys across every locale.
outline-icons, oy-vey and react-waypoint have no release that lists React 19
as a peer. All three render correctly under it; the install reports them as
unmet peers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove react-helmet and forwardRef
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* 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>
* 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>
Opening the nested math editor moves focus, which dismisses the
suggestions menu. Restoring focus to the outer view re-entered the node
view's selection handling before it had finished, throwing "inner view
should not exist!".
Fixes OUTLINE-CLOUD-BZA
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Shift-click table grips to select a range of rows or columns
Shift or cmd clicking a second row or column grip now extends the
selection to cover every row or column in between.
Track the anchor and head index on RowSelection and ColumnSelection so
every grip in the range highlights, and a cell that spans rows or
columns no longer pulls its neighbours into the selection.
The inline selection menu collapsed the selection on pointerdown, before
the grip handler could read it, so there was nothing left to extend.
Leave the selection alone when the interaction is on a grip.
Hide the insert and move items in the row and column menus when the
selection covers more than one row or column, as they act on a single
row or column.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Take the selected row and column range from the selection
selectedRect grows past the selected rows or columns when a cell spans
them, so read the range from the selection where it is known. Keeps the
menus and the commands that act on a selection in step with the range
the grips highlight.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat: Normalized filter DSL for documents.list and search
Add a structured filter expression language (field/operator/value leaves
composed with AND/OR groups) shared by documents.list, documents.search and
documents.searchTitles. Values are validated against each field's column type
and per-field operator allowlists at the input layer, and translated to
Sequelize where-clauses server-side.
Supersedes the ad-hoc statusFilter/dateFilter/collectionId/userId parameters,
adds ISO 8601 duration matching for date fields, documentId subtree expansion
for search, and preserves draft visibility and collection authorization.
* chore: Fix flaky Encrypted "different key" test
AES-256-CBC is unauthenticated, so decrypting with the wrong key only
raises "bad decrypt" when the garbage plaintext has invalid PKCS#7 padding
(~255/256 of the time). Roughly 1 in 245 runs it decrypts to a non-matching
value instead of throwing, failing the strict toThrow assertion. Accept
either outcome, mirroring the adjacent tampered-data test.
* Hardening
Suggested users that share a group with the mentioning user are ranked
above the rest, both in the query so they fit inside the limit, and in
the menu itself.
The server returns a familiarity score per model id, which the client
applies as a multiplier on the relevance score of a suggestion. This
leaves room for other signals, and for other model types, without a
change to the response shape.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat: Add [[ trigger for mentioning or creating a document
Opens a suggestions menu filtered to documents, backed by a title search,
with options to create a new or nested document from the search term.
Generalizes the suggestion machinery to support multi-character triggers,
and extracts the mention menu item builders into app/editor/menus/mention.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Trim the mention search term
Spaces are allowed in the search term, so a whitespace-only query rendered
create-document items with an empty title and issued a title search that the
server rejects.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Close suggestion menus on a space directly after the trigger
Spaces remain allowed within a search term, they are only rejected as its
first character.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Return models from fetchNamedPage
The raw API payload was returned rather than the models added to the store,
so callers that render the result are missing computed properties.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: Render the document menu from the store
Matches the mention menu and paginated lists, where the request populates the
store and the list is rendered from observables.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat: Order people above documents in the mention menu
Uses a mention specific section so the command bar, where the section holds
user management actions, is unaffected.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Hide create document options without a create handler
Editors that do not pass onCreateLink, such as comments, inserted a mention
pointing at a document that was never created.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Warn before discarding unsaved template changes
Template content is only persisted when the form is explicitly submitted,
so navigating away or closing the tab silently lost everything typed.
Adds a navigation Prompt and a beforeunload handler to both template
scenes, and reverts the model on unmount so abandoned edits no longer
leak into other views rendering the same record.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Persist templates from the first keystroke
New templates were held only in browser memory until Save was pressed, so
a refresh, crash, or stray navigation lost everything written.
Templates are now created up front as an unpublished draft and autosaved,
mirroring how documents behave. Drafts are visible only to their author
until published, and are cleaned up if abandoned while empty.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Preserve icon edits made during an in-flight template save
applyEdits only restored title and content, so an icon or color changed
while a save was in flight was overwritten by the response and never
re-saved.
Pending edits are now tracked as a single record covering every field the
form can change, rather than one ref per field.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feedback
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>