Commit Graph
3609 Commits
Author SHA1 Message Date
Tom Moor e6a79000cd fix: Refuse to load state of another generation and lock editor during reset 2026-11-13 23:46:20 -05:00
Tom Moor d29bd1c788 feat: Flatten collaborative state of large documents
Replace edit history in large collaborative state with fresh state once a
document is idle with no open sessions, and when state is over the maximum
length on save. Each replacement increments a state generation that is part of
the collaboration room name, so old state never merges into the new state.
2026-11-13 22:52:37 -05:00
Tom Moor 2206588aa8 feat: Expiry column and expiry menu for shared links (#14579)
* feat: Expiry column and expiry menu for shared links

Adds an Expires column to the shared links table and a Set expiry submenu
with presets, a custom date dialog and removal. Also loads document
memberships in shares.list so the update policy is correct.

* fix: Hide share expiry menu when workspace sharing is disabled

* refactor: Load share document memberships in the list query
2026-11-13 09:29:30 -05:00
Tom Moor 587c211f57 fix: Do not overwrite canceled or finished imports from import tasks (#14578) 2026-11-13 08:40:05 -05:00
Tom Moor 8df9c854fa fix: Error imports that have nothing to import (#14577)
An import with no input, or a Notion import with no shared pages, stayed in an active state with no tasks. This blocked new imports for the team until the creator canceled it.
2026-11-13 08:33:36 -05:00
Tom Moor 6fd7eb7cf0 chore: Share import state lists from the Import model (#14575) 2026-11-13 08:05:13 -05:00
Tom Moor 4fd8b0731e fix: Limit archive contents read during imports (#14576) 2026-11-13 08:04:58 -05:00
Tom Moor e0895fc548 Refine authentication token handling (#14572) 2026-11-12 23:00:42 -05:00
Tom Moor 97055b2d80 chore: Split server/routes/index.ts into focused routers (#14556)
Move static assets, shares, embeds and the app catch-all into their own
routers, and extract workspace redirect and render option logic so the
index file only composes middleware in order.
2026-11-12 21:52:06 -05:00
Tom Moor 2276ee2ecb Set lock_timeout on request transactions (#14563)
* Set lock_timeout on request transactions

Lock waits in API transactions now fail after 5s with a 503 instead of
holding a pool connection until the statement timeout.

* Map query timeouts to request_timeout in batch sub-requests
2026-11-12 21:51:48 -05:00
Tom Moor 631114129e perf: Lock only the target row in locked queries with joins (#14564) 2026-11-12 21:48:14 -05:00
Tom Moor ecb27a7132 fix: Scope import attachment queries to the importing team (#14557) 2026-11-12 19:06:15 -05:00
Tom Moor f04a300bed perf: Add index for inherited group permission lookups (#14560) 2026-11-12 19:05:44 -05:00
Tom Moor e262f3bd17 perf: Add partial createdAt index for stuck import task scan (#14565) 2026-11-12 18:59:43 -05:00
Tom Moor d066c98bde fix: Remove vestigial done flag from document updates (#14561)
Creating a revision immediately when the user clicks Done raced the collaboration server's save debounce, producing a stale revision followed by a second one and duplicate Slack notifications.
2026-11-12 18:57:50 -05:00
Tom Moor 72a72dc735 fix: Popularity score update blocks inserts that reference documents (#14558)
* fix: Use FOR NO KEY UPDATE when locking documents for popularity scores

* test: Cover popularity update with a key share lock held
2026-11-12 18:55:35 -05:00
Tom Moor f95761dddf perf: Use FOR NO KEY UPDATE where locked rows are only updated (#14559)
* perf: Use FOR NO KEY UPDATE where locked rows are only updated

Rows that other tables reference by foreign key are now locked with
FOR NO KEY UPDATE when the transaction only updates or soft-deletes
them, so concurrent inserts that reference the row are not blocked.

* test: Collaborative save does not wait for foreign key inserts
2026-11-12 18:54:37 -05:00
Tom Moor 7a90ee5887 fix: Run MCP document updates in a transaction (#14562) 2026-11-12 18:53:24 -05:00
Tom Moor 64be91604f Adjust S3 upload policy fields (#14567) 2026-11-12 18:52:28 -05:00
Tom Moor fbb78cd2b0 chore: Tighten error reporting payloads (#14568) 2026-11-12 18:45:47 -05:00
Tom Moor f8446a3c78 fix: Tighten session token validation order (#14542)
* fix: Tighten session token validation order

* test: Rename signature test
2026-11-12 09:48:13 -05:00
Tom Moor 291ec67243 fix: Record document title on documents.delete audit event (#14530) 2026-11-11 15:48:02 -05:00
Tom Moor 713a2b511d fix: Show nested shared documents under their shared parent in sidebar (#14526)
* fix: Show nested shared documents under their shared parent in sidebar

* fix: Select shared roots from ancestor grants, ignore stale cached trees

* Revert ancestor walk in membership list queries
2026-11-11 08:27:50 -05:00
Tom Moor aa454033ec fix: Keep callouts and rules nested when serialized to Markdown (#14528)
* fix: Keep notices and rules nested in lists and quotes when serialized to Markdown

* fix: Keep the blank line above notices and rules, written per line
2026-11-11 08:09:35 -05:00
Tom Moor f480f96089 fix: Consistent document filtering in trash list (#14527)
* fix: Apply draft visibility to trash list

* fix: Include group memberships in draft visibility
2026-11-11 07:51:33 -05:00
Tom Moor a40198a97d feat: Add expiry dates for public share links (#14513)
* wip

* fix: Treat null expiresAt as no expiry when creating a share

* fix: Add bottom padding to share notices
2026-11-09 22:29:49 -05:00
Tom Moor a7b1d8050e fix: Run team deletions one at a time (#14517) 2026-11-09 21:43:30 -05:00
Tom Moor afb5314825 chore: Replace oy-vey with native React rendering (#14495) 2026-11-08 08:23:26 -05:00
Tom MoorandClaude f680d5dec9 feat: Display links, documents and collections as preview cards (#14511)
* feat: Display links as preview cards

Adds a display attribute to mentions so a link can render either inline
or as a card with image, title and description from its unfurl. Pasting
a URL offers a "Card" option, and selecting a link mention shows a
toolbar to switch between the two displays.

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

* feat: Arrow key selection, full width and Return for link cards

Cards fill the document width, hide the blank line below them, are selected
by the up and down arrow keys like images, and Return on a selected card
adds a paragraph below it.

* feat: Display document and collection mentions as cards

Document and collection mentions can be switched to a card from the
selection toolbar. Document cards show the summary, collection and the
first image larger than 100x100. Collection cards show the first line of
the description. On public shares the preview image is signed, as the
share page already signs the attachments of that document. Card images
are hidden until they load and removed if they fail.

* feat: Keep mention cards through Markdown

The card display is written as the link title, so URLs are not changed.
Document and collection cards are written as @ links to their id and
parsed back into mentions.

* refactor: Move mention cards to their own file

Document cards show the collection after the title instead of below it.

* fix: Address review feedback on mention cards

- Include the share id in the document card unfurl URL for root shares.
- Return on a card in a heading adds a paragraph.
- URL cards keep their URL in Markdown, and the server does not narrow
  their type.
- Unfurl results apply to the current node, not the node at first render.
- Collection card descriptions stop at the first line break.

* refactor: Reuse existing helpers for mention cards

- Sign the preview image with TextHelper.attachmentsToSignedUrls.
- Check document and collection ids with isUUID.
- Return lines from getFirstText without changing an input array.

* fix: Preserve JSON output for inline mentions

* refactor: Centralize mention selection classes

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 08:11:31 -05:00
Tom Moor 48db71c351 fix: Tighten document policy checks for personal collections (#14510) 2026-11-07 08:17:29 -05:00
Tom Moor 3f1540832d fix: Connect ephemeral Redis client before services start (#14507) 2026-11-06 21:57:42 -05:00
Tom Moor a518799e9a fix: Flaky audit events test when timestamps tie (#14508) 2026-11-06 21:45:54 -05:00
Tom Moor 6aec14ca6b fix: Return inherited shares for documents without their own share (#14506) 2026-11-06 19:52:15 -05:00
Tom Moor 6d76dfb056 fix: Remove child document pins when moved to another collection (#14503) 2026-11-06 18:43:43 -05:00
Tom Moor 0caebe9cc3 fix: Correct grammar and US spelling in translation strings (#14504) 2026-11-06 18:41:23 -05:00
Tom Moor 9168ec31ab perf: Use fast-deep-equal in DocumentHelper.isContentEqual (#14501) 2026-11-06 18:28:04 -05:00
Tom Moor 2c3bff81e1 fix: Handle repeated framing headers in embed check (#14492)
* fix: Handle repeated framing headers in embed check

* fix: Only honor the first frame-ancestors directive in a CSP policy
2026-11-06 18:27:51 -05:00
Tom Moor beb5692da8 chore: Vendorize koa-useragent (#14496) 2026-11-06 18:10:03 -05:00
Tom Moor fe50488c97 feat: Allow selecting a destination when importing (#14486)
* feat: allow selecting import destination

* fix: address import destination review findings

* feat: multi-step import dialog with workspace root location

- Import dialog is now upload then location, the same height as the move dialog
- Document explorer lists the workspace as the root and marks the selected row
- A document export with a sibling folder merges into one document, or becomes
  the collection overview when creating new collections
- Destination document checks now rely on the createChildDocument policy

* fix: delete archived imported documents and read legacy task inputs

- Deleting an import now removes the children of archived imported documents
- Tasks queued before the rename to rootExternalId are still assigned correctly
2026-11-06 08:05:31 -05:00
Tom Moor d8667e4b19 fix: Record passkey, OAuth client and invite events in the audit log (#14485)
* fix: Record passkey, OAuth client and invite events in the audit log

- Add passkeys.*, oauthClients.*, documents.unpublish,
  webhookSubscriptions.update and users.invite_accepted to AUDIT_EVENTS.
- users.invite_accepted was never emitted: the invited check ran after
  sign-in had set lastActiveAt, and email sign-in did not emit it at all.
  It also had no actor or team. Invited users signing in with SSO receive
  their welcome email again, and webhooks for this event start firing.
- passkeys.create had no actor or team as auth routes have no API context.
- Record the name on update and delete events where it is otherwise lost,
  the title on documents.unpublish, and mark OAuth client secret rotations.

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

* fix: Attribute invite_accepted to the invitee, not the browser session

Auth routes parse an optional cookie session, and createFromContext prefers
that user over the provided defaults, so accepting an invite in a browser
with another session recorded the wrong actor and team.
2026-11-06 08:05:18 -05:00
Tom Moor 5c77677c27 fix: Stop retrying imports of zip files with no content (#14484) 2026-11-05 21:25:14 -05:00
Tom Moor 4b6512de51 fix: Use exact email match when linking accounts on sign-in (#14461) 2026-11-04 21:30:28 -05:00
Tom Moor e21d1ed8d4 fix: Linear time whitespace and bracket handling in markdown serializer (#14460) 2026-11-04 20:28:57 -05:00
Tom Moor eff1a43d9b fix: Keep serving requests when Redis is unavailable (#14457)
* fix: Fail fast on Redis for cache and rate limits, lock migrations in Postgres

* fix: Use the fail-fast Redis client for locks

* fix: Require a database pool of at least two connections

* chore: Rename cache Redis client to ephemeralClient
2026-11-03 08:45:56 -05:00
Tom Moor fb2f0e76d1 fix: Prevent Notion imports looping forever (#14456)
* fix: Prevent Notion import looping on self-referencing pages

* fix: Stop import tasks once the import has finished
2026-11-03 08:27:14 -05:00
Tom Moor f0401f83e7 chore: Remove unnecessary URL parsing (#14454) 2026-11-02 21:14:53 -05:00
Tom Moor 133fba4dd0 feat: Show workspace chooser on root domain for multiple sessions (#14013)
* feat: Show workspace chooser on root domain when signed in to several workspaces

* chore: Update translation strings
2026-11-02 20:34:02 -05:00
Tom Moor 6d7cd455e9 chore: Decouple core plugins (#14340)
* chore: Move plugin-specific integration code into plugins

Core no longer imports from or names the settings of individual plugins.
Plugins now register mention providers, issue status icons, instance URLs,
settings keys, settings and import schemas, and OAuth clients through hooks.

* fix: Recompute embed instance URLs after plugins load and match legacy issue icons by URL

* fix: Skip logo upload jobs queued without a settings path

* chore: Choose issue status icons from the unfurl state
2026-11-02 19:42:48 -05:00
Tom Moor de8952d80b fix: Do not report writes to a closing websocket (#14446)
Fixes OUTLINE-CLOUD-DAD
2026-11-02 08:42:01 -05:00
Tom Moor b3eeaea035 perf: Run independent awaits concurrently on hot paths (#14445) 2026-11-02 08:07:25 -05:00