Commit Graph
2329 Commits
Author SHA1 Message Date
Tom MoorandClaude Fable 5.1 1887db2dab fix: Mermaid diagrams laid out with nodes thousands of pixels apart (#13648)
* fix: Mermaid diagrams laid out with nodes thousands of pixels apart

Render diagrams with SVG text labels instead of HTML labels, except mindmaps. HTML labels are measured through foreignObject elements that some browsers size incorrectly in Mermaid's hidden render container, inflating node sizes for layout. Also removes the render container that was never passed to Mermaid.

* chore: Clarify Mermaid render container comment

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-04 17:15:39 -04:00
Tom Moor 2f78b54f30 fix: allow manual sizing of embedded PDFs (#13645) 2026-09-04 09:00:33 -04:00
964e709817 fix(editor): preserve toggle fold state across remote and local document edits (#13425)
* fix(editor): preserve toggle fold state across remote and local document edits

Fold state was re-derived from localStorage on every remote collaborative
transaction (and partially on local doc-changing ones), so a silently
failed Storage.set (quota exceeded, blocked storage) left a stale
{fold:true} and the next edit re-folded blocks the user had expanded —
the plugin seed from previous state was ineffective because
toggleFoldPluginKey.getState(newState) is always undefined during the
plugin's own apply.

Track a knownIds set alongside foldedIds and reconcile from the previous
plugin state (the second apply argument, which is reliable): existing
fold decisions are preserved verbatim and storage is only consulted for
toggle blocks seen for the first time.

Fixes #13424

* fix(editor): bound and harden toggle fold state persistence

Fold state was stored under a localStorage key per toggle block id with
no bound on how many keys accumulate, and a write that failed silently
(quota exceeded, storage unavailable) left a stale value that the next
edit would re-fold from. Two complementary changes:

- Storage falls back to session storage when a write to the primary
  interface fails at runtime, so values at least survive the browsing
  session; reads prefer the fallback copy while it is the most recent
  successful write, and successful writes drop it again.
- Toggle fold state now lives in an LRUCache mirrored to local storage,
  capping the number of stored keys and evicting the least recently used
  fold states first. The persisted key format is unchanged so fold state
  continues to sync across tabs via storage events.

Follow-up to #13425, addressing the underlying feedback in #13424.

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: add development workflow best practices to CLAUDE.md

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(editor): rename persistTo option to storage in LRUCache

Rename the `persistTo` cache option to `storage` with a union type of
`"memory" | "localStorage" | "sessionStorage"` per review feedback.
The option is now required instead of optional; callers that only need
an in-memory cache pass `storage: "memory"`.

The private Storage instance field is renamed from `storage` to `store`
to avoid colliding with the new option name, and the mapping from
user-facing values to Storage constructor arguments is handled in
`hydrate()`.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(editor): eliminate redundant findBlockNodes scan in reconcileFoldState

The hot path for every local document change previously called
findBlockNodes twice on the same document — once in reconcileFoldState
and again in createDecorations.  Now reconcileFoldState collects the
blocks once and passes them directly to the decoration builder.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(editor): fix createDecorations signature to accept optional blocks parameter

The init and ACTION branches pass a NodeWithPos[] as the second argument,
which previously landed in the foldedIds parameter — a type error missed
due to missing tsc validation.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(editor): correct createDecorations argument order and NodeWithPos import

The createDecorations signature is (doc, foldedIds, blocks?) but both the
init and ACTION branches passed arguments in the old order (doc, blocks,
foldedIds). Because the Set is always truthy, the ?? fallback never fired
and buildDecorationsFromBlocks iterated over strings, crashing on
block.node.attrs. NodeWithPos is also not exported from findChildren.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(editor): address review feedback and fix CI

- Document the default-folded fallback for evicted blocks in the
  fold-state cache comment.
- Cast the Storage test mock through unknown so the type check passes.
- Provide in-memory web storage for the shared jsdom test project so the
  persistence tests run instead of crashing on a missing implementation.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(editor): scope storage fallback writes and drop unrelated changes

- Track keys mirrored to the storage fallback and clear only those,
  rather than clearing all of session storage
- Restore CLAUDE.md as a symlink to AGENTS.md
- Remove the unrelated scrollToNonce changes
- Make the fallback interface private and probe with a namespaced key

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2026-09-04 08:33:10 -04:00
Tom MoorandClaude Fable 5.1 899fb8a22e feat: Add Open Knowledge Format (OKF) export (#13644)
* feat: Add Open Knowledge Format (OKF) export

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Separate OKF frontmatter from body, use team URL for resource

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Use OKF initials avatar in export dialog

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Use GlobeIcon for OKF export format

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-04 08:15:07 -04:00
Tom Moor 1c3d1ed0a9 enhance: Keep editor find panel open (#13643) 2026-09-04 08:01:03 -04:00
Donghoon Yoo 24f36dae7e fix: Prevent overlapping nested list markers (#13584) 2026-09-04 07:55:04 -04:00
Tom MoorandClaude Fable 5.1 012188635b chore: Remove unused validation helpers and getDataTransferItems (#13632)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 20:29:37 -04:00
Tom MoorandClaude Fable 5 b17f2611bf chore: React 18 upgrade (#13559)
* 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>
2026-09-03 01:43:47 -04:00
Tom Moor 57c110dbe5 chore: Upgrade MobX (#13554)
* Upgrade Mobx

* fix: Enforce MobX action boundaries

* fix: Wrap static observable updates in actions

* Remove iteration tests
2026-09-02 20:31:37 -04:00
Translate-O-Tron 7483b23cb7 New Crowdin updates (#13539)
* 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 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 Swedish translations
2026-09-02 20:17:27 -04:00
Tom Moor 92af44f4b6 fix: preserve quoted tables during document patches (#13604) 2026-09-01 03:23:52 -04:00
Tom Moor 0a3851edb3 fix: Keep expanded code blocks open after undo (#13600)
* fix: Preserve expanded code blocks after undo

* refactor: Rename used editor state parameter
2026-09-01 03:14:41 -04:00
Tom Moor 2dfc26f14b fix: Provision OIDC users with locale claim (#13601) 2026-09-01 02:36:21 -04:00
Tom MoorandClaude Opus 5 d55e7f37e5 fix: Raise OAuth redirect_uris limit and log client errors (#13583)
Dynamic client registration rejected any client sending more than 10
redirect URIs. The limit is now 20, shared between the register and
update schemas, and the error reports how many were received.

OAuth client errors were swallowed without reaching logs or Sentry,
leaving a failing integration invisible beyond its status code. 4xx
responses are now logged with the reason.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-29 19:49:28 -04:00
Tom MoorandClaude Opus 5 d8d8f2fffe Support HEIC and HEIF avatar uploads with in-browser conversion (#13577)
* feat: Support HEIC avatar uploads with in-browser conversion

HEIC and HEIF images picked for an avatar are now converted to JPEG in
the browser before the cropper opens. The browser's own decoder is used
when it supports the format, otherwise a WebAssembly decoder is loaded
on demand.

Also collects the image utilities into an ImageHelper class, fixes the
crop dialog's submit button never disabling, and stops the upload from
forwarding request headers the browser controls itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* refactor: Use only the browser's own HEIC decoder

Drops the bundled WebAssembly decoder in favour of the browser's native
support. This removes an LGPL dependency and a 3MB lazy chunk, and lets
the Content Security Policy stay as it was.

Browsers without HEIC support now get a message asking for a JPEG or PNG.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: Add class-level JSDoc to ImageHelper

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 00:13:56 -04:00
Tom MoorandClaude Opus 5 f49b047648 feat: Convert @ prefixed Markdown links to mentions on server writes (#13403)
* checkpoint

* feat: Convert @ prefixed links to mentions on server Markdown writes

A Markdown link preceded by "@" now becomes a mention when brought in
through the documents API, MCP, or an import, so an exported mention
survives a round trip instead of degrading to a plain link.

The editor rule creates a generic mention carrying the href, and the
type of resource it points at is resolved by the plugin that recognizes
the URL through a new MentionProvider hook. Mentions of external
resources also serialize to their real URL rather than a mention:// URI,
so the reference resolves outside of Outline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: Escape values interpolated into rendered mention HTML

markdown-it leaves markup in a link label intact when html is disabled,
so the label and attributes are escaped before being written into the
tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 17:42:28 -04:00
Tom Moor 9dc74f4459 fix: Insert files dropped around the document at the nearest editor position (#13575)
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.
2026-08-27 17:11:56 -04:00
Tom MoorandClaude Opus 5 d2697d354e fix: Respect heading number preference in HTML export (#13563)
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>
2026-08-27 15:27:02 -04:00
Tom Moor ccbe2fa99b fix: Enforce import restrictions shadowed by nested oxlint configs (#13558)
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.
2026-08-24 23:02:31 +00:00
Tom MoorandClaude Opus 5 c34540e047 Add collection metadata line (#13538)
* 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>
2026-08-23 17:08:54 -04:00
Tom MoorandClaude Opus 5 84c40c8392 fix: Revision diff mismatching node closing tokens (#13537)
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>
2026-08-23 16:29:21 -04:00
Tom Moor d551ead073 feat: Filter DSL for collections.list (#13442)
* 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.
2026-08-23 16:03:10 -04:00
Tom Moor b5118fd4f2 Refactor multiplayer facade to spec (#13534) 2026-08-23 13:07:20 -04:00
Tom MoorandClaude Opus 5 f6ad3cb6e1 Improvements to mobile formatting toolbar (#13533)
* 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>
2026-08-23 11:20:30 -04:00
Translate-O-Tron 3104639945 New Crowdin updates (#13322)
* 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
2026-08-22 22:35:19 -04:00
Tom MoorandClaude 61f8ed9f49 fix: Crash opening document menu on mobile (#13526)
* 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
2026-08-22 18:17:02 -04:00
Tom MoorandClaude Opus 5 41616f73cc feat: Filter DSL for users.list (#13456)
* 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>
2026-08-22 10:47:32 -04:00
Tom MoorandClaude Fable 5 662bad7108 Add heading numbering display preference for documents (#13522)
* 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>
2026-08-22 09:44:42 -04:00
Tom Moor fa1b529bef Allow reordering sidebar sections by dragging their headers (#13505)
* wip

* Center reorder cursors between sections, detect empty sections with CSS

* Deduplicate persisted sidebar section order

* fix: Stricter zod type

* Remove DraggableSection unit tests
2026-08-21 21:09:13 -04:00
Tom MoorandClaude Fable 5 67b53220ce perf: Limit PWA precache and skip service worker on share views (#13519)
* 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>
2026-08-21 20:54:30 -04:00
Tom Moor 5ee3f1a5d9 perf: Refactor y-prosemirror loading (#13521)
* wip

* perf: Refactor y-prosemirror loading
2026-08-21 20:49:29 -04:00
Tom Moor e60dec32c2 Superellipse corners for menus, dialogs, and floating surfaces (#13520)
* Superellipse corner-shape utility for elevated surfaces

* Rename squircle helper to borderRadius, use block comment in CSS string
2026-08-21 19:36:11 -04:00
Tom MoorandClaude Opus 5 41e6daa623 fix: Unfurl GitLab epics (#13497)
* 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>
2026-08-19 23:55:26 +00:00
Tom MoorandClaude Opus 5 e7249cb138 fix: RangeError rendering a diff with sibling node modifications (#13496)
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>
2026-08-19 16:57:45 -04:00
Tom MoorandClaude Opus 5 46e4702406 fix: Ctrl+Left jumping to the start of a heading (#13494)
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>
2026-08-19 16:56:11 -04:00
Tom Moor 2a9ac3b456 Tighten how editor node and mark attributes are rendered (#13486)
* 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.
2026-08-19 08:06:48 -04:00
Tom Moor 8421c2b482 fix: RangeError restoring editor selection after focus (#13487)
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
2026-08-19 08:06:38 -04:00
Tom MoorandClaude Opus 5 0b44338a16 fix: Uncaught error handling messages from the diagram editor (#13483)
* 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>
2026-08-18 19:55:57 -04:00
Tom Moor 85ae9c2e0d fix: Code block with a null language makes the document impossible to open (#13482)
Fixes OUTLINE-CLOUD-C80
2026-08-18 19:23:29 -04:00
Tom MoorandClaude Opus 5 cc84d81aa5 fix: Correct open depths when unwrapping a single table cell on copy (#13479)
* 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>
2026-08-18 23:14:29 +00:00
Tom MoorandClaude Opus 5 e4905a97b8 feat: Filter the trash by who deleted an item and when (#13474)
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>
2026-08-18 08:33:58 -04:00
Tom Moor d43cb6dfce fix: Include nested documents when downloading a document (#13465)
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.
2026-08-17 08:08:21 -04:00
Tom MoorandClaude Opus 5 fb4ad4d046 perf: Keep FontAwesome icon packs out of the eagerly loaded bundle (#13463)
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>
2026-08-16 17:37:19 -04:00
Tom MoorandClaude Opus 5 eaad1a71dc React SSR editor nodes (#13113)
* 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>
2026-08-16 16:36:13 -04:00
Tom Moor a59a01cffe fix: Serialize external mentions as links in exported markdown (#13459)
* 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
2026-08-16 14:14:20 -04:00
Tom MoorandClaude Opus 5 7f54d5ea10 Re-authorize collaboration connections when access changes (#13454)
* 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>
2026-08-16 12:49:34 -04:00
Tom Moor cdc10b4564 fix: Crash when a remote edit arrives during a column resize (#13452)
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
2026-08-15 20:25:51 -04:00
Tom Moor 628615f9bc fix: Dragging text within an image caption corrupts the document (#13449)
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
2026-08-15 20:23:30 -04:00
Tom Moor df8f8848ef fix: Crash when pasting a single block into the document title (#13451)
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
2026-08-15 20:23:16 -04:00
Tom MoorandClaude Opus 5 4ed526626d fix: Editor fails to load on iOS Safari 15 (#13448)
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>
2026-08-15 19:13:04 -04:00