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>
* Reduce server memory usage and add container memory best practices
Profiling a full-service boot showed ~300MB RSS per service process, much
of it client-only dependencies pulled into the server module graph, and no
heap limits applied in containers:
- Import date-fns locales individually rather than via the locale index,
which loaded all ~90 locales into every process
- Load @sentry/react dynamically in insertFiles so the browser Sentry SDK
stays out of the server-side editor graph
- Replace class-validator isHexColor with the existing validateColorHex
in the Highlight mark
- Extract icon names into a standalone IconNames module so server-side
schema validation no longer imports Font Awesome icon packs, with a
test to keep it in sync with IconLibrary
- Require S3Storage lazily so the AWS SDK and native CRT binding are only
loaded when S3 file storage is configured
- Default each forked service process to a V8 heap limit derived from the
cgroup memory constraint, preventing several processes from together
committing more memory than the container allows
- Cap glibc malloc arenas in the Docker image to reduce resident memory
fragmentation in multi-threaded processes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa
* Require both file storage backends lazily for consistency
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa
* Load AWS SDK via dynamic imports compatible with test environment
Requiring the storage TypeScript modules lazily broke under Vitest, which
cannot resolve require() of source files and does not apply vi.mock to
bare requires. Move the laziness into S3Storage instead: the module is
imported statically, and the AWS SDK packages are loaded with dynamic
imports on first use, including deferred creation of the S3 client.
Also address review feedback: handle rejection of the dynamic Sentry
import, and warn when the minimum per-process heap limit exceeds the
memory budget of the container.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa
* Consolidate S3 SDK loading into a single lazy accessor
The commands are loaded together with the client in getS3() rather than
as separate dynamic imports per method. The global S3Client test mock is
now a class, as a mock function is not constructable when reached through
a dynamic import.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YMX5ReGHyxrR4ZE5ZbaXa
---------
Co-authored-by: Claude <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: OIDC 502 on sign-in from oversized id_token cookie (#12986)
Storing the full OIDC id_token in the `oidcIdToken` cookie inflated the
sign-in response headers enough to exceed reverse proxy buffers, causing a
502 Bad Gateway. Store the id_token server-side in Redis keyed by a short
session identifier and keep only that identifier in the cookie, preserving
spec-compliant RP-initiated logout via `id_token_hint`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Make OIDC logout token persistence best-effort
A Redis failure when storing or reading the logout id_token_hint should not
block sign-in or logout; fall back to omitting the hint instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs
* refactor: Extract portable LogoutTokenStore for provider logout hints
Move the cookie-referenced, Redis-backed logout token persistence out of the
OIDC router into a provider-agnostic `LogoutTokenStore`. Any auth provider that
supports provider-initiated logout can now persist and consume a logout hint via
`new LogoutTokenStore(providerId)` without duplicating the cookie/Redis/error
handling. The OIDC-specific end-session URL construction stays in the router.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.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: useWindowScrollbarWidth measured horizontal overflow, not scrollbar width
document.documentElement.scrollWidth - clientWidth measures horizontal
content overflow, which is 0 in the normal case even when a vertical
scrollbar is visible — so the hook always reported 0 on platforms with
classic (non-overlay) scrollbars, and the right sidebar's fixed-position
content in Aside was never narrowed to account for the scrollbar.
Measure window.innerWidth - documentElement.clientWidth instead, which
is the layout viewport width including the scrollbar minus the width
excluding it. Verified in headless Chromium: with a forced vertical
scrollbar the old expression returns 0 while the new one returns the
true scrollbar width (15px).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DjhYP8svLL8dU98tmQJ7RK
* chore: Remove explanatory comment
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DjhYP8svLL8dU98tmQJ7RK
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Use full keyspace for email verification codes
Email verification codes were generated with randomInt(100000, 1000000),
which can never produce a value below 100000. That excluded every code
with a leading zero — shrinking the keyspace from 1,000,000 to 900,000
and letting an attacker assume the first digit is never zero. It also
made the existing padStart(6, "0") dead code.
Draw uniformly from the full 0–999999 range and rely on padStart to
render leading zeros, restoring the full six-digit keyspace. Add tests
covering the six-digit invariant across many samples and the presence of
leading-zero codes.
* Simplify verification code jsdoc and drop leading-zero test
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EWfLg5uQdYFuzj1UBEo1og
---------
Co-authored-by: Claude <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>
The test asserted the global rollupPeriod return value was 0 while passing
the full UUID range, so activity from other tests sharing the database
(especially near the UTC midnight boundary) leaked into the window. Scope
the partition to the test's own document id to make the count deterministic.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Consistent usage of configured proxy with auth providers
* lint
* fix: Harden proxy agent helper against missing OAuth2 client
Degrade to a logged warning instead of crashing auth at boot if a
strategy's internal _oauth2 client is ever absent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>