Commit Graph
349 Commits
Author SHA1 Message Date
Tom Moor b72fd33e9c fix(editor): Use lazyWithRetry for shared editor lazy components (#13868)
Moves lazyWithRetry to shared/utils so the editor's ColorSwatch and
Mentions components can use it instead of React.lazy, avoiding the
Suspense reveal throttle once the chunk is loaded.
2026-09-23 20:50:37 -04:00
Tom Moor 660fb59cee fix: Clear stale unsynced warnings after tab broadcasts (#13860) 2026-09-23 18:57:38 -04:00
Tom Moor ad04aed6ef fix: Editor content delayed by React 19 Suspense reveal throttle (#13817)
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.
2026-09-20 16:54:56 -04:00
Tom Moor 9839ad8182 fix: Send analytics events through gtag and track WebMCP tool registration (#13792)
* fix: Send analytics events through gtag and track WebMCP tool registration

* Track WebMCP registration without a tool count
2026-09-18 08:58:01 -04:00
Tom Moor fe409306f4 fix: Warn before leaving a document with unsynced edits (#13738)
* fix: Warn before leaving a document with unsynced edits

* refactor: Move unsynced change tracking into CollaborationProvider

* refactor: Move collaboration event types next to CollaborationProvider

* fix: Pending changes stuck after the collaboration connection is restored

* chore: Log collaboration sync state changes in development

* fix: Report lost local persistence in the leave prompt

* fix: Stop local persistence when the initial read fails

* fix: Stop local persistence when a write aborts

* Remove test
2026-09-17 20:54:06 -04:00
Tom MoorandClaude Opus 5 cc15b088ec feat: Show a toast with actions when a file download completes in the desktop app (#13769)
* Show toast with actions when a file download completes

In the desktop app a toast is now displayed when a file finishes
downloading, with the option to open the file or reveal it in the file
manager of the operating system.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kat47mueTm3CUZSbDVfBas

* Guard download bridge calls for older desktop apps

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kat47mueTm3CUZSbDVfBas

* Change protocol in dev for easier testing

* Use standard buttons stacked below the file name in download toast

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-17 19:36:47 -04:00
Tom Moor f9eac2733f fix: Suppress WebMCP registration warning on abort teardown (#13642)
* fix: Suppress WebMCP registration warning on abort teardown

* refactor: Coerce rejection with toError
2026-09-04 09:50:32 +00:00
Tom Moor a531c2b02e feat: WebMCP support (#13576)
* feat: WebMCP support — expose command bar actions as browser model context tools

* fix: Handle async rejection from WebMCP registerTool

* Surface errors

* Suppress action factories in webMCP
2026-09-03 01:36:05 -04:00
Tom Moor 57c110dbe5 chore: Upgrade MobX (#13554)
* Upgrade Mobx

* fix: Enforce MobX action boundaries

* fix: Wrap static observable updates in actions

* Remove iteration tests
2026-09-02 20:31:37 -04:00
Tom Moor 2dfc26f14b fix: Provision OIDC users with locale claim (#13601) 2026-09-01 02:36:21 -04:00
Tom MoorandClaude Opus 5 d8d8f2fffe Support HEIC and HEIF avatar uploads with in-browser conversion (#13577)
* feat: Support HEIC avatar uploads with in-browser conversion

HEIC and HEIF images picked for an avatar are now converted to JPEG in
the browser before the cropper opens. The browser's own decoder is used
when it supports the format, otherwise a WebAssembly decoder is loaded
on demand.

Also collects the image utilities into an ImageHelper class, fixes the
crop dialog's submit button never disabling, and stops the upload from
forwarding request headers the browser controls itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* refactor: Use only the browser's own HEIC decoder

Drops the bundled WebAssembly decoder in favour of the browser's native
support. This removes an LGPL dependency and a 3MB lazy chunk, and lets
the Content Security Policy stay as it was.

Browsers without HEIC support now get a message asking for a JPEG or PNG.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: Add class-level JSDoc to ImageHelper

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 00:13:56 -04:00
Tom MoorandClaude Fable 5 a7aac841cf chore: Vendorize y-indexeddb persistence (#12918)
* chore: Vendorize y-indexeddb persistence

Replaces the y-indexeddb dependency with a small typed module in
app/utils/IndexeddbPersistence.ts so we have full control over the
underlying database rows. The IndexedDB schema is unchanged and remains
compatible with databases created by y-indexeddb, so existing local
caches continue to work.

Differences from upstream:
- Promise-based API (whenSynced) instead of the lib0 Observable events,
  which simplifies MultiplayerEditor and lets it handle environments
  where IndexedDB exists but cannot be opened (e.g. Firefox private
  browsing) by falling back to no local persistence.
- Skips writing an empty state row every time a document is opened.
- Exposes a public compact() to merge all rows into one on demand.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9

* chore: Remove persistence tests and fake-indexeddb dependency

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9

* chore: Make trim size a private class member, drop unused custom store

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9

* fix: Guard async persistence callbacks against post-cleanup state updates

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYncL4PQ5jaEeMBNgjRzf9

* Added onversionchange handler

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-27 17:35:21 -04:00
Tom Moor 1ca8335717 fix: Recover from closed IndexedDB connections in store persistence (#13523)
* fix: Recover from closed IndexedDB connections in store persistence

StorePersistence cached a single IDBDatabase forever, so once the browser
or another tab closed the connection every subsequent hydrate, flush and
clear threw against a dead handle.

- Close and forget the connection on versionchange, so another tab is
  never blocked from deleting or upgrading the database
- Discard the cached connection on close, open error and blocked, and
  retry once against a fresh connection when one was closed underneath us
- Close open connections before deleteAllDatabases removes them, which
  also stops logout recreating the databases it just deleted

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: Cancel pending writes when store persistence is disabled

A debounced flush scheduled before disabling would still fire, reopening
and recreating the database that deleteAllDatabases had just removed.
2026-08-22 19:01:39 -04:00
Tom Moor 26f6ed96f0 fix: Recover from mismatched chunks after a deploy (#13489)
A dynamic import can resolve to a chunk from a different build, throwing
"does not provide an export named", which was not recognized as a chunk
error. Share one stale chunk matcher between the lazy import retry, the
error boundary, and Sentry so all three treat it as recoverable.

Fixes OUTLINE-CLOUD-D1M
2026-08-19 08:06:26 -04:00
Tom MoorandClaude f668a24663 feat: Persist policies to IndexedDB so abilities survive reload (#13138)
* 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>
2026-08-16 14:13:06 -04:00
Tom MoorandClaude Opus 5 fcae7b3c57 fix: Pages fail to load on older browsers (#13450)
* fix: Shared pages fail to load on older browsers

Object.hasOwn is unavailable before Chrome 93 and Safari 15.4, and
es-toolkit calls it directly from isEqualWith, which useActionContext
runs on every render. Add a polyfill applied at module scope, ahead of
the other imports, so it covers dependency evaluation and first render.

Fixes OUTLINE-CLOUD-D0W

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Define the polyfill as non-enumerable to match the native property

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-15 20:14:23 -04:00
Tom Moor c316c2bbb7 perf: Reduce Sentry span volume from browser tracing (#13389)
Resource timing spans made up ~84% of all spans sent, driven by the number
of code-split chunks loaded per pageload. Filter them out along with pageload
connection phases and performance mark/measure entries, and halve the traces
sample rate.
2026-08-12 08:18:27 -04:00
Tom Moor 374f5ad403 feat: Open internal links in split view with modifier click (#13368) 2026-08-10 20:27:53 -04:00
Tom Moor 2be80e6401 fix: Revert framer async load (#13384) 2026-08-10 20:27:06 -04:00
Tom Moor b7d942b663 perf: Remove Mermaid from initial bundle (#13380) 2026-08-10 18:54:07 -04:00
Tom MoorandClaude Opus 5 e65c86a4a3 fix: Suppress global shortcuts when focus is in a keyboard control (#13369)
Single-letter shortcuts such as "m" to move a document were still active
while a menu or dialog held focus, competing with the control's own key
handling. Generalizes the existing text input check to cover any element
inside a widget that handles its own keyboard input.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 23:39:37 -04:00
Tom Moor 9d7b7da625 fix: Improve BadGatewayError reporting (#13341)
Error names were mangled by the production build and 502 responses often
have an empty body, so these were reported without a usable title. Errors
now carry an explicit name, the message includes the endpoint, and 502s are
grouped per endpoint.
2026-08-07 17:53:56 -04:00
Tom Moor d6d11171c3 Rename Members -> Users (#13262) 2026-08-02 14:46:20 -04:00
Tom Moor 890f0451a8 feat: Multi-select documents (#13041)
* first pass

* refactor

* refactor

* wip

* Fix BatchableApiMethods docs; remove ApiClient batch test

* Refactor actions

* refactor batch send to share error code handling

* Remove multi-select from read-only
Refactor performBatch to common

* refactor
2026-08-01 20:45:20 -04:00
Tom Moor 9a50a980f8 Update CSRF handling to set secure host-bound where possible (#13203) 2026-07-30 17:27:11 -04:00
Tom Moor 3260153f9c fix: Suppress 499 error reporting (#13165) 2026-07-27 18:15:50 -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
Copilot 796adb8b22 Rename split-view route helper to isSplittablePath (#13125) 2026-07-25 07:57:19 -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 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 Moor 30730179b8 Add sidebarHidden option (#12947) 2026-07-10 12:35:21 +02:00
Tom MoorandClaude Fable 5 a1d0520c9f Add missing JSDoc to exported members in app and server utils (#12940)
* Add missing JSDoc to exported members in app and server utils

Documents all exported functions, classes, enums, and constants in
app/utils and server/utils that were missing JSDoc, per the project
documentation guidelines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsEQYA8zN813thxu7GjjzU

* Use @returns tag to match codebase convention

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsEQYA8zN813thxu7GjjzU

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-08 08:30:11 -04: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 Moor 810d8999c3 chore: Modernize download lib (#12905) 2026-07-06 16:14:22 -04:00
Tom Moor 79da8314f1 fix: Cannot connect existing workspace when signed into multiple (#12870) 2026-07-01 16:56:43 -04: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 d1db510a5a Auto-reload on repeated chunk failure (#12841)
* Auto-reload on repeated chunk failure

* Fail safe in private browser
2026-06-25 21:09:28 -04:00
Yinhao HuangandClaude Opus 4.8 6286d08171 feat: support presigned PUT uploads for S3-compatible storage (#12748)
* feat: support presigned PUT uploads for S3-compatible storage

Add `AWS_S3_UPLOAD_METHOD` config ("post" default / "put") so providers
that do not implement presigned POST (e.g. Cloudflare R2) can use
presigned PUT instead.

- BaseStorage.getPresignedPut() returns undefined by default; S3Storage
  overrides with PutObjectCommand + getSignedUrl.
- Content-Length is signed into the presigned PUT URL so S3 rejects
  uploads that do not match the declared size.
- API route and MCP tool branch on the config: only one upload method
  is returned per request.
- Frontend uses existing presignedPutUrl presence check — unchanged.
- When put is configured but unsupported (e.g. LocalStorage), a clear
  InvalidRequestError is returned.

Defaults to "post" — zero behavior change for existing deployments.

* refactor: return explicit upload mode instead of inferring from fields

Address review feedback from @tommoor: the client should not need to
infer the upload method from the presence of presigned-PUT-specific
fields. The API now returns an explicit `mode` ("put" | "post"), and the
PUT branch uses generic `url` / `headers` fields so the client has no
special knowledge of "presigned puts".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* refactor: use this.getBucket() in presigned post/put methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 21:05:16 -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 cd4b324f5a chore: Upgrade dd-trace and Sentry (node/react) to v10 (#12759)
Bumps dd-trace to ^5.109.0 and @sentry/node + @sentry/react to ^10.58.0,
migrating off APIs removed in the Sentry v8 major: BrowserTracing /
reactRouterV5Instrumentation, Sentry.Handlers.parseRequest, and
Sentry.configureScope.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 20:50:45 -04:00
Tom Moor 66eee9007f chore: Upgrade to Typescript 6 (#12737)
* chore: Upgrade TypeScript to 6.0
2026-06-18 17:34:05 -04:00
Tom MoorandClaude Opus 4.8 061aee0225 chore: Improve ApiClient class (#12720)
* refactor: Decouple ApiClient from auth store and document its public surface

Move logout policy out of the transport layer: ApiClient now notifies a
registered handler on unauthenticated responses (401 / suspended 403) instead
of calling stores.auth.logout directly, breaking the AuthStore -> client ->
stores import cycle. AuthStore owns the logout flags and registers the handler.

Also add JSDoc across the public surface (setShareId, fetch, get, post, client).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* refactor: Extend request deduplication to PUT via shared helper

Extract the in-flight dedup logic into a private deduplicate() helper and route
both post() and the new put() through it. The dedup key now includes the HTTP
method so a POST and PUT to the same path can't collide. Multipart uploads
continue to bypass deduplication.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Improve types

* refactor: Improve ApiClient type safety and address review feedback

- Add a Method union ("GET" | "POST" | "PUT") for fetch/deduplicate, replacing
  the loose string type. Narrowed to methods whose bodies are actually
  serialized, so callers aren't given false support for PATCH/DELETE.
- Type previously implicit-any locals (modifiedPath, urlToFetch, isJson).
- Extract an ApiErrorResponse interface for the parsed error payload.
- Register the unauthorized handler before fetchAuth() so a 401 on the initial
  auth request triggers the logout policy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 22:28:22 -04:00
Tom Moor c1010fc410 fix: Back to using relative path 2026-05-16 21:08:03 -04:00
Tom Moor 061ba46255 fix: Unable to link secondary auth provider on custom domain (#12356)
* fix: Unable to link secondary auth provider on custom domain

* doc
2026-05-14 21:02:12 -04:00
Tom Moor 935e0bb7b9 chore: Fix all no-misused-spread lint warnings (#12327) 2026-05-12 17:30:08 -04:00
Tom Moor 8371d709dd fix: Regression in client plugins not loading (#12291) 2026-05-07 15:44:30 -04:00
Tom MoorandClaude Opus 4.7 091346dfe8 chore: Migrate to vitest (#12272)
* wip

* Remove obsolete snapshots

* simplify

* chore(test): Convert mocks to TypeScript and tighten fetch mock types

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Remove unneccessary patches

* Migrate to msw instead of custom fetch mock

* Address PR review comments

- Split chained vi.useFakeTimers().setSystemTime() into separate calls.
- Switch test setup to dynamic imports so EventEmitter.defaultMaxListeners
  assignment runs before module init (static imports were hoisted above it).
- Drop redundant NODE_ENV guard in monkeyPatchSequelizeErrorsForJest; its
  sole caller already gates on env.isTest.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 21:10:51 -04:00
Tom Moor 0139b91b5d chore: Replace lodash with es-toolkit (#12281)
* chore: Replace lodash with es-toolkit

Migrate all direct lodash imports to es-toolkit/compat for a smaller,
faster, lodash-compatible utility library. Transitive lodash usage from
other packages remains unchanged.

* fix: Restore isPlainObject semantics in CanCan policy

The lodash migration aliased `isObject` to `lodash/isPlainObject` and
the codemod incorrectly mapped the local name to es-toolkit's `isObject`,
which also returns true for arrays and functions. This caused condition
objects in policy definitions to be skipped, breaking authorization
checks across the codebase.

* fix: Restore unicode-aware length counting in validators

es-toolkit/compat's size() returns string.length, while lodash's _.size()
counts unicode code points. Switch to [...value].length to preserve the
previous behavior so multi-byte characters like emoji count as one.
2026-05-06 21:03:47 -04:00
Tom Moor 61709ea42e fix: Minor warnings on login screen (#12250) 2026-05-03 08:34:52 -04:00
Tom Moor f50bb00b29 Refactor of OAuth account linking flows (#12246)
* Refactor of OAuth account linking flows

* PR feedback
2026-05-02 18:54:38 -04:00