* 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.
Hide the sidebar search input and theme toggle on mobile public shares,
add a search icon button to the header instead, show a single header
action as a circle, and keep sidebar items clear of the header.
* 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>
Adds the Sort in sidebar action to the Personal section header menu, with the
personal collection as the active model so that the action does not change the
collection that is open.
* 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: Personal collections backend
Adds an owner to collections. A personal collection is private, one per user
per team, created lazily through collections.personal, and only its owner can
see or manage it. Admin bypasses in policies, lists, exports, events, webhooks
and file operations exclude the personal collections of other users. Turning
off the PersonalDocs preference makes the collection read-only.
* test: Access matrix for personal collections
Checks that collection and document endpoints, list and search results, MCP
tools, collaboration and websocket rooms agree with the read policy for the
owner, collaborators, members, admins, guests and other teams.
* feat: Personal collection in the sidebar
Adds a Personal sidebar section that renders the personal collection with the
collection document tree, creates the collection on the first new document,
and keeps it out of the Collections section. Adds the workspace setting, the
personal sidebar context, and hides collection sharing and membership UI for
personal collections.
* fix: Drag and drop in shared with me trees
Anchors the reorder drop cursor inside the row, and prefetches documents on
hover so that nested rows that were never opened can be dragged.
* feat: Personal collection owner for collaborators, no collection page
Presents the owner of the personal collection on documents, so that
collaborators see the owner in the share popover. Root rows in the Personal
section show the default document icon. A personal collection has no page:
the scene shows not found, and the breadcrumb, command bar and delete redirect
no longer link to it.
* fix: Personal sidebar indent and breadcrumb items without a link
Children of rows at depth 0 skip a level so that they start beyond the row
icon. Breadcrumb items without a destination, such as the personal and deleted
collection, are shown as plain text.
* test: Reduce personal collection tests to list paths
Endpoints that authorize a single model are already covered by the policy
tests. Keeps the lists and searches, which filter in queries, and the
presenter.
* test: Move personal collection list tests into collections tests
* feat: Create documents in the personal collection by alias
documents.create, documents.import and the MCP create_document tool accept
the collectionId "personal", which refers to the personal collection of the
user and creates it when it does not exist yet.
* refactor: Remove collections.personal route
The sidebar creates its first personal document with the personal
collectionId alias, so documents.create is the only path that creates the
personal collection.
* feat: Personal collection name, starring, templates and default
Personal collections cannot be starred, renamed or hold templates, and the
PersonalDocs preference is on by default. The app shows collections through a
displayName getter, which is the translated "Personal" for a personal
collection.
* fix: Use the same policy for starring and unstarring collections
* fix: No pins or viewer insights for personal documents
* revert: Show personal collection events in the audit log
Admins with audit access should see events in personal collections, even when
they cannot open the documents.
* fix: Load collection owner in share scopes
* fix: Keep personal collections out of workspace exports and webhooks
Workspace exports skip all personal collections, while an explicit export of
a personal collection stays available to its owner. Events in personal
collections, including attachments and documents moved after queueing, are
never delivered to workspace webhooks. Personal collections cannot be
renamed or made public through any path, cannot hold pins, and are not
offered as mentions.
* Change icon to avatar
* fix: Personal documents cannot be unpublished
* feat: Personal collection context for MCP
Collections are presented with an isPersonal flag, the server instructions
explain the personal collection, and move_document and update_document accept
the personal collectionId alias.
* fix: Keep moved personal exports private and remove pins on move
Document exports record the owner of the personal collection they came from,
so they stay private after the document moves. Moving documents into a
personal collection removes their pins, including pins to home.
* fix: Only create the personal collection in MCP when it is used
The sidebar's width is part of the editor layout, so animating it reflowed the
whole document on every frame. The width is now reserved in one step and the
panel slides into place with a transform.
Refs #14069
* 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
* perf: Load templates on demand and cache fetchAll results
fetchAll on the base store now returns the first result for repeat calls
with the same params, with a force option for callers that need fresh
data. Templates load when the command bar, document header, or block
menu needs them instead of on every page load.
* Make fetchAll caching opt-in via fetchAllIfNeeded
fetchAll always fetches again. fetchAllIfNeeded returns the previous
result for the same params until a model is added to or removed from
the store. Mount-effect callers for reference lists use it.
* refactor: Attach observers in ref callbacks instead of effects
Use React 19 ref callback cleanup for the ResizeObserver in Scrollable and
PDF and the IntersectionObserver in useOnScreen, which now returns a ref
callback rather than taking a ref object.
* fix: Remove unused ts-expect-error directives
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.
* React 19 upgrade
Bumps react and react-dom to 19.2.8, with the dependency changes React 19
requires: react-is 19, @types/react 19, @types/react-dom 19,
react-helmet-async 3 and react-avatar-editor 15 (which now ships its own
types). framer-motion moves to 13 — its v6 types reference React.ReactHTML,
removed from @types/react 19.
The type changes fall into a few classes:
- The global JSX namespace is gone, so JSX.Element becomes React.JSX.Element
and the custom element declarations move into a module augmentation.
- useRef() now requires an initial value.
- A ref created with a null initial value is typed nullable, so consumers
that accept one are widened to RefObject<T | null>.
- React.ReactChild was removed; tooltips take React.ReactNode.
- Ref callbacks may only return a cleanup function. react-dnd connectors
return the connected node, so useDragRef and useDropRef wrap useDrag and
useDrop and hand back a ref callback.
react-i18next stays on v12: i18next 23 drops compatibilityJSON "v3", which
would rewrite all 64 _plural keys across every locale.
outline-icons, oy-vey and react-waypoint have no release that lists React 19
as a peer. All three render correctly under it; the install reports them as
unmet peers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove react-helmet and forwardRef
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: Speed up CI with TypeScript 7 and Blacksmith runners
Upgrade TypeScript to 7.0.2, the native compiler, which cuts a full type
check from ~57s to ~12s locally. Yarn is bumped to 4.18.0 because older
versions fail to apply the builtin compat patch to TypeScript 7.
Fix two type errors the stricter compiler surfaces: the collection drop
target used unrelated item and monitor types, and Store.add relied on the
error type of an abstract construct call to satisfy the generic return.
Move CI jobs to Blacksmith runners, with a fallback to GitHub-hosted
runners for forks.
* chore: Match enterprise CI runner sizes
* chore: Persist node_modules on a sticky disk and use more test workers
* chore: Use the preinstalled PostgreSQL in CI instead of a service container
* chore: Skip the setup-node yarn cache when a sticky disk is mounted
* chore: Persist the Node.js toolcache and run server tests in 6 shards
* chore: Disable the setup-node package manager cache on Blacksmith
* chore: Keep pull requests from forks off Blacksmith runners and sticky disks
Native drags (ProseMirror nodes leaving the editor, text, files) are
tracked by react-dnd as native item types. The sidebar drag placeholder
rendered a document row for any active drag, so dragging an editor node
past the editor edge showed an "Untitled" document ghost.
Also makes notice blocks non-draggable.
* React 18 upgrade
* fix: Force synchronous React rendering in server HTML export
React 18 can defer a legacy ReactDOM.render commit when sync work is
queued, leaving exported component nodes empty. Wrap the render in
flushSync, and flush unmount-scheduled passive effects before global
env cleanup so React never runs without a window.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor: Move server ComponentView to createRoot
ReactDOM.render and unmountComponentAtNode are removed in React 19.
flushSync around root.render keeps the mount synchronous for the
HTML-export path, which reads the DOM immediately after.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Enable CI
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* wip
* Center reorder cursors between sections, detect empty sections with CSS
* Deduplicate persisted sidebar section order
* fix: Stricter zod type
* Remove DraggableSection unit tests
* Animate drafts count in sidebar
Adds a subtle pop animation when the drafts count appears or changes.
* Key drafts count animation on the displayed value
* Separate logged-in elements on shared page
* fix: Set explicit type on shared header account menu trigger
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>