Dropping a file in the margins around a document previously did nothing.
react-dnd's window level dragover handler forced dropEffect to "none" for
any target outside of .ProseMirror, so the browser never dispatched a drop
event there.
Heading numbers are drawn by a ProseMirror decoration, and the server
strips all plugin decorations before it serializes, so exported HTML
always came out unnumbered.
Compute the same labels during export and write them to the rendered
headings as a data attribute, which the exported editor styles already
render. A revision takes the preference from the document it belongs to.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nested .oxlintrc.json files replace the root config per-rule rather than
merging, so the root's shared/** override for no-restricted-imports was
dead config and the sonner restriction was not enforced anywhere.
Move the restrictions into shared/.oxlintrc.json, add the
prosemirror-tables entry to app/.oxlintrc.json where the same shadowing
applies to .tsx files, and drop the dead root override.
* feat: Metadata below collection title
Extracts the shared meta line styles from DocumentMeta into a reusable
HeaderMeta component, and adds an equivalent meta line beneath collection
titles showing visibility, public sharing, and document count.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* i18n
* fix: Show document count for empty collections
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <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>
* feat: Filter DSL for collections.list
Adds the structured `filters` expression language to collections.list,
matching documents.list and documents.search. Supported fields are name,
createdAt, updatedAt, archivedAt, createdById and permission, each validated
against its column type at the input layer.
Deprecates the ad-hoc `query` and `statusFilter` params, which now translate
into filter leaves so that one code path serves both shapes, and returns a 400
when a caller combines them with `filters`.
Note that `query` matching is no longer accent-insensitive, as the unaccent
comparison is replaced by the shared iLike conversion.
* fix: Make filter expressions assignable to a JSON request body
Filters are sent as a JSON body, but `FilterCondition` and `FilterGroup` were
interfaces, which TypeScript does not give an implicit index signature, and
`FilterValue` admitted a `Date` that JSON cannot carry. Both stores worked
around this by asserting the request body to JSONObject, which suppressed
checking of every other field as well.
Declare the two shapes as type aliases and drop `Date` from the value union so
a filter type-checks against the request body directly, and remove the
assertions from the collection and document stores.
* feat: Restrict filter fields to a set of accepted values
Add an optional `values` set to a filter field definition, checked against
scalar and array values at the input layer so that an unsupported value returns
a 400 rather than an empty result or, for a field backed by a Postgres enum, a
database error. A field with a fixed value set is matched exactly, so pattern
operators are rejected for it in the same way as for non-text columns.
Apply it to `permission` on collections.list.
* refactor: Build the list_collections name filter with the filter DSL
The MCP tool carried its own copy of the unaccent name comparison that
collections.list used before it moved to the DSL. Build the clause with
buildWhere instead, so both paths match names the same way, and drop the
replacements plumbing it needed.
* 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>
* fix: New German translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Polish translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Vietnamese translations
* fix: New Dutch translations
* fix: New Dutch translations
* fix: New Thai translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New English, United Kingdom translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Spanish translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New Norwegian Bokmal translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New English, United Kingdom translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New English, United Kingdom translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New English, United Kingdom translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Polish translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New English, United Kingdom translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Spanish translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Thai translations
* fix: New Swedish translations
* fix: New Portuguese translations
* fix: New Ukrainian translations
* fix: New Vietnamese translations
* fix: New Persian translations
* fix: New Spanish translations
* fix: New Catalan translations
* fix: New Czech translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Dutch translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Chinese Simplified translations
* fix: New Chinese Traditional translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Indonesian translations
* fix: New Persian translations
* fix: New Thai translations
* fix: New English, United Kingdom translations
* fix: New Norwegian Bokmal translations
* fix: New French translations
* fix: New Spanish translations
* fix: New Danish translations
* fix: New German translations
* fix: New Hebrew translations
* fix: New Hungarian translations
* fix: New Italian translations
* fix: New Japanese translations
* fix: New Korean translations
* fix: New Polish translations
* fix: New Portuguese translations
* fix: New Swedish translations
* fix: New Turkish translations
* fix: New Ukrainian translations
* fix: New Vietnamese translations
* fix: New Portuguese, Brazilian translations
* fix: New Thai translations
* fix: Crash opening document menu on mobile
The heading numbering submenu added to the document display options is
rendered through the `append` slot of `DropdownMenu`. On desktop that slot
lands inside the menu content, but on mobile it is rendered into a drawer,
which has no menu root for the Radix submenu primitives to attach to — so
opening the document overflow menu on mobile threw "`MenuSub` must be used
within `Menu`" and took down the page.
Flatten the submenu into an inline group of options on mobile, matching the
toggles it sits alongside.
Fixes OUTLINE-CLOUD-D1X
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ExrfehTYgotb8d2aoMvK
* fix: Match heading prefix color to the heading anchor
The heading numbering prefix was drawn with the secondary text color while
the `#` anchor beside it uses the primary text color at 75% opacity. The
two read as the same tone in light mode, but diverge visibly in dark mode
where the primary text color is much brighter.
Draw the prefix from the same color and opacity as the anchor so the two
match in both themes.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ExrfehTYgotb8d2aoMvK
* fix: Heading prefix missing when printing
The print stylesheet hides the heading pseudo element to keep the H1–H6
level labels out of print. That pseudo element also carries the heading
numbering prefix, so printing or exporting a numbered document dropped its
numbers.
Qualify the print selectors the same way the level labels themselves are,
so only the labels are hidden and the prefix still prints.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ExrfehTYgotb8d2aoMvK
* Update Styles.ts
* feat: Filter DSL for users.list
Add the structured filter expression language already used by documents.list
and documents.search to users.list, over an allowlist of id, name, email,
role, createdAt, updatedAt, lastActiveAt and suspendedAt.
Supersedes the ad-hoc ids, emails, role and filter parameters, which are now
deprecated and translated into the DSL so a single path builds the query. The
same translation backs the list_users MCP tool, which held a duplicate copy of
the status handling.
Field specs gain an optional value allowlist, so an unknown role is rejected
at the input layer rather than reaching the enum column. Suspended users
remain invisible to non-admins and excluded by default, unless the expression
references suspendedAt.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: Collapse the duplicate suspended user predicate
The non-admin invariant and the default exclusion pushed the same clause for
non-admins in the default case. Both rules are now one predicate: suspended
users are visible to admins only, and then only on request.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: Drop the legacy parameters from the list_users MCP tool
The MCP surface has no backwards compatibility burden, so it takes the filter
DSL directly instead of the deprecated role and status parameters. This gives
the model date ranges, OR groups and name matching, which the old enum pair
could not express.
The field allowlist moves next to the other user filter helpers so the REST
schema and the tool share one definition rather than the tools directory
reaching into the routes.
Drops the unreachable Date member of FilterValue. Dates cross the wire as ISO
8601 strings, a Date instance fails every field kind, and zod cannot represent
it in the JSON Schema the MCP tool list is built from.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* revert: Retain legacy role/filter params in the list_users MCP tool for now
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Revert MCP changes
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Add heading numbering display preference for documents
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix isRemoteTransaction call for new signature on main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix inTable detection for headings after a nested table
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Move from deco to pseudoclass
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* wip
* Center reorder cursors between sections, detect empty sections with CSS
* Deduplicate persisted sidebar section order
* fix: Stricter zod type
* Remove DraggableSection unit tests
* perf: Cache JS chunks on first use instead of precaching entire build
The service worker precached every JS chunk (~590 files) in the
background for every visitor. Chunks are content-hashed and immutable,
so a CacheFirst runtime route provides the same repeat-visit behavior
while only fetching chunks that are actually used.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* perf: Do not register service worker on public share views
Anonymous share visitors gain nothing from the worker or the PWA
cache, shares always require the API. The server now exposes an
isShare flag in window.env and the client skips registration when
it is set.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* wip: Epic support
* fix: Unfurl GitLab epics and group work items
Group-scoped work items are parsed as project issues, producing a project
path of `groups/<group>` and a 404 from the issues API. Parse the namespace
around the `/-/` separator instead, and fetch group-scoped resources via the
epics API.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Truncate long mention labels instead of wrapping
A mention with a long unfurled title wrapped the pill onto several lines.
Cap it to a single line and elide the label, keeping icons and the trailing
identifier intact.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Build the project path only for project-scoped resources
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The modification loop advanced its cursor with node sizes read from the
slice, which describes the content before the change. When one step
replaces several sibling nodes the changeset emits a change per node,
each carrying the whole slice, so the later changes walked past the end
of the document and decoration building threw.
Measure each decorated node in the document being decorated instead.
Fixes OUTLINE-CLOUD-D19
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The heading node bound its caret-sync handler to Mod-ArrowLeft, which
Prosemirror maps to Ctrl on Linux and Windows. The handler moved the
selection to the start of the heading, replacing the word-left movement
that Ctrl+Left performs everywhere else.
Bind Cmd rather than Mod, so the handler only runs for the shortcut it
was written for.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Sanitize the embed toolbar link and anchor embed url matchers
The "Open" link in an embed's bottom bar wrote the node's href attribute
into the DOM without passing it through sanitizeUrl, so a javascript: url
in that attribute ran on click.
Two embed matchers, and the regex built from a team's embed integration
settings, were not anchored, so a javascript: url that contained a
supported url further along still matched an embed and reached that link.
* fix: Only emit a list style the editor renders
The listStyle attribute is written into a list-style-type declaration.
Its validator returned a boolean rather than throwing, which Prosemirror
ignores, so any string reached the style attribute and a crafted value
appended further CSS declarations to the element.
* fix: Sanitize the image urls carried in a mention's unfurl attribute
The unfurl attribute holds a cached copy of the unfurl response on the
node, and is used whenever the store has no live entry for the url. Its
favicon and avatar urls were written to an img src unchanged, so a
crafted mention made every reader's browser request a chosen host.
* fix: Render a heading level and highlight color that cannot be used
Both attributes are used unchecked when the node is rendered. rgba()
throws for a color it cannot parse, and a level outside of 1-6 produces
an invalid tag name, so either one stopped the whole document rendering
in the browser and on the server. The heading level also reached a
repeat() in the Markdown serializer, unbounded.
Fall back when rendering rather than when reading, so that a value
written through collaborative editing, which does not run the attribute
validators, is covered too.
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>
* fix: Correct open depths when unwrapping a single table cell on copy
The transformCopied prop replaced the slice content with the cell's content
but kept the original open depths, which still counted the removed table,
row, and cell levels. The resulting slice claimed to be open deeper than its
content, so any drag of a selection made inside a table cell threw in
dropPoint as the drop cursor walked into it.
Fixes OUTLINE-CLOUD-99J
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Unwrap single header cells on copy too
Header cells use the header_cell table role, so they never matched the
single-cell check and kept the table wrapper on copy.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Viewing the trash showed everything the whole workspace had deleted, which
is noisy for anyone looking for their own document. Default the view to the
items the current user deleted, and add user and date filters — matching the
shape of the search filters — to widen it again.
- Attribute a deleted subtree to the acting user. Deleting a document only
recorded the actor against the document itself, so nested pages kept
whoever last edited them and would have been hidden from their deleter.
- Move documents.deleted onto the filter DSL, exposing deletedById and
deletedAt. deletedById is mapped to the column that currently records the
deleting user, so adding a dedicated column later leaves the API unchanged.
- Lift the date filter duration map into shared, where search and the trash
both read it rather than keeping a copy each.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replacing the download dialog with the export submenu lost the option to
include child documents, which defaulted to on. Restore it as the default
behavior for every format, and move the background export toast into the
model so all download paths raise it.
IconLibrary named-imported icons from the package barrels, which the Mermaid
extension also loads as whole icon packs. Sharing one copy of the barrel meant
every icon was retained and shipped on nearly every route. Importing each icon
from its own module leaves the barrels behind Mermaid's lazy icon pack loaders.
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>
* fix: Serialize external mentions as links in exported markdown
GitHub issue, pull request and project mentions carry the real URL in
`href`, but always serialized to a mention:// reference that cannot be
resolved outside of Outline. Write a plain link instead when the
commonMark serializer option is set, and set that option on the paths
where markdown leaves the platform – document and revision export, zip
exports, and the public share markdown response.
* Sanitize external mention url before navigation
* feat: Re-authorize collaboration connections when access changes
Collaboration connections are authorized once, when the websocket is first
established, so a connection outlives changes to the access it was granted.
Add a processor that publishes access changes to the collaboration servers
over Redis. Each server closes the connections it holds within the scope of
the change and clients reconnect, at which point they are authorized as
normal. Authorization stays in one place, the published scope only has to
cover the connections that may be affected.
The API update subscriber now shares a single Redis connection rather than
opening its own.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: Log an access change once rather than per connection
Every closed connection is already logged by LoggerExtension, so record the
reason and the number of connections affected once instead. The count also
makes a scope that matches nothing visible.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every remote change is applied as a full document replacement, which
invalidates the column resize handle while the drag is still active.
Releasing the pointer then resolved position -1 and threw.
Cancel the drag when the handle no longer points at a cell.
Fixes OUTLINE-CLOUD-B3R
The caption is editable DOM outside of the document, so ProseMirror handled
the drag against the document selection instead — moving unrelated content and
throwing a mismatched transaction as the caption commit landed mid-dispatch.
Fixes OUTLINE-CLOUD-AB8
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
Regex lookbehind is unsupported before Safari 16.4, and the table rule
built one at module scope, so the throw took out the whole editor.
Replace it with a manual scan of the preceding character.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Separate logged-in elements on shared page
* fix: Set explicit type on shared header account menu trigger
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
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: Sticky first column in tables with a header column
When a table is wider than the available space, the first column now stays
in place while the table is scrolled horizontally, matching the existing
behaviour of the header row. Only applies when every cell in that column is
a header cell.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* perf: Cache header column lookup per node
updateClassList runs on every horizontal scroll event, so the first column
check is kept until the table node itself changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* 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: Match the base domain on a label boundary
Domain parsing looked for the base domain anywhere in the host, so a host
that merely contained it was classified as a subdomain of the install
rather than as a custom domain. Compare against the end of the host
instead, and reuse the same helper for the custom domain CNAME check.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Normalize host case and trailing root label
Hostnames are case-insensitive and may be given in fully qualified form
with a trailing dot, so normalize both before comparing against the base
domain. Without this a host such as MyTeam.Example.Com is classified as a
custom domain and a valid CNAME target is rejected.
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
* feat: Highlight trigger text while suggestion menu is open
Adds an inline decoration around the trigger character and search term
while the block, emoji, or mention menu is open.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Multiplayer edits
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Heading anchor widget breaking IME composition
The heading anchor was passed to Decoration.widget as an already-mounted
element. Prosemirror can only reuse a widget when the decoration is the same
object or the previous toDOM has no parent, so neither held once the button was
in the document. Every doc change therefore rebuilt the widget desc and set
updater.changed, forcing a rewrite of the heading contents on each keystroke.
Rewriting the DOM around an active composition drops text an IME is still
composing, which paragraphs never hit as they have no widget.
The decoration key was also derived from the node position, so reuse broke
whenever content before a heading changed length, including remote edits from
another collaborator.
Pass a factory and use a position independent key. Keys are only compared
against the desc at the same index in the same parent nodeview, so a constant
key is scoped per heading, matching the "space" widget alongside it.
* Remove excessive tests
* 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
* 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>
Proxies commonly forward a Host header without the port the installation is
publicly reachable on, so redirects derived from the incoming request pointed at
the wrong address – most visibly breaking the email magic sign-in link.