Commit Graph
2058 Commits
Author SHA1 Message Date
Tom Moor 854db75995 fix: Crash opening comment sidebar in Lightbox on public share (#13164) 2026-07-27 18:15:57 -04:00
Tom MoorandClaude 053a3fd438 fix: Respect move policy in sidebar drag and drop (#13150)
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>
2026-07-26 18:51:54 -04:00
Tom MoorandClaude 17452bda5b Move socket management from client -> server (#13120)
* 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>
2026-07-26 17:47:34 -04:00
Tom Moor 42cd66f79f Reorder search in command menu, remove Fuse workers (#13137) 2026-07-25 14:21:46 -04:00
Tom MoorandClaude e1c906a1c2 feat: Fuse powered local content search (#13115)
* 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>
2026-07-25 13:16:53 -04:00
Tom MoorandClaude 8192bc0514 chore: Audit and move inline actions to definitions (#13133)
* 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>
2026-07-25 16:13:12 +00:00
Tom Moor 08a3b64295 chore: Exhaustive deps warning -> error (#13124)
* chore: Exhaustive deps turned to error

* Refactor useDragResize

* Refactor Lightbox to explicit state machine

* feedback

* ci
2026-07-25 10:43:49 -04:00
Tom Moor b9354edb52 fix: Split view browser title (#13130) 2026-07-25 10:36:37 -04:00
Copilot 796adb8b22 Rename split-view route helper to isSplittablePath (#13125) 2026-07-25 07:57:19 -04:00
Tom MoorandCopilot Autofix powered by AI 7fed1597df Apply suggested fix to app/components/EditorAwareHTML5Backend.ts from Copilot Autofix (#13126)
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-25 07:56:23 -04:00
Tom MoorandAron Granberg 0f8a38ecd5 perf: Optimize drag and drop re-rendering (#13114)
* perf: optimize sidebar dragging

* Address copilot review comments

* deslop

* feedback

---------

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2026-07-23 22:35:35 -04:00
Tom Moor 2d91a13647 fix: useKeyDown binding blocks browser defaults (#13098)
* fix: useKeyDown binding blocks browser defaults

* feedback
2026-07-22 21:42:32 -04:00
Tom Moor b1d2fb986f chore: Address 11 lint warnings (#13092) 2026-07-21 23:07:10 -04:00
Tom Moor 6a09e9cf1d fix: Dark border printing docs from dark theme (#13074) 2026-07-20 23:29:26 -04:00
Tom MoorandClaude Fable 5 b67442a475 feat: CMD+enter from command menu to open in split view (#13073)
* 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>
2026-07-20 22:28:10 -04:00
Tom Moor ebc4e23dad chore: Tighten split view styling 2026-07-20 22:21:23 -04:00
Tom Moor 469caf04ca fix: Separate DocumentContext per split view 2026-07-19 20:49:15 -04:00
Tom Moor 2fe0940f04 fix: Introduce useActiveSidebarContext (#13051) 2026-07-19 20:48:06 -04:00
Tom Moor 05ba523e6e Tighten document header 2026-07-19 16:18:02 -04:00
Tom Moor fd10642095 fix: Account for multiple tab bars mounted at once (#13050) 2026-07-19 15:42:24 -04:00
Tom Moor d57db81c6b feat: Split view (#13044)
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.
2026-07-19 11:57:33 -04:00
Tom MoorandClaude Opus 4.8 7d3e6591c2 feat: Add onNotice callback to decouple shared editor from toast library (#13046)
* 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>
2026-07-19 08:56:35 -04:00
Tom MoorandClaude Fable 5 8be4a0ac34 fix: Crash when dropping outside editor after drag began over it (#13037)
* 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>
2026-07-18 12:39:13 -04:00
ZhuoYang Wu(阿离)andTom Moor 19da56c2c7 Improve sidebar menu and navigation tree performance (#12873)
* 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>
2026-07-18 12:01:35 -04:00
Tom MoorandClaude Opus 4.8 416268b683 fix: Option to invite existing user not in doc (#13034)
* 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>
2026-07-18 10:23:54 -04:00
表面and谢金城 452961ee6b fix: Indent group-shared document children (#13028)
Co-authored-by: 谢金城 <xiejincheng@xgd.com>
2026-07-17 07:46:48 -04:00
Tom MoorandClaude Opus 4.8 9788c8cc6d fix: Focusing starred link scrolls to original location (#13029)
* 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>
2026-07-17 07:38:42 -04:00
Tom MoorandClaude Opus 4.8 863f09371c perf: Keep vendor-prosemirror out of the eager authenticated bundle (#13026)
* 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>
2026-07-17 07:12:28 -04:00
Tom Moor 1ca54bea19 fix: Floating toolbar in template settings overlaps sidebar (#12994)
closes #12983
2026-07-13 18:46:24 -04:00
Tom Moor b34ef2b6a5 chore: Remove web-haptics (#12974) 2026-07-12 07:10:28 -04:00
Tom Moor 3524427c4e fix: Improve fast-click behavior (#12966)
* fix: Improve fast-click behavior

* PR feedback
2026-07-11 16:09:25 +02:00
Tom Moor 027d3a8cfc fix: Flash in collaborator facepile while multiplayer connecting (#12967) 2026-07-11 09:43:58 -04:00
Tom Moor cdc0316602 fix: Prevent collapsed sidebar opening during text selection (#12965) 2026-07-11 10:28:32 +00:00
Tom Moor 30730179b8 Add sidebarHidden option (#12947) 2026-07-10 12:35:21 +02:00
Tom MoorandClaude fcfcb4fd93 fix: Comments sidebar opens on document load when draft comment exists (#12897)
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>
2026-07-08 04:56:06 -04:00
Tom Moor 25e8b6f518 fix: pass through prop not correctly applied (#12930) 2026-07-07 22:45:22 +02:00
Tom MoorandClaude Fable 5 999004f959 fix: Stale CSRF token sent on request retries and form submissions (#12888)
* 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>
2026-07-06 17:04:24 -04:00
Tom MoorandClaude Opus 4.8 646c74f260 fix: Various unlabeled and undescribed interactive elements (#12912)
* 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>
2026-07-06 22:57:35 +02:00
Tom Moor 9d0fb0b374 Show more useful breadcrumbs on search results (#12915)
* Show more useful breadcrumbs on search results

* PR feedback
2026-07-06 22:57:31 +02:00
Tom Moor 91fc3a8bc8 fix: add accessible name to search and text inputs (WCAG 1.3.1) (#12869) 2026-07-02 00:16:49 +02:00
Tom Moor ec3200c7d2 chore: babel -> swc (#12821)
* chore: babel -> swc

* Add ls guard

* PR feedback
2026-06-29 17:11:02 -04:00
Tom Moor 54be0a9db3 fix: Settings appear behind sidebar (#12824) 2026-06-24 21:53:20 -04:00
Tom Moor b8ed9be236 fix: Avoid pointless +1 on Facepile (#12823)
* Avoid +1 on facepile

* revert

* feedback
2026-06-24 21:50:10 -04:00
Tom MoorandClaude Opus 4.8 e7613baccf fix: Retain location state when clicking on hash links in doc and TOC (#12805)
* 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>
2026-06-23 21:00:41 -04:00
Tom MoorandClaude Opus 4.8 8cd23e40bf fix: Vertically center empty state in notifications popover (#12764)
* 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>
2026-06-20 21:42:18 -04:00
Tom MoorandClaude cc80b36dd1 Keep mobile selection toolbar sticky above the iOS keyboard (#12732)
* 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>
2026-06-20 21:27:16 -04:00
Tom Moor def47e6c15 Desktop tweaks 2026-06-20 12:52:13 -04:00
Tom MoorandClaude Opus 4.8 4383324b30 feat: Add setting to enable guest commenting (#12591)
* 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>
2026-06-20 11:26:05 -04:00
Tom Moor 02001cc2be fix: Incorrect sidebar hover state with menu open (#12758)
* fix: Incorrect hover state with menu open
fix: Pointer pref ignored on sidebarbutton

* Normalize header styling
2026-06-20 11:11:09 -04:00
Tom MoorandClaude Opus 4.8 283edf8ffd Hide original element during lightbox transition (#12756)
* 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>
2026-06-19 17:19:36 -04:00