443 Commits
Author SHA1 Message Date
Tom Moor 41abdbec3f Add upsell settings pages for paid plan features (#14631)
* Add enterprise upsell plugin with placeholder settings pages

Introduces a new client-only `upsell` plugin that surfaces Enterprise-only
features as placeholder settings pages in the community edition, encouraging
self-hosted users to upgrade. The plugin is gated to non-cloud deployments
since the cloud edition already ships these features.

Adds:
- UpsellScene: a reusable upsell page (header, pitch, upgrade CTAs, and a
  preview of the locked settings).
- UpsellSettingRow: an upsell variant of SettingRow that renders an
  Enterprise-only setting in a locked, non-interactive state.
- EnterpriseBadge: a small badge denoting Enterprise-only features.
- Placeholder pages for Audit Log, Data Attributes, and Glean.
- A pricing URL on UrlHelper for the upgrade call to action.

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

* Add Security upsell rows and Collections upsell page

Surfaces more Enterprise-only features in the community edition:

- Adds locked upsell rows to the Security settings page for two-factor
  authentication, automatic sign-out, and an IP allowlist. These only render
  on self-hosted instances, where the real settings are not available.
- Adds a Collections placeholder page to the upsell plugin advertising
  workspace-wide collection administration.

Relocates the shared EnterpriseBadge and UpsellSettingRow components from the
plugin into app/scenes/Settings/components so core settings pages and the
plugin can both consume them without inverting the app/plugin dependency.

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

* Show plan requirement on upsell pages and sidebar

Replace the placeholder Enterprise rows with a single callout that names the
minimum plan for each feature, mark upsell items in the settings sidebar with
a muted lock, and sync PlanHelper with the plan entitlements.

* Hide entitled upsells, show Glean upsell, fix billing link

* Render upsell for settings pages without the entitlement

Settings items can declare the plan feature they need. Without it, the page
shows the upsell scene in place of the real one, and upsell plugin
placeholders give way to a real page for the same feature.
2026-11-20 08:29:16 -05:00
Tom Moor c7955616fe fix: Respect unsubscribe for invite accepted emails, use workspace language (#14640) 2026-11-18 19:06:39 -05:00
Tom MoorandClaude Opus 5.5 f9d995e6f1 perf: Add cached Integration.findEnabledByTeamIdAndService lookup (#14635)
* perf: Add cached Integration.findEnabledByTeamIdAndService lookup

Caches a lightweight projection of a team's integrations for a service in
Redis so event processors can cheaply check whether a team uses a service,
e.g. from shouldQueue, before creating a job. The cache is invalidated after
commit by model lifecycle hooks.

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

* chore: Remove comment from Integration cache invalidation

* perf: Skip queueing Slack jobs for teams without a matching post integration

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 08:20:15 -05:00
Tom Moor 4fca2ebc32 chore: Replace fixed sleeps and raised timeouts with signals (#14624) 2026-11-17 19:22:04 -05:00
Tom Moor 6ece062b8c perf: Fetch Notion pages in an import task in parallel (#14612)
* perf: Fetch Notion pages in an import task in parallel

* fix: Settle all Notion page fetches before failing an import task
2026-11-16 23:46:43 +00:00
Tom MoorandClaude 9ea360995f feat: Optimistic model saves with rollback on failure (#14593)
* feat: Make model.save() optimistic with rollback on failure

Apply saved params to the model immediately so MobX observers update
without waiting for the server, and roll the model back to its previous
state when the request fails. New models with a client-generated id are
optimistically added to the store and removed again on failure.

* chore: Apply formatter and test naming convention

* fix: Scope optimistic saves to passed fields and confirmed values

Only fields passed to save() are applied optimistically, and a failure
reverts a field only while it still holds the optimistic value. Change
hooks compare against the last confirmed values so they run when the
server responds. The optimistic store add is removed.

* refactor: Use optimistic save for preferences and field toggles

Add savePreference to User, Team and Document, and pass changed fields to
save() so they revert on failure.

* fix: Only compare incoming fields against confirmed values in change hooks

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 09:26:55 -05:00
Tom Moor 4fd9b60400 fix: Fetch Azure profile photo in UploadUserAvatarTask instead of during login (#14584) 2026-11-13 18:15:55 -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 7a87534789 chore: Replace Gitbeaker with a small GitLab API client (#14548)
* chore: Replace Gitbeaker with a small GitLab API client

* test: Cover GitLab token refresh
2026-11-12 22:11:39 -05:00
Tom Moor 77f2d88416 fix: Tighten passkey challenge handling (#14571) 2026-11-12 22:08:47 -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 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 b3555dddfe fix: Improve webhook delivery response handling (#14541) 2026-11-12 09:50:35 -05:00
Tom Moor dbef6ba847 fix: Explain local storage permission errors with the process uid (#14525)
* fix: Explain local storage permission errors with the process uid

* fix: Check execute permission on local storage directory
2026-11-11 07:09:36 -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 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 17b7e0389b fix: Limit GitLab description length in unfurl previews (#14459)
* fix: Limit GitLab description length in unfurl previews

* fix: Strip blocks left open by description truncation
2026-11-04 19:41:15 -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 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 a9d4f34e09 fix: Do not report Iframely request failures to Sentry (#14449) 2026-11-02 17:14:33 -05:00
Tom Moor 91bf8f5f6d fix: Notion importer ignores Retry-After when rate limited (#14435)
* fix: Respect Notion Retry-After and pause client on rate limit

* fix: Honor full Retry-After and pause client when retries are exhausted
2026-11-01 08:23:04 -05:00
Tom Moor bd7fc38ddb feat: Generate Pinyin slugs for Chinese document titles (#14375)
Slugs are now generated only on the server, which lazily loads pinyin-pro.
The client reads the path from the API rather than computing it.
2026-10-31 11:12:24 -04:00
Tom Moor 32b0f94d5a fix: Prefer OIDC provider record matching the configured hostname (#14389)
* fix: Prefer OIDC provider record matching the configured hostname

* test: Cover OIDC provider identifier resolution
2026-10-29 17:58:28 -04:00
Tom Moor 9fe0c7ba2b fix: Preserve existing values when optional update fields are omitted (#14344)
* fix: Preserve existing values when optional update fields are omitted

* chore: Rename setDefined to fill

* chore: Use fill in users.update and teamUpdater
2026-10-26 17:29:17 -04:00
Tom Moor 9aad5a4bb7 feat: Add Gitea / Forgejo integration (#14336)
* feat: Add Gitea integration for issue, pull request, and repository previews

* fix: Gitea repository previews and request deadlines

Refresh the token before repository discovery, keep repository previews when
the issue tracker is disabled, and keep the request timeout active while the
response body is read.

* chore: Use the shared fetch timeout for Gitea requests

* chore: Mention Forgejo in Gitea copy and reuse the callback URL helper

* Remove service specific getters in IntegrationsStore
2026-10-25 18:04:04 -04:00
Tom Moor 71af4d6901 fix: Require GitHub account ownership when connecting an installation (#14323) 2026-10-24 18:52:43 -04:00
Tom Moor 0d13c183fd chore: Add lint rules for test conventions (#14318) 2026-10-24 14:09:36 -04:00
Tom Moor b72f11b01e chore: Enforce more codebase conventions with lint rules (#14310)
* chore: Enforce more codebase conventions with lint rules

Add lint rules for request.origin, deferred useLocation reads, # private
members, lodash and date-fns subpath imports, and button types. Fix the
existing violations.

* fix: Only flag useLocation reads in event handlers and useCallback

* test: Use a fixed member name in users.list name query test
2026-10-24 13:23:25 -04:00
Tom Moor f43614713e perf: Replace keyspace SCAN with single-key cache deletes after commit (#14279)
* perf: Use single-key cache deletes after commit and add afterCommit helper

* fix: Await notification event scheduling without a transaction
2026-10-24 09:07:19 -04:00
Tom Moor 647963d507 fix: Tighten user matching in Slack hooks (#14272)
* fix: Tighten user matching in Slack hooks

* test: Cover linked account lookup in Slack hooks

* test: Fix linked account fixture type
2026-10-24 03:03:22 +00:00
Tom Moor eb290040a1 fix: Make email matching across sign-in providers opt-in (#14270) 2026-10-23 22:21:12 -04:00
Tom Moor cfdb04e3e2 test: Stay under webhook limit in webhookSubscriptions.list test (#14259) 2026-10-22 23:44:31 -04:00
Tom Moor a471da36f2 feat: Name desktop app passkeys by platform with matching icon (#14242)
* feat: Name desktop app passkeys by platform with matching icon

* fix: Only apply desktop passkey name to platform authenticators
2026-10-22 18:31:55 -04:00
Tom Moor 0454badbf6 fix: Scope linked account settings in integration presenter to the owner (#14233) 2026-10-22 08:02:23 -04:00
Tom Moor cf578accf9 chore: Consistent policy checks in integration callbacks (#14221) 2026-10-22 07:27:12 -04:00
Tom Moor f92be38e7b chore: Replace deprecated @octokit/webhooks-types with @octokit/openapi-webhooks-types (#14203) 2026-10-21 18:19:10 -04:00
Tom Moor 1b4171b4de perf: Wait for summary in SlackProcessor only after cheap checks pass (#14188) 2026-10-20 23:24:22 -04:00
Tom Moor e0db189e53 feat: Run passkey login inside the desktop app (#14180)
* Run passkey login inside the desktop app when supported

Desktop apps that configure a platform authenticator expose
isPasskeySupported on the bridge. When available, the WebAuthn ceremony
runs in the app instead of the system browser. If it fails, the user can
still use a passkey from their browser.

* Name passkeys registered in the desktop app

The Chromium Touch ID authenticator reports the same AAGUID as any
Chromium browser, so passkeys from the desktop app were named
"Chromium Browser".

* Allow more than one passkey from the Chromium authenticator

The Chromium Touch ID authenticator reports the same AAGUID on every
device, so users could not register the desktop app on a second Mac.

* Disable adding passkeys in desktop apps without passkey support
2026-10-20 22:57:37 -04:00
Tom Moor 4e52850527 feat: Include collectionId in comment webhook payloads (#14176) 2026-10-20 18:04:14 -04:00
Tom Moor 2f68f32b40 fix: Polish UI copy, casing, and punctuation (#14144)
* fix: Polish UI copy, casing, and punctuation across the app

* fix: Remove duplicate period in API key scope hint
2026-10-19 09:05:24 -04:00
Tom Moor d97c4baad2 perf: Cache permanent Iframely errors for an hour (#14134)
* perf: Cache permanent Iframely errors for an hour

* perf: Cache permanent Iframely errors for a day
2026-10-18 23:57:19 +00:00
Tom Moor 84e8d9e70c chore: Name unfurl plugins for tracing (#14136) 2026-10-18 18:28:20 -04:00
Tom MoorandClaude Opus 5.5 5647621224 chore: Prune redundant comments and type suppressions (#14124)
* chore: Prune redundant comments and normalize lint directives

Removes comments that restate the following line and stale TODOs, drops
the passive event listener feature check now that all supported browsers
support it, and renames eslint directives to oxlint.

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

* fix: Evaluate restricted team domains at validation time

The restricted email provider list was captured when the model loaded, so
it could not follow the hosting environment and the tests that covered it
never reached the model.

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

* chore: Replace type suppressions with accurate types

Adds a Concrete helper type for registries of abstract classes, declares
missing Sequelize and refractor typings, uses public ProseMirror APIs, a
typed mock context helper in middleware tests, and a StaticLink component
for sidebar rows being edited.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 17:07:39 -04:00
Tom Moor dc6e05aab1 Tidy settings sidebar and AI settings page (#14111)
* chore: Tidy settings sidebar and AI settings page

* fix: Accessible names for theme select and MCP switch
2026-10-17 08:43:44 -04:00
Tom Moor be75e8e0a8 fix: Resolve Slab cross-links and import Slab-hosted attachments (#14109)
* fix: Resolve Slab cross-links and import Slab-hosted attachments

Slab exports links between posts as absolute URLs and file attachments as
signed links, so both stayed pointing at Slab after import. Post links are
now matched to imported documents by slug (or by label for id-only mention
links) and Slab-hosted file links become attachments that are re-hosted.

Also fixes concurrent mention transforms assigning different ids to the
same not-yet-imported document.

* fix: Address review feedback on Slab link and file conversion

Prefer exact slug matches and leave ambiguous slugs unresolved, convert
file links in headings, and keep a toggle's leading text block so its
attachments are still converted.
2026-10-16 17:23:13 -04:00
Tom Moor a717cb0645 fix: Retry Postgres search as a quoted query when there are no results (#14104)
* fix: Retry Postgres search as a quoted query when there are no results

* fix: Keep urls, length and stop words correct in quoted search retry
2026-10-15 23:07:59 -04:00
Tom Moor eceba73a14 chore: Upgrade koa-helmet to v9 and koa-body to v8 (#14046)
* chore: Upgrade koa-helmet to v9 and koa-body to v8

* fix: Keep decimal parsing for pagination limit and offset
2026-10-16 02:11:11 +00:00
Tom Moor 51e4b5864d fix: Resolve Slack user for Post to Channel action (#14095) 2026-10-15 21:14:14 -04:00
Tom MoorandClaude Opus 5.5 9e2565184e chore: Prune stale comments, TODOs, and type suppressions (#14092)
* chore: Remove unused lint disable directives

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

* chore: Replace TODO type suppressions with typed code

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

* chore: Remove obsolete workaround comments in tests and MediaDimension

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

* chore: Remove Tippy compatibility props from Tooltip

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

* chore: Decouple DropdownMenu props from Tooltip and clarify sharing styles

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

* chore: Remove stale retention TODOs from cleanup tasks

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

* chore: Register relations synchronously and clarify workaround comments

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

* chore: Replace Notion import TODOs with descriptive comments

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 08:54:37 -04:00