Commit Graph
3376 Commits
Author SHA1 Message Date
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
Tom MoorandClaude Fable 5.1 7bd59ba1b3 fix: History "Current version" entry never finishes loading (#13669)
* fix: Current version history entry loads forever

Assigning the primary key on a built Revision is a silent no-op in
Sequelize, so revisions.info returned a random UUID instead of the
synthetic latest id the client waits for.

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

* fix: Apply policies from fetchLatest response

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-05 18:40:27 -04:00
Tom MoorandClaude Fable 5.1 a577d5c2c8 fix: Validate API key and OAuth scopes at the model layer (#13664)
* fix: Validate API key scopes with Sequelize-level validators

* test: Add API regression tests for duplicate OAuth redirect URIs

* fix: Preserve wildcard scope and guard non-string redirect URIs

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-04 23:10:32 -04:00
Tom MoorandClaude Opus 4.8 68981c0952 fix: Restrict views.create to session authentication (#13663)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-05 02:00:46 +00:00
Tom Moor 6a4e188ec7 fix: Align attachment upload permissions (#13654) 2026-09-04 18:33:35 -04:00
Tom Moor 6d94af2c85 chore: upgrade Zod and enable compilation (#13647) 2026-09-04 09:38:58 -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 948fca8800 fix: Guard missing response in error handler (#13637) 2026-09-04 05:05:13 -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 e26b7d8cba Add indexes on user foreign key columns (#13631)
* fix: Add index on documents.createdById

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

* fix: Cover remaining user foreign key columns in index migration

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

* fix: Limit index migration to at-scale tables

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-03 20:28:11 -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 MoorandClaude 33f2b93530 fix: Escape MCP attachment PUT upload command arguments (#13613)
Applies the same shell quoting introduced for the POST branch in #13597
to the presigned PUT branch, so user-supplied content type and filename
values cannot break out of the suggested curl command's quoting.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-02 19:20:53 -04:00
dependabot[bot]andTom Moor 182c60c696 chore(deps-dev): bump @faker-js/faker from 8.4.1 to 10.5.0 (#13618)
* chore(deps-dev): bump @faker-js/faker from 8.4.1 to 10.5.0

Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 8.4.1 to 10.5.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v8.4.1...v10.5.0)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  dependency-version: 10.5.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* faker.name -> faker.person

* chore: update vulnerable transitive dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2026-09-02 23:20:23 +00:00
Tom Moor 495f2a5830 perf: Use follower for exports (#13617)
* perf: Use follower for exports

* fix: Skip empty attachment queries in JSON exports
2026-09-02 23:06:15 +00:00
Tom Moor 8b799966b7 perf: move cleanup reads to follower (#13616)
* perf: run cleanup scans on follower

* perf: move document cleanup reads to follower
2026-09-02 19:02:57 -04:00
Tom Moor 9e6b98e12b perf: limit document search trigger updates (#13615) 2026-09-02 09:10:21 -04:00
Tom MoorandClaude Fable 5.1 b2a1e10e48 Batch large table deletes in teamPermanentDeleter (#13610)
* fix: batch large deletes in teamPermanentDeleter to shorten lock time

Delete events, collections, and documents in batches of ids outside the
final transaction so row locks are held briefly instead of for the whole
team deletion, which blocked the hourly old-events cleanup for hours.

* fix: type batched destroy helper structurally

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

* fix: guard whole team deletion with a non-blocking mutex

Move the concurrency guard from the final transaction to the whole
routine so a second worker skips before running the batched deletes.

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 06:12:12 -04:00
Tom Moor d9f78bbeb1 fix: Deadlock on cleanup task retry (#13598)
* fix: Deadlock on cleanup task retry

* Add transaction advisory lock around team deletion
2026-09-01 08:51:00 -04:00
Tom Moor 92af44f4b6 fix: preserve quoted tables during document patches (#13604) 2026-09-01 03:23:52 -04:00
Tom MoorandClaude Opus 5 9d29580e7f fix: Apply document download policy to revision export (#13603)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 03:14:30 -04:00
Tom Moor 22a1e1d45b fix: Match PWA chrome to active theme (#13599) 2026-09-01 02:36:30 -04:00
Tom Moor f44fad4380 fix: Preserve MCP attachment form values (#13597)
* fix: Preserve MCP attachment form values

* fix: Escape MCP attachment form arguments

* fix: Support current TypeScript library target
2026-09-01 02:12:39 -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