* feat: Show export completion in the notifications center
Exports now create an in-app notification with the export name, status,
format and a download button. Export emails are sent from the notification
with a one-minute delay, so they are skipped once the notification is read.
* fix: Avoid nested button in export notification and keep it after delete
* fix: Revoke export notifications when access to the source is lost
* fix: Remove icon from export notification download cue
* 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>
* fix: Run forced document tree fetches that arrive while a fetch is in flight
* fix: Run forced store fetches that arrive while a fetch is in flight
* test
Creating a revision immediately when the user clicks Done raced the collaboration server's save debounce, producing a stale revision followed by a second one and duplicate Slack notifications.
* fix: Show nested shared documents under their shared parent in sidebar
* fix: Select shared roots from ancestor grants, ignore stale cached trees
* Revert ancestor walk in membership list queries
* 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
* 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 production bundle mangles class names, so unrelated models in separate
chunks (eg User/WebhookSubscription, Collection/Pin) shared one @Field list.
Adds a lint rule against reading constructor.name in client code.
* feat: Add icon and color to user groups
* refactor: useContrastColor hook
* refactor: Share icon contrast check via useContrastColor hook, named GroupIcon export
* feat: Sync group descriptions and re-sync groups on SSO validation
- Sync group descriptions from group sync providers alongside names
- Lock name and description edits for externally synced groups at the
API layer and in the edit dialog
- Move group sync into a SyncUserGroupsTask, scheduled from login and
from ValidateSSOAccessTask after a fresh provider validation
- Add authenticationProviders.startGroupSync for providers that require
an admin consent flow before group sync can be enabled
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix: Make group sync setup generic and deduplicate sync jobs
- Expose groupSyncRequiresSetup from the provider list and use it in the
settings scene instead of checking for the azure provider name
- Rename the setup redirect query param to groupSync
- Give SyncUserGroupsTask a job id per user authentication so concurrent
syncs for the same authentication are not queued twice
* Use existing hook
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* 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
* feat: Add reasons for archived and deleted documents
* feat: Add deprecation reasons to archived collections
* fix: Refine deprecation reason display for readers
* feat: Accept reasons when archiving or deleting
* Support reasons in archive and delete MCP tools
* Fix placeholder after clearing content editable text
* Keep the caret before content editable placeholders
* Remove test
* feat: Add archive reasons to the confirmation dialog
* fix: Revision view does not re-render when late content arrives
Pre-define every MobX-decorated field on model instances so reads made
before the data arrives are tracked.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test: Inherited base-class fields are observable on partial models
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* feat: Record who deleted a document
The trash inferred the deleting user from lastModifiedById, so a nested page
kept whoever last edited it and deleting a document rewrote its edit history.
Add a dedicated deletedById column and set it from the base model.
- Migration adds the column, backfills from lastModifiedById, and validates the
foreign key without holding an exclusive lock. The backfill runs in batches
against a temporary index covering only the rows still to write, so it stays
linear on a large table, and every statement is idempotent because the
migration cannot run in a transaction.
- ParanoidModel records the acting user on destroy and clears it on restore,
for any model that has the column. Sequelize soft deletes with the same UPDATE
that stamps deletedAt, so the value costs no extra query.
- Deleting a document no longer touches lastModifiedById on its descendants.
- Present the deleting user, batched in presentDocuments, and use it for the
trash notice and the document meta line rather than the last editor.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Do not overwrite an eager loaded deleting user when batching
The batch lookup in presentDocuments skipped documents that already carried the
association, but the assignment loop ran for all of them, so a document that
arrived with deletedBy loaded was reset to null and fell back to a per-document
query. Assign only where the association is missing, and deduplicate the ids so
a page deleted by one person asks for one row rather than one per document.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Add heading numbering display preference for documents
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix isRemoteTransaction call for new signature on main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix inTable detection for headings after a nested table
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Move from deco to pseudoclass
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Replacing the download dialog with the export submenu lost the option to
include child documents, which defaulted to on. Restore it as the default
behavior for every format, and move the background export toast into the
model so all download paths raise it.
* 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: Warn before discarding unsaved template changes
Template content is only persisted when the form is explicitly submitted,
so navigating away or closing the tab silently lost everything typed.
Adds a navigation Prompt and a beforeunload handler to both template
scenes, and reverts the model on unmount so abandoned edits no longer
leak into other views rendering the same record.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Persist templates from the first keystroke
New templates were held only in browser memory until Save was pressed, so
a refresh, crash, or stray navigation lost everything written.
Templates are now created up front as an unpublished draft and autosaved,
mirroring how documents behave. Drafts are visible only to their author
until published, and are cleaned up if abandoned while empty.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Preserve icon edits made during an in-flight template save
applyEdits only restored title and content, so an icon or color changed
while a save was in flight was overwritten by the response and never
re-saved.
Pending edits are now tracked as a single record covering every field the
form can change, rather than one ref per field.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feedback
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Add Invited by and Joined columns to users table
* Move responsive column hiding into column definitions
Adds a hideOnMobile flag to the table column type, handled in the Table
component, replacing per-column isMobile ternaries in the users table.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a sourceMetadata JSON column to revisions, populated with the
authentication type of the request that produced the edit, so the
document history sidebar can show "Tom edited via MCP"
Most callers of policies.abilities() are non-reactive (drag-and-drop
canDrop callbacks, action visible() predicates), so the computed had no
observers and recomputed on every read. keepAlive restores caching and
referential stability, and silences the computedRequiresReaction warning.
Surface when a history event was performed via the API or MCP, e.g.
"Tom published via MCP". Moves AuthenticationType to shared types and
exposes authType on the event presenter.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>