Drop targets that reorder or reparent an item now require the `move`
ability on the dragged item, so no drop cursor or highlight appears
where the move would be rejected by the server.
Co-authored-by: Claude <noreply@anthropic.com>
* Move socket management from client -> server
* feedback
* fix: Reconcile collection rooms on visibility change
Handle collections.update transitions between private and team-visible by
joining or rebuilding the collection channel, route collection events through
the members channel so guests are excluded, and use removeData for the
collection ids cache invalidation.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* wip
* generalize
* refactor
* Extract SearchResultIcon for command bar results
Both search action builders rendered the same document icon inline. Move it
into a shared component alongside the other command bar pieces, forwarding
size so the command bar can continue to size icons via cloneElement.
Also drop the redundant charAt(0).toUpperCase() on the initial, as the Icon
component already normalizes it.
Co-Authored-By: Claude <noreply@anthropic.com>
* PR feedback
Prevent same doc showing twice in cmd k
Improve result ordering in main app command bar
Refactor to flattenTree
* Upgrade Fuse to 7.5.0, use workers
* fix: Re-register search actions when index is enriched
Include result contexts in the command bar registration key so that
snippets refresh when the same documents are enriched, and only mark a
server search as cached once its results are actually fed to the index.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: Audit and move inline actions to definitions
* fix: Reuse existing smart-quote translation key in emoji delete dialog
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove two usages of 'Link copied' translation
---------
Co-authored-by: Claude <noreply@anthropic.com>
* CMD+enter to open in split view
* Fall back to normal navigation when location state is present
Location state cannot be represented in the split query parameter, so
opening in the secondary pane would silently drop it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Adds the ability to open a second route alongside the current one:
- The secondary route is stored in a `split` query string parameter so
that reloading the page hydrates both panes.
- The secondary pane runs in its own in-memory router kept in sync with
the query parameter, so links followed inside the pane navigate the
pane rather than the primary route.
- Navigation while a split is open preserves the split, is directed to
the focused pane, and routes that cannot render in a pane (such as
settings) close the split.
- The focused pane is shown with an accent outline, updated as panes are
clicked or focused, and keyboard shortcuts only apply to the focused
pane.
- "Open in split view" added to document and collection menus and the
command bar.
* feat: Add onNotice callback to decouple shared editor from toast library
Shared editor code called sonner's toast directly. Introduce an onNotice
callback (defaulting to a toast) so the shared editor stays agnostic of the
host app's notification library.
* Add lint rule to prevent regression
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Crash when dropping outside editor after drag began over it
The EditorAwareHTML5Backend suppresses react-dnd's top-level handlers for
events within the ProseMirror editor, so a drag that begins or enters the
page over the editor is never registered with react-dnd. When such a drag
was then dropped outside the editor, the backend's unguarded drop handler
called actions.hover and threw "Invariant Violation: Cannot call hover
while not dragging". Skip the drop handler when no drag is registered,
mirroring the isDragging guard react-dnd already applies to dragover.
Fixes OUTLINE-CLOUD-CPR
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B37TdpqjKYnLAARomVBjUc
* Remove EditorAwareHTML5Backend tests
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B37TdpqjKYnLAARomVBjUc
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Improve sidebar menu and navigation tree performance
* remote some test and rollback useOnScreen
* feat: introduce ActionFactory type and update context menu components to support it
- Added ActionFactory type to allow functions returning ActionWithChildren.
- Updated ContextMenu and DropdownMenu components to handle ActionFactory.
- Modified DocumentRow, SidebarLink, and other components to accept ActionFactory for context actions.
- Refactored useDocumentMenuAction to utilize createRootMenuAction for better action management.
---------
Co-authored-by: Tom Moor <tom@getoutline.com>
* fix: Option to invite existing user not in doc
* fix: Address review comments on getByEmail
Use locale-insensitive lowercasing and lowercase JSDoc descriptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Focusing starred link scrolls to original location
* fix: Restrict stateless scroll fallback to collections tree
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* perf: Keep vendor-prosemirror out of the eager authenticated bundle
Split the data-only helpers `getEmpty` and `isEmpty` out of
`ProsemirrorHelper` into a new prosemirror-free `ProsemirrorDataHelper`
module, and point the sidebar, DocumentNew, and other lightweight
callers at it. This removes the static edge from the authenticated entry
graph to `prosemirror-model`, deferring the ~653 KB vendor-prosemirror
chunk until an editor surface is actually opened.
Fixes#13005
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Use non-optional collection.data in defined branch
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
When a document containing an unsent draft comment mark is loaded, the
initial collaborative sync applies the content in a transaction after the
editor has mounted. The comment mark diffing treated these marks as newly
created and focused them, which in turn opened the comments sidebar.
Thread the transaction origin through the editor onChange callback and
skip focusing comment marks that arrive via remote or sync transactions,
so only locally created comment marks focus and open the sidebar.
Claude-Session: https://claude.ai/code/session_01LBdKAtGgEJ6RcgrcrXNPQc
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Stale CSRF token sent on request retries and form submissions
The CSRF token cookie is rotated by the server on every safe request, but
ApiClient read the cookie once when a request was prepared and fetch-retry
reused the same headers for every attempt. Any rotation between preparation
and a retry (e.g. a concurrent GET in another tab) caused the double-submit
check to fail with csrf_error.
- ApiClient now re-reads the token cookie immediately before each network
attempt, so retries always carry the current token
- Form now reads the token at render and refreshes the hidden _csrf input
from the cookie during submit, replacing the useCsrfToken 1s polling hook
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
* chore: Remove ApiClient test file
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
* feat: Allow routes to opt out of CSRF token rotation
The CSRF token cookie is rotated on every safe request, which causes
in-flight mutating requests prepared with the previous token to fail the
double-submit check. High-frequency endpoints such as attachments.redirect,
hit for every inline image while reading a document, rotate the token
constantly for no benefit.
attachCSRFToken now sets the cookie after downstream middleware has run,
allowing routes to opt out of rotation via the new suppressCsrfTokenRotation
middleware. Suppressed routes still issue a token when the client does not
already hold a valid one. Applied to the attachments.redirect GET route.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
* feat: Suppress CSRF token rotation on files.get
Like attachments.redirect, files.get is requested for every inline image
stored locally and has no need to rotate the CSRF token cookie.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
* docs: Correct suppressCsrfTokenRotation comment
Requests already dispatched carry the previous cookie and header together
and still pass the double-submit check; rotation only races requests that
read the token before rotation but are sent after it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
* docs: Simplify comments
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
* revert: Remove CSRF token rotation suppression
The api router is mounted before attachCSRFToken in the middleware chain,
so API responses never rotate the token cookie and the suppression on
attachments.redirect and files.get had no effect.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fGhLu7zQyLdkRCx5EkYC5
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Various unlabelled and undescribed interactable elements
* fix: guard sort keydown against key repeat and label remaining help button
Prevent held Space from repeatedly toggling table sort, and add an
accessible name to the "Email subscriptions" help button.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Retain location state when clicking on hash links in doc and TOC
* fix: Pass explicit location fields when navigating to hash links
Avoid spreading history.location (which carries internal fields like key)
and preserve the href's query string for absolute same-path links.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Refactor to patchLocation helper
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Vertically center empty state in notifications popover
The empty state relied on percentage heights to center, but the
height chain was broken by the outer container only setting min/max
height. Switch to flexbox growth so the scroll region fills the
available space and the empty message centers reliably.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J7kMKxnH5gfziT5GNgsXZW
* chore: Add development util to create test notifs
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Mobile spacing fixes
* Keep mobile selection toolbar sticky above the iOS keyboard
The mobile selection toolbar positioned itself with absolute positioning
and a bottom calc derived from the document body rect and visual viewport
height. On iOS the layout viewport (which fixed/absolute elements anchor
to) does not shrink when the software keyboard opens, only the visual
viewport does, so the toolbar drifted and lagged relative to the keyboard.
Anchor the toolbar with position: fixed; bottom: 0 and introduce
useKeyboardStickyOffset, which translates it up by the gap between the
layout and visual viewport bottoms. It recomputes on visual viewport
resize/scroll and runs a short requestAnimationFrame loop so the toolbar
glides with the keyboard's open/close animation, and re-applies after every
render so parent re-renders cannot clobber the offset.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Treat legacy boolean commenting preference as disabled
Teams not yet migrated to the CommentingAccess enum may still have a
boolean `false` stored for the commenting preference. Guard the
enabled checks so `false` reads as disabled rather than enabled.
* Move commenting setting from Details to Security settings
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Lightbox effect tweaks
* refactor
* refactor
* fix: Address review feedback on image lightbox
- Use useLayoutEffect in useHideElement to hide/restore before paint
- Intersperse separators between image hover actions to avoid orphaned dividers when Download is hidden in edit mode
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>