Commit Graph
3398 Commits
Author SHA1 Message Date
Tom Moor 36951f0032 feat: Align MCP server and OAuth provider with latest MCP spec guidance (#13961)
* feat: Align MCP server and OAuth provider with newer MCP spec recommendations

- Upgrade @modelcontextprotocol/sdk to 1.31.0
- Include iss in authorization responses and advertise support (RFC 9207)
- Include required scopes in the WWW-Authenticate challenge on /mcp
- Expose title, website and icons in the MCP server info
- Centralise issuer, scopes, grant types and client type mapping in OAuthHelper

* Remove OAuth authorization issuer changes
2026-10-05 19:54:22 -04:00
Tom Moor 6630ffcc5a fix: Improve collaboration connection lifecycle (#13949) 2026-10-05 08:52:14 -04:00
Tom Moor aaab59d8ca perf: Send statement timeout in the same round trip as transaction start (#13937)
* perf: Send statement timeout with the statement that begins a transaction

* chore: Upgrade pg to 8.23.0
2026-10-02 13:17:28 -04:00
Tom Moor a32e4aacd8 fix: Handle sign out events consistently across realtime services (#13936) 2026-10-02 09:45:46 -04:00
Tom Moor 7f3bc8e3d7 feat: Redirect root domain app links to the signed-in workspace (#13923)
* feat: Redirect root domain app links to the signed-in workspace

* fix: Treat non-object sessions cookie values as empty
2026-09-30 22:24:27 -04:00
Tom Moor 05ef55e38a fix: Re-authorize collaboration connections on document lifecycle events (#13899)
* fix: Invalidate collaboration connections on document lifecycle events

* fix: Invalidate descendant connections and handle unarchive
2026-09-29 07:58:43 -04:00
Tom Moor 722098edab fix: Allow CloudFront origin in CSP object-src (#13909) 2026-09-28 22:51:43 -04:00
Tom Moor 42f29a1a55 feat: Add plan-based feature entitlements (#13896)
* feat: Add plan-based feature entitlements

* feat: Gate audit log behind AuditLog entitlement

* Guard guests

* features
2026-09-27 09:40:50 -04:00
Tom Moor aacc98475d fix: Sync external groups with duplicate names accurately (#13894)
External providers can legitimately report several groups with the same
display name. Previously the second group failed the team-wide name
uniqueness check, or duplicates slipped through on creation and then
broke every subsequent sync with a validation error.

- Scope the group name uniqueness check by (team, externalId) so synced
  groups with different external ids can share a name while manually
  created groups remain unique among themselves
- Compare names with lower() equality instead of iLike so LIKE wildcards
  in names are not treated as collisions
- Stamp externalId on groups created by the syncer and backfill it on
  previously synced groups
2026-09-26 08:07:19 -04:00
Tom Moor d5bc88f893 perf: Memoize Prosemirror parsing in DocumentHelper (#13892)
Nodes are cached against the content or state they were parsed from, so
repeated helper calls on the same document parse it once. JSON transform
helpers now replace attrs instead of mutating them, as Node.toJSON shares
attrs with the cached node.
2026-09-25 20:57:58 -04:00
Tom Moor b6231f36c9 perf: Reduce query cost and reparsing in comments API (#13887)
* perf: Reduce query cost and reparsing in comments API

* perf: Join documents without default associations when listing comments

* refactor: Move comment listing into Comment.findAllForUser
2026-09-25 20:08:59 -04:00
Tom MoorandClaude Fable 5.1 abc47b442a feat: Sync group descriptions and re-sync groups on SSO validation (#13889)
* feat: Sync group descriptions and re-sync groups on SSO validation

- Sync group descriptions from group sync providers alongside names
- Lock name and description edits for externally synced groups at the
  API layer and in the edit dialog
- Move group sync into a SyncUserGroupsTask, scheduled from login and
  from ValidateSSOAccessTask after a fresh provider validation
- Add authenticationProviders.startGroupSync for providers that require
  an admin consent flow before group sync can be enabled

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

* fix: Make group sync setup generic and deduplicate sync jobs

- Expose groupSyncRequiresSetup from the provider list and use it in the
  settings scene instead of checking for the azure provider name
- Rename the setup redirect query param to groupSync
- Give SyncUserGroupsTask a job id per user authentication so concurrent
  syncs for the same authentication are not queued twice

* Use existing hook

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 19:49:26 -04:00
Tom Moor bc992fb22a refactor: Add jobId hook to BaseTask for deduplicating queued jobs (#13890)
* refactor: Add jobId hook to BaseTask for deduplicating queued jobs

* fix: Drop jobId from APIImportTask, it re-schedules itself while active
2026-09-25 23:44:16 +00:00
Tom Moor ed4aaf274d fix: Update group timestamp when membership changes (#13888) 2026-09-25 17:17:05 -04:00
Tom Moor 6509bf553b perf: Exclude documentStructure from collections.list query (#13886) 2026-09-25 07:42:47 -04:00
Tom Moor 018d386030 perf: Remove redundant queries from document API routes (#13884) 2026-09-25 07:16:04 -04:00
Tom Moor fcb5f7934d fix: Keep attachments private when S3 ACLs are disabled (#13867) 2026-09-23 18:56:59 -04:00
Tom Moor de33f87aea refactor: move revision and export logic out of commands (#13856) 2026-09-23 08:10:03 -04:00
Tom Moor ac48c91a7e feat: Accept text param in comments.update (#13854)
* feat: Accept text param in comments.update

* fix: Authorize before processing text in comments.update
2026-09-22 22:39:16 -04:00
Tom Moor 70ea374543 fix: Language detection stores nothing for Chinese, Arabic, Persian and other macrolanguages (#13833) 2026-09-21 20:35:45 -04:00
Tom Moor 18a7099e8f fix: Document search trigger fails when tsvector exceeds size limit (#13832)
* fix: Document search trigger fails when tsvector exceeds size limit

* test: Assert previous titles are indexed in the tsvector fallback
2026-09-21 20:31:34 -04:00
Tom Moor 5693562624 fix: Revisions sometimes attributed to the wrong user in collaborative edits (#13809)
* fix: Revision and document attribution to the wrong user in collaborative edits

Capture the editing user synchronously with each Yjs update and persist an
ordered, sequenced collaborator set in Redis so that snapshots and revisions
are attributed to the user who actually made the change.

* fix: Do not fail a committed save when the update event cannot be scheduled

* fix: Consume collaborator attribution when a revision is skipped as identical

* refactor: Add zlatestWithSequence to the Redis adapter
2026-09-20 14:05:50 -04:00
Tom Moor a7c1907aa6 Strip top-level domain from generated team subdomain (#13816)
* fix: Strip top-level domain from generated team subdomain

* Move subdomain generation into Team.findAvailableSubdomain and reuse in installation
2026-09-20 13:31:39 -04:00
Tom Moor 2f57a36d50 Validate awareness identity in collaboration service (#13804)
* Validate awareness identity against connection context

* Validate awareness messages on the sending connection

* Encode real removal states and isolate ownership check in tests
2026-09-19 13:24:35 -04:00
mehmet turac f9ae2dcd6d fix: Imported attachment keys end in "null" when no name is set (#13750)
uploadAttachments reads the name off alt for images and title for video
and attachment nodes. Both come through as null when the markup doesn't
set one, and String(null) is "null" - 4 chars, so the name.length !== 0
check passes and the node.type.name fallback never runs. getKey then
sticks "null" on the end of the key: uploads/<userId>/<uuid>/null.

Fall back to the node type before the String(). Left the length check in,
it still catches a whitespace-only name. Only hits importers on the
default shouldUploadAttachmentsPerPage(); markdown import opts out.
2026-09-19 10:51:53 -04:00
Tom Moor c17d2c52b3 fix: Patch edit mode drops content spliced inside container blocks (#13794)
* fix: Patch edit mode drops content spliced inside container blocks

* fix: Only join adjacent lists that share attrs other than start number
2026-09-19 09:16:52 -04:00
Tom Moor a27d1244a8 fix: Use xmax to detect inserted subscription in upsert (#13803) 2026-09-19 11:24:55 +00:00
Tom MoorandClaude Opus 5 4b4c7d3281 chore: React 19 upgrade (#13562)
* 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>
2026-09-18 22:22:50 -04:00
Tom Moor 7f00defd62 feat: Add archive and deletion reasons (#13784)
* feat: Add reasons for archived and deleted documents

* feat: Add deprecation reasons to archived collections

* fix: Refine deprecation reason display for readers

* feat: Accept reasons when archiving or deleting

* Support reasons in archive and delete MCP tools

* Fix placeholder after clearing content editable text

* Keep the caret before content editable placeholders

* Remove test

* feat: Add archive reasons to the confirmation dialog
2026-09-18 21:09:35 -04:00
Tom Moor ed7a1e9ffc fix: Validate custom theme colors (#13800) 2026-09-18 17:52:22 -04:00
Tom Moor 6ac407de84 chore: Run server tests with a shared module registry (#13799)
Adds a server-shared Vitest project with isolate disabled and moves every
server test into it by default. Files that mock or reset modules opt out
with a header marker and stay in the isolated project.

Restores env values that leaked between files: the test URL is reset after
each file, and tests that mutate env restore the previous value. The test
server no longer closes the shared sequelize pool.
2026-09-18 17:45:39 -04:00
Tom Moor 3c655d55a3 fix: Store group description on creation (#13791) 2026-09-18 08:00:03 -04:00
Tom MoorandClaude Opus 5 cc15b088ec feat: Show a toast with actions when a file download completes in the desktop app (#13769)
* Show toast with actions when a file download completes

In the desktop app a toast is now displayed when a file finishes
downloading, with the option to open the file or reveal it in the file
manager of the operating system.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kat47mueTm3CUZSbDVfBas

* Guard download bridge calls for older desktop apps

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kat47mueTm3CUZSbDVfBas

* Change protocol in dev for easier testing

* Use standard buttons stacked below the file name in download toast

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-17 19:36:47 -04:00
Tom Moor 324b2b94ef fix: Validate share id on public share endpoints (#13766)
* fix: Validate share id on shares.sitemap, shares.info, and shares.subscribe

Fixes OUTLINE-CLOUD-CWY

* test: Add regression tests for invalid share ids on shares.info and shares.subscribe

* test: Use an id that fails share slug validation and assert the message
2026-09-17 02:43:57 +00:00
Tom Moor 35fe31e56f test: Use unique subdomains in test factories to prevent sporadic collisions (#13765) 2026-09-16 22:39:25 -04:00
Tom Moor 85deb8934b Fix GitLab webhook integration updates (#13764)
* fix GitLab webhook integration updates

* support shared GitLab webhook credentials
2026-09-16 22:11:24 -04:00
brekenandInstinct Agent 0e054da71d fix(policies): let guests with edit rights duplicate documents again (#13717)
#13198 (9796407) moved the duplicate gate to team-level createDocument,
which guests and viewers can never hold - so the policy change silently
removed duplicate for guests with edit rights on the source document.
Allow duplicate when the actor can createDocument at team level
(members, preserves #13198) OR update the source (guests, the pre-1.10
capability); the destination collection is still authorized separately
in documents.duplicate. Includes the #13198 regression guard plus
guest positive/negative cases.

Fixes #13715.

Co-authored-by: Instinct Agent <agent@instinct.com>
2026-09-16 20:50:07 -04:00
Tom Moor f852339c57 fix: Remove source uploads after imports (#13757)
* fix: Remove source uploads after imports

* fix: Defer import upload cleanup

* fix: Initialize import cleanup state
2026-09-16 23:58:03 +00:00
Tom Moor 2d07783af7 Prevent the admin service from running in production (#13758)
* fix: Prevent the admin service from running in production

* clarify
2026-09-16 23:50:25 +00:00
Tom Moor 61aa3e43a7 fix: Clean up temporary upload files (#13752) 2026-09-16 19:01:19 -04:00
Tom Moor 0cda530e15 fix: Scope authentication matching to the signing-in provider (#13737) 2026-09-14 18:34:08 -04:00
Tom Moor ca9317f4cc fix: Clarify missing OAuth state errors (#13734) 2026-09-13 15:53:34 -04:00
Tom Moor 35dd15b971 Optimize documentCollaborativeUpdater by moving computations outside transaction (#13720)
* perf: shorten row lock held while persisting collaborative documents

The collaborative updater serialized the Y.js state and converted it to
ProseMirror JSON while holding a FOR UPDATE lock on the document row, and
loaded every column including the deprecated markdown text. Both the lock
wait on the SELECT and the subsequent UPDATE are the dominant source of
statement timeouts in production, and API document updates queue behind
the same lock.
2026-09-10 22:07:16 -04:00
Tom Moor b21174ccbf perf: Avoid N+1 query in share subscription notifications (#13719) 2026-09-10 10:11:11 -04:00
Tom Moor cd808bcd92 fix: serve service worker with no-cache header (#13716) 2026-09-09 12:00:22 -04:00
Tom MoorandClaude 68b912825c perf: Skip loading document body for authorization-only lookups (#13706)
Several high-traffic endpoints (views.create, views.list, comments.list,
relationships.list, subscriptions.list/info, events.list, pins.info,
documents.insights/users/documents) load a document purely to run a
policy check, yet fetched its full content, text and state columns on
every request. The read policy only inspects ownership, membership and
collection fields, so pass includeContent: false to use the existing
withoutContent scope. comments.list keeps the body only when anchor text
is requested, which is the sole consumer of it.


Claude-Session: https://claude.ai/code/session_017swPbmq4SwtkE15fcRhdcU

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-08 11:20:39 -04:00
Tom Moor 89a1da7ee6 fix: Allow viewers with collection write access to import documents (#13707) 2026-09-08 11:04:25 -04:00
Tom Moor 4c9e711b73 fix: Members receive authorization error when importing a document (#13696) 2026-09-07 14:58:58 +00:00
Tom Moor af2608536a fix: robots.txt disallowed crawlers on self-hosted installs (#13687)
Closes #13685
2026-09-06 22:44:49 -04:00
Tom MoorandClaude Fable 5.1 90f7091316 fix: Signed file downloads rejected when an API key lacks scope for the route (#13681)
* fix: Signed file downloads rejected when an API key lacks scope for the route

Adds a skip option to the auth middleware so routes authorized by other means can ignore credentials on the request, and applies it to signed file requests. Also maps the get method to the read scope.

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

* Restrict skip option to optional authentication

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 04:05:12 -04:00