* 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.
* 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>
* 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>
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.
* 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
* 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
* 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.
* 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
* fix: Preserve existing values when optional update fields are omitted
* chore: Rename setDefined to fill
* chore: Use fill in users.update and teamUpdater
* 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
* 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
* 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
* 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>
* 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.