* 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: Smaller locale files, start i18n with stored user language, preload locale
* fix: Set spellchecker when locale is unchanged, match lng from allowlist
* refactor: Type-safe locale cache keyed by supported language
* Remove locale preload
* fix: Ignore unsupported languages in changeLanguage
* 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
* 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
* feat: Allow document links to suppress view recording
Adds a suppressView query parameter that prevents a view from being
recorded when a document is opened, removing it from the URL afterwards
so that copied links record views as normal.
* refactor: Use useConsumeQueryParam to read suppressView
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* 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>
* feat: Support OAuth Client ID Metadata Documents for MCP clients
MCP clients can send an https URL as their client_id. The server fetches
the metadata document at that URL and caches one team-less client row per
URL, so MCP works on the root domain without dynamic registration.
Closes#14010
* fix: Address review findings for client ID metadata documents
- Only count unexpired tokens when cleaning up metadata document clients
- Reject backslashes, whitespace and trailing host dots in client_id URLs
- Strip trailing dots before installation host comparisons
- Type clientSecret as nullable
* fix: Keep OAuth clients with pending authorization codes during cleanup
* refactor: Simplify client ID metadata document handling
- Gate metadata document fetches on the MCP preference inside the helper
- Add isMCPClient getter and a shared client ID prefix constant
- Enforce the team/metadata document CHECK in both directions
- Index oauthClientId on OAuth token and code tables
- Reuse parseDomain, clamp and time helpers
* revert: Remove pending authorization code check from OAuth client cleanup
* fix: Block all special-use addresses when fetching client metadata documents
ALLOWED_PRIVATE_IP_ADDRESSES no longer applies to client ID metadata
document requests (draft -02 section 8.6). The fetch wrapper takes an
allowIPAddressList option to override the environment list.
* fix: Reject empty userinfo in client metadata document URLs
https://@host and https://:@host have a userinfo component that the URL
parser drops, so check the raw authority (draft -02 section 3).
* fix: Accept a root path in client metadata document URLs
Draft -02 section 3 marks a root path as NOT RECOMMENDED, not invalid, so
https://example.com/ is a valid client_id. A URL with no path is still
rejected.
* fix: Reject client metadata documents with private key material
A jwks key with private or symmetric members (d, p, q, dp, dq, qi, oth,
k) makes the document invalid, so it is not cached (draft -02 section 4.1).
Public keys are still ignored.
* fix: Respect no-cache, no-store and Age for client metadata documents
no-store and no-cache now expire the cached document at once, so it is
fetched again before the next authorization. Freshness from max-age or
Expires (measured from Date) is reduced by Age before clamping (draft -02
section 5.2).
* feat: Copy DCR and CIMD client logos to file storage in the background
logo_uri was rendered directly on the consent screen, which lets the logo
host track users and change the image at any time (draft -02 sections 8.8
and 9.2). A background task now fetches the logo with the strict fetch
rules, accepts only PNG, JPEG, GIF and WebP by their leading bytes, and
stores it content addressed in the public bucket. Requests never wait for
the upload.
* fix: Match loopback redirect URIs on any port
Native apps such as Claude Code register http://localhost/callback and
then listen on a free port, so an exact match rejected them. Loopback
redirect URIs now match on any port (RFC 8252 section 7.3); the scheme,
host and path must still match, and other URIs still match exactly.
* fix: Only break the redirect URL mid-word on the consent screen
break-all on the whole notice split words such as "continue" in the
loopback warning. It now applies only to the redirect URL.
* chore: Shorten the loopback warning on the consent screen
* fix: Show the punycode host of client metadata documents on the consent screen
A lookalike Unicode host was shown as written. Hostnames now come from a
shared getHostname helper that returns the punycode form.
* refactor: Move image type detection to ImageHelper and use it for avatars
Avatars and integration logos copied from a URL are now stored only if
they are PNG, JPEG, GIF or WebP, with the content type detected from the
file data rather than the remote host.
* fix: Address review findings for OAuth client logos and metadata caching
- Count the time since the Date header as age when caching metadata
documents, so a document is not cached past its Expires time
- Log logo scheduling failures instead of failing registration requests
- Run dynamic client registration in a transaction
- Delete copied logos from storage when no client uses them
* fix: Store one logo per OAuth client and return a distinct metadata document error
- Logos are stored per client, so a file is only deleted when its own
client stops using it. This removes the reference count and its race.
- A metadata document that cannot be fetched or is invalid now returns
invalid_client_metadata with the reason, not a 404. Network errors
are only logged.
- Move scheduleOptional to BaseTask so that any task can use it.
* chore: Upgrade slug from 5 to 11
* Require Node 22.12+ for require(esm), test θ transliteration
* Polyfill String isWellFormed and toWellFormed for older browsers
* fix: Only warn about unsynced changes when navigating to a different document
* fix: Do not prompt about uploading images when staying on the same document
* fix: Do not report edits before the first sync as unsynced when stored locally
* fix: Treat opening a revision as leaving the document
On a public share, MentionDocument and MentionCollection rendered a Link to
the bare /doc/... or /collection/... path. That route is not part of the
share, so the router fell through to the authenticated app and showed the
login screen. Regular text links to the same documents were unaffected
because they go through the editor's onClickLink handler, which already
prefixes the share route.
Scope mention paths with sharedModelPath when a shareId is in context.
Moves the helper into shared/utils so the editor can use it; the app
wrapper keeps the same signature and reads ROOT_SHARE_ID from env.
Moves lazyWithRetry to shared/utils so the editor's ColorSwatch and
Mentions components can use it instead of React.lazy, avoiding the
Suspense reveal throttle once the chunk is loaded.
Lazy components now render synchronously once their chunk is loaded and share a
preload promise, so the editor no longer commits a fallback and waits out the
300ms retry throttle. Editor chunks are preloaded from the document route, the
sidebar hover, and the data loader. A lint rule blocks direct imports of the
editor chunk.
* fix: Warn before leaving a document with unsynced edits
* refactor: Move unsynced change tracking into CollaborationProvider
* refactor: Move collaboration event types next to CollaborationProvider
* fix: Pending changes stuck after the collaboration connection is restored
* chore: Log collaboration sync state changes in development
* fix: Report lost local persistence in the leave prompt
* fix: Stop local persistence when the initial read fails
* fix: Stop local persistence when a write aborts
* Remove test
* 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>
* feat: Support HEIC avatar uploads with in-browser conversion
HEIC and HEIF images picked for an avatar are now converted to JPEG in
the browser before the cropper opens. The browser's own decoder is used
when it supports the format, otherwise a WebAssembly decoder is loaded
on demand.
Also collects the image utilities into an ImageHelper class, fixes the
crop dialog's submit button never disabling, and stops the upload from
forwarding request headers the browser controls itself.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: Use only the browser's own HEIC decoder
Drops the bundled WebAssembly decoder in favour of the browser's native
support. This removes an LGPL dependency and a 3MB lazy chunk, and lets
the Content Security Policy stay as it was.
Browsers without HEIC support now get a message asking for a JPEG or PNG.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: Add class-level JSDoc to ImageHelper
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: Vendorize y-indexeddb persistence
Replaces the y-indexeddb dependency with a small typed module in
app/utils/IndexeddbPersistence.ts so we have full control over the
underlying database rows. The IndexedDB schema is unchanged and remains
compatible with databases created by y-indexeddb, so existing local
caches continue to work.
Differences from upstream:
- Promise-based API (whenSynced) instead of the lib0 Observable events,
which simplifies MultiplayerEditor and lets it handle environments
where IndexedDB exists but cannot be opened (e.g. Firefox private
browsing) by falling back to no local persistence.
- Skips writing an empty state row every time a document is opened.
- Exposes a public compact() to merge all rows into one on demand.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9
* chore: Remove persistence tests and fake-indexeddb dependency
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9
* chore: Make trim size a private class member, drop unused custom store
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9
* fix: Guard async persistence callbacks against post-cleanup state updates
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9
* Added onversionchange handler
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Recover from closed IndexedDB connections in store persistence
StorePersistence cached a single IDBDatabase forever, so once the browser
or another tab closed the connection every subsequent hydrate, flush and
clear threw against a dead handle.
- Close and forget the connection on versionchange, so another tab is
never blocked from deleting or upgrading the database
- Discard the cached connection on close, open error and blocked, and
retry once against a fresh connection when one was closed underneath us
- Close open connections before deleteAllDatabases removes them, which
also stops logout recreating the databases it just deleted
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Cancel pending writes when store persistence is disabled
A debounced flush scheduled before disabling would still fire, reopening
and recreating the database that deleteAllDatabases had just removed.
A dynamic import can resolve to a chunk from a different build, throwing
"does not provide an export named", which was not recognized as a chunk
error. Share one stale chunk matcher between the lazy import retry, the
error boundary, and Sentry so all three treat it as recoverable.
Fixes OUTLINE-CLOUD-D1M
* feat: Persist policies to IndexedDB so abilities survive reload
Adds a StorePersistence layer that caches a store's models in IndexedDB
and hydrates them back at boot as stale data, revalidated by normal API
traffic. Enabled for the policies store, scoped per team, so cached
abilities are available immediately after a reload instead of every
policy needing a forced refetch.
- Persistence hooks in the base Store add/remove/clear methods, since
add() updates existing models in place and map observation would miss
those changes
- Enabled from RootStore construction (team read from localStorage) and
again after auth.info succeeds to cover the first session after login
- Store.clear() wipes the persisted records, covering both logout paths
- deleteAllDatabases() fallback removes the policies database on
browsers without indexedDB.databases()
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XisV6sRdexfnPSiehurKoV
* refactor: Opt stores into persistence via a persistable property
Stores now declare persistence with `persistable = true` and RootStore
sweeps all persistable stores, deriving each database name from the
store's apiEndpoint, instead of RootStore hard-coding the policies
store. The deleteAllDatabases fallback uses the same sweep.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XisV6sRdexfnPSiehurKoV
* refactor: Simplify store persistence enablement and clearing
- Move the persistable guard into Store.enablePersistence so RootStore
can call it unconditionally on every store
- StorePersistence derives its own database name from the store and
teamId rather than receiving a prebuilt name
- StorePersistence.clear returns a promise, making the test deterministic
instead of sleeping
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XisV6sRdexfnPSiehurKoV
* fix: Avoid re-persisting hydrated records, await clear transaction
Hydration called store.add() for every cached record, which now triggers
persist() and scheduled a flush that wrote the just-loaded data straight
back to IndexedDB at boot. Guard persist() with a hydrating flag.
clear() awaited the objectStore.clear() request rather than the enclosing
transaction, so it could resolve before commit and miss abort errors.
* lock
* iterate
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Shared pages fail to load on older browsers
Object.hasOwn is unavailable before Chrome 93 and Safari 15.4, and
es-toolkit calls it directly from isEqualWith, which useActionContext
runs on every render. Add a polyfill applied at module scope, ahead of
the other imports, so it covers dependency evaluation and first render.
Fixes OUTLINE-CLOUD-D0W
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Define the polyfill as non-enumerable to match the native property
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resource timing spans made up ~84% of all spans sent, driven by the number
of code-split chunks loaded per pageload. Filter them out along with pageload
connection phases and performance mark/measure entries, and halve the traces
sample rate.