* 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.
* Redesign search filters
* Design refinement
* Search filter polish: chip states, Text components, Published filter
* Encode search filters as <field>.<operator> URL params
Filters read and write a standard <field>.<operator>=<value> format, a
bare key reads as eq, and the previous dateFilter, statusFilter and
titleFilter params are still read.
* Add custom date ranges to search date filters
Updated, Created and Published get a Custom option that opens a range
calendar in a modal. The range is stored as <field>.gte and <field>.lte
dates and sent to the API as whole days in local time.
* Keep date filter chip shown while its range dialog is open
* Align calendar with modal edges
The calendar had its own 12px padding, so in modals it sat inside the
title and footer edges. The popovers that need the space now pad it.
* Search filter refinements: menu height, chip spacing, steady results line
* Simplify search filters and address review comments
Parse each filter once per URL change, unify URL writes, share status and
date helpers with the server, add a maxHeight prop to MenuContent, ignore
counts from obsolete searches, and show the empty state for filter-only
searches.
* Refine filter chip remove button and skip animation on auto-opened menus
* perf: Faster mention suggestions
Limit each section of suggestions.mention to 1s so a slow query does not
delay the others, debounce mention and link editor requests, ignore stale
responses, and use title search in the link editor.
* fix: Include presentation in the mention suggestion time limits
* test: Use a fixed name in the collection member name filter test
* 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>
* chore: Remove emoji-mart runtime dependency
* fix: Exclude unavailable emoji from the search haystack
* fix: Use an Emoji 2.0 sequence for the version 2 probe
* fix: Correct CSV escaping and URL host matching in shared utils
- Check for CSV formula triggers after removing hidden characters, so that a
removed character cannot hide a trigger.
- Quote CSV fields that contain a carriage return.
- End the authority in parseDomain at "?", "#" and "\" as well as "/", so that
a host is not read from a query or fragment.
- Require a boundary after the origin in urlRegex, so that a look-alike host
does not match.
* fix: Match a stated default port in urlRegex
URL.host omits a default port, so a url that states :443 or :80 did not match its own origin after the boundary check was added.
* 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.
* feat: Add server-driven rows to useTableRequest and date range helpers
- useTableRequest: `data` is now optional, when omitted the hook displays the
rows returned by the server for the current params. Needed when server-side
filtering cannot be reproduced against a client store.
- Add `dateToTimestamp` and `dateRangeToReadable` localized date formatters.
- Calendar: style the days between the start and end of a range.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Delete app/hooks/useTableRequest.test.tsx
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Fix stale workspace entries in sessions cookie
* Use authenticated token expiry for workspace session entries
* Remember logged-out workspaces for three months after last use
* Remove excessive tests
* Fix auth info test to send a real sessions cookie
* feat: Warn about low contrast theme colors
* fix: Show contrast warning as visible text linked to the input
* fix: Align color input swatch and enlarge it on mobile
* feat: Add get_document_changes MCP tool to diff document history
* fix: Bound document changes to the loaded snapshot and diff raw markdown
* perf: Replace structuredPatch with an integer ID line diff (#14246)
* fix: Update get_document_changes for MCP SDK v2
* perf: Copy only the patched path when recreating transforms
recreateTransform deep copied the whole document for each patch
operation, and diffArrays compared elements with a generic isEqual. Copy
only the containers on the operation path and compare with a JSON-only
equality check. Revision changesets are about 6x faster.
* Use fast-deep-equal in place of a custom JSON equality check
* Restore isJSONEqual, fast-deep-equal throws on null-prototype attrs
* 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
* feat: Allow tables inside notices
Blend table, rule and code colors onto the notice background, keep table
scroll shadows inside the notice, hide full width for tables in notices,
and fit new table columns to the available width.
* fix: Leave room for table row controls in notices
* fix: Blend table grips onto the notice background
* fix: Derive notice content colors from the softer notice styles
A heading whose text ends in a number could get the same slug as a
numbered duplicate. Heading slugs now come from one HeadingSlugger that
skips taken IDs, and the server section lookup counts nested headings
like the editor does.
* 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.
* 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
* perf: Read active models lazily in ActionContextProvider
The root provider read the active document and models during render, so
every navigation rebuilt the context and re-rendered all consumers. These
values are now getters, and overrides are merged without evaluating them.
* perf: Skip urlId scan in Store.get for UUIDs
When an id was not loaded, get() searched every item by urlId, so each
sidebar row observed the whole store. A UUID cannot end with a urlId, so
the search is skipped for UUIDs.
* perf: Stop sidebar rows re-rendering on navigation
- Track expanded nodes in an observable map, as ObservableSet.has tracks
the whole set.
- Do not rebuild the document tree rows when the active document changes.
- Auto-expand the active path in a reaction instead of reading the active
document during render.
- Compute active state per row, and keep row props stable.
* perf: Add useLocationSelector for persistent components
useLocation re-renders on every navigation. The new hook re-renders only
when the selected value changes, and is used where components stay mounted
across navigation. AuthenticatedLayout now keeps its portal element in
state, as it no longer re-renders after mount.
* chore: Send Document-Policy js-profiling header in development
* docs: Add render performance guidance to AGENTS.md
* fix: Check document or collection star exclusively for active state
* fix: Read location from each action context provider's own history
Nested providers inherited the root location getter, so menus inside a
split view pane read the browser route instead of the pane's route.
* fix: Expand starred collection when the active document changes
* feat: Add icon and color to user groups
* refactor: useContrastColor hook
* refactor: Share icon contrast check via useContrastColor hook, named GroupIcon export
* perf: Virtualize sidebar document trees
* fix: Hide empty state while adding a doc and scroll the active row on tree mount
* fix: Track scroll margin for sidebar trees that start empty
* fix: Allow private-use URI schemes for OAuth redirect URIs
Native apps receive OAuth redirects on a private-use URI scheme
(RFC 8252 section 7.1), e.g. com.example.app:/oauth2redirect or
myapp://callback. These were rejected when registering a client
because IsUrlList only accepted http, https and ftp, and the
recommended com.example.app:/path form was also rejected at authorize
time because it has no host.
Add isPrivateUseSchemeUrl, which accepts private-use schemes while
excluding web schemes and schemes that can execute or embed content,
and use it in both places.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: Require a protocol for OAuth redirect URIs
isURL treats a bare word such as "callback" as a hostname, so a client
could be saved with a redirect URI that validateRedirectUri would always
reject at authorize time. Require a protocol when validating the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: Accept one-character private-use URI destinations
The destination check compared the pathname length, so a valid opaque URI
such as myapp:a was rejected along with the empty myapp: and myapp:/.
Reject only those empty forms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Nodes are cached against the content or state they were parsed from, so
repeated helper calls on the same document parse it once. JSON transform
helpers now replace attrs instead of mutating them, as Node.toJSON shares
attrs with the cached node.
* perf: Render simple read-only comments without an editor view
Read-only editor content made of paragraphs, basic marks, hard breaks,
emoji and lists is rendered from the schema DOMSerializer instead of
mounting a ProseMirror view per comment. Anything needing a node view or
plugin falls back to the full editor. Notification comment previews now
use the same read-only path.
* fix: Forward className on the static editor path
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.