Commit Graph
9894 Commits
Author SHA1 Message Date
Tom Moor 1268d5c250 fix: Account for Entra UPN during signin
closes #12973
2026-07-12 11:56:44 -04:00
Tom MoorandClaude Opus 4.8 8e032f8cd3 fix: Comments menu item does nothing when triggered from a document list (#12968)
* fix: Comments menu item does nothing from a document list

The openDocumentComments action only set the right sidebar state, which is
consumed exclusively by the mounted Document scene. Triggered from a document
list, no such scene exists, so nothing happened. Navigate to the document
first (unless already viewing it) so the comments sidebar can render.

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

* fix: Preserve sidebarContext when navigating from Comments menu item

Passing the current sidebarContext through the navigation state avoids
DocumentScene force-resetting the left sidebar to "collections".

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 00:00:44 +02: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 4fbea4c601 feat: Add preference to show comment marks in gutter (#12840)
* feat: Add pref for gutter comment marks

* simplify

* PR feedback

* wip

* Default enabled
2026-07-11 15:16:19 +02:00
Tom MoorandClaude f5b45e3d88 feat: section-aware unfurl previews for heading links (#12857)
* feat: section-aware unfurl previews for heading links

When a link targets a specific heading (URL hash anchor), the hover
preview now shows the content of that section rather than the top of
the document.

Adds DocumentHelper.getAnchorContent which extracts the Markdown for the
section beginning at the heading matching a given anchor, spanning until
the next heading of the same or higher level. The urls.unfurl endpoint
passes the URL hash through to the document presenter for both internal
and public share links.

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

* fix: retain heading anchor in internal document unfurl url

The internal-document unfurl branch never passed a url to the presenter,
so the response fell back to document.url without the hash. Clicking the
hover preview then navigated to the top of the document rather than the
summarized section. Re-append the anchor in the presenter fallback so the
unfurl points at the same heading it previews.

Also supports the mention anchorId path: document mentions serialize their
anchorId into the href hash, which flows through this same path.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-11 08:05:56 -04:00
Tom Moor cdc0316602 fix: Prevent collapsed sidebar opening during text selection (#12965) 2026-07-11 10:28:32 +00:00
Tom MoorandClaude Fable 5 c7a580fb8c Harden shared tree utilities and add test coverage (#12924)
* Harden shared tree utilities and add test coverage

- Fix ancestors() throwing a TypeError when a node's parent is undefined
  rather than null, which is the case for nodes that haven't been
  annotated by useCollectionTrees (e.g. shared trees from the server).
- Guard against malformed parent cycles in ancestors() so a bad tree can
  no longer hang the client.
- Compute descendants() depth limits relative to the given node during
  traversal instead of relying on optional absolute depth annotations,
  which silently returned an empty list when they were missing.
- Tolerate nodes without a children array in traversal.
- Remove type assertions, add JSDoc, and add collocated unit tests.

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

* Address review: exclude node from own ancestors on parent cycles

- Seed the cycle guard with the starting node so a malformed parent
  cycle can never include the node in its own ancestor list.
- Widen flattenTree's parameter to accept nullish roots so the runtime
  guard and the type contract agree.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-11 06:22:42 -04:00
tsushanth 0d255806a2 fix(mermaid): use opacity:0 render container to fix foreignObject sizing (#12872)
classDiagram, erDiagram, and requirementDiagram render node labels using
<foreignObject> elements. Browsers skip layout of <foreignObject> content
inside visibility:hidden SVGs, causing mermaid's layout engine to measure
zero-size labels and produce inflated viewBox dimensions (thousands of
pixels for a small diagram).

Switching the render container from visibility:hidden to opacity:0 keeps
the element in the render tree and fully laid out — preserving correct
getBBox() results for both regular SVG elements and foreignObject content —
without making the rendering visible to the user.

The cache prefix is bumped to v3 so previously mis-sized diagrams cached
under v2 are discarded and re-rendered correctly.
2026-07-10 19:42:02 -04:00
石岳峰andsyf2211 8b5f9cd456 fix(mcp): return text content for empty list tool results (#12864)
* fix(mcp): return text content for empty list tool results

When MCP list tools return zero items, success([]) previously produced
an empty content array. Anthropic's MCP connector rejects that format.

Return a single JSON text block for empty arrays so clients can
distinguish no results from a broken tool response.

Fixes #12858

* test(mcp): handle empty list sentinel in integration tests

Add parseMcpListContent helper for the [] sentinel block and update
list tool tests that can receive zero results.

* test(mcp): fix list_collections type assertion in integration test

---------

Co-authored-by: syf2211 <syf2211@users.noreply.github.com>
2026-07-10 19:34:56 -04:00
6a14ac8ae6 feat: Slab importer (#12859)
* Add Slab importer backed by the Markdown import pipeline

Slab exports a zip of Markdown documents that is structurally identical to
the Outline Markdown export, with one difference: images are referenced as
remote signed URLs rather than files inside the archive.

Rather than build a parallel importer, this reuses the Markdown task and
processor and teaches the shared import pipeline to download remote images:

- Enable per-page attachment upload for the Markdown task. The base
  APIImportTask already downloads remote image/video/attachment URLs and
  rewrites them to internal redirect URLs; the Markdown task previously
  opted out because its attachments live in the zip.
- Make the base upload step skip URLs that are already internal, so local
  zip attachments (resolved to redirect URLs during rewriteMarkdown and
  uploaded from the archive in onAllTasksCompleted) pass through untouched
  while remote URLs are fetched and re-hosted. Also guards the URL rewrite
  against nodes not present in the download map.
- Introduce IntegrationService.Slab as a distinct, importable service that
  routes through the Markdown task/processor, so imports are tracked and
  labelled as "Slab" with no duplicated import logic.
- Wire the create API (schema + route), the import settings UI (Slab card
  and dialog), and a placeholder logo asset.

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

* Add shell SlabAPIImportTask as a Slab-specific seam

Slab imports previously ran through MarkdownAPIImportTask directly. Introduce
a thin SlabAPIImportTask subclass so Slab gets its own task name (for
scheduling, tracing, and retries) and a dedicated place to override
behavior as Slab exports diverge from the generic Markdown shape.

The subclass inherits all conversion/attachment/persistence logic and only
overrides scheduleNextTask to keep the whole import chain on the Slab class.
MarkdownImportsProcessor now selects the task implementation by the import's
service when scheduling the first task.

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

* Unwrap single root "slab" directory in Slab imports

Slab exports wrap the entire workspace in a single top-level directory named
"slab". Without handling this, the import produces one "slab" collection
containing everything, instead of mapping each workspace area to its own
collection.

Add a `resolveCollectionRootNodes` seam on the Markdown bootstrap phase
(default: pass entries through unchanged) and override it in SlabAPIImportTask
to descend into a lone, case-insensitive "slab" root directory so its child
directories become collections. Paths are left intact, so the attachment
manifest, completion re-walk, and internal-link resolution stay consistent.

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

* Use the filename, not the first heading, as the title for Slab imports

In Slab a document's leading heading is real content, not its title — the
filename is authoritative. Add an `extractTitle` option to
DocumentConverter.convert (default true, preserving existing callers) that,
when false, skips lifting a leading H1 into the title and leaves it in the
body. Expose it through a `shouldExtractTitleFromHeading` seam on the
Markdown task and override it in SlabAPIImportTask. With no extracted title,
the page falls back to the filename-derived title.

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

* Update logo

* Narrow MarkdownAPIImportTask generic back to Markdown

Slab imports now run through SlabAPIImportTask, so the base Markdown task no
longer handles the Slab service directly and its generic can return to
Markdown-only. SlabAPIImportTask keeps a Markdown | Slab union on its
scheduleNextTask override, which is required so the override stays a valid
(contravariant) override of the base's Markdown-typed parameter.

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

* Optimised images with calibre/image-actions

* reorder

* Move Slab importer into its own plugin

Restructure the Slab importer to live in plugins/slab, mirroring the Notion
plugin, instead of being threaded through the core Markdown importer.

- plugins/slab/server registers SlabImportsProcessor (Hook.Processor) and
  SlabAPIImportTask (Hook.Task). The processor extends MarkdownImportsProcessor
  to claim the Slab service and schedule the Slab task; the task keeps its
  Slab-specific overrides (remote image download, root "slab" dir unwrap,
  filename-as-title).
- plugins/slab/client registers the Slab import card (Hook.Imports) and owns
  the import dialog.
- Revert MarkdownImportsProcessor to Markdown-only and drop the hardcoded Slab
  card from the Import settings screen.

The Slab service enum, import schema, and create route remain in core, as the
Notion plugin's equivalents do.

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

* Generalize DropToImport to accept an importable service

DropToImport previously branched on `format` to map MarkdownZip/JSON/Slab
to specific imports.create calls, with a dead collections.import fallback.
Replace this with a single `service` prop and one generic imports.create
call. Core no longer hardcodes any service name (notably the Slab plugin
service), and the Markdown, JSON, and Slab dialogs each pass their service.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-10 19:05:08 -04:00
Tom MoorandClaude f27e668783 fix: Stale closure and unsafe parsing in usePersistedState (#12935)
* fix: Stale closure and unsafe parsing in usePersistedState

- Compute functional updates from the latest state via the setStoredValue
  updater instead of a value captured in the setter's closure, and keep the
  setter's identity stable across value changes so it is safe to use in
  dependency arrays.
- Correct the setter's type so functional updates are typed as (prev: T) => T
  rather than (value: T) => void, and surface them in the returned tuple via
  Dispatch<SetStateAction<T>>.
- Guard the cross-tab storage listener against malformed JSON so a bad value
  written under the same key can no longer throw, and reset to the default
  value when the key is removed in another tab.
- Skip the redundant re-sync from storage on initial mount, which caused an
  extra render for object values.
- Add tests covering persistence, functional updates, setter stability,
  cross-tab sync, and key changes.

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

* chore: Remove usePersistedState test file

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

* fix: Keep state updater pure in usePersistedState

Move persistence out of the setStoredValue updater into the setter itself,
computing functional updates from a ref that mirrors the latest state. React
may invoke updaters more than once, so they must be free of side effects.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-10 19:04:13 -04:00
tsushanthandtsushanth 4122f3896c Fix image overflow in table cells by capping width with CSS min() (#12902)
Images with a stored pixel width (e.g. from paste) set an inline
style="width: 1920px" on the image-wrapper and img elements. In tables
without explicit colwidth attributes the browser uses table-layout: auto,
which lets cells expand to the element's preferred width. The existing
max-width: 100% in the ImageWrapper styled-component cannot constrain
the wrapper because 100% of the already-expanded cell is also 1920px.

Changing to width: min(Npx, 100%) breaks the expansion: during auto
table layout the browser resolves 100% against the table's available
width rather than the cell's inflated size, so the element's
min-content contribution stays bounded and the cell no longer grows
beyond its share of the table width.

Fixes #12866

Co-authored-by: tsushanth <t.sushanth@gmail.com>
2026-07-10 18:16:23 -04:00
Tom MoorandClaude Opus 4.8 96372c97b6 fix: Hand desktop sign-in back to the app on self-hosted deployments (#12952)
* fix: Hand desktop sign-in back to the app on self-hosted deployments

The desktop `/desktop-redirect` handoff — which bounces the transfer token
back into the app via the `outline://` protocol — was nested inside the
`env.isCloudHosted && team.subdomain` branch of `signIn`. On a self-hosted
deployment that branch is never taken, so a desktop OIDC (or any) sign-in fell
through to the single-domain path, which set an `accessToken` cookie in the
browser and redirected to the app's home. The desktop app never received the
token and appeared to hang on the SSO screen.

Move the desktop handoff out of the cloud-hosted guard so it runs for every
deployment. The cloud sessions cookie is still written for cloud-hosted teams
(web and desktop alike), and the web / single-domain redirects are unchanged.

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

* refactor: Encode transfer token in redirect URLs and clarify comment

Address PR review: URL-encode the transfer token before interpolating it into
the desktop-redirect and auth/redirect query strings so the value can't
truncate the query if the token format ever changes, and reword the comment
that inaccurately described a cookie being set in this branch.

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

* docs: Trim desktop redirect comment

Remove the trailing explanation added earlier; the comment reads cleaner
without it.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-10 17:42:33 -04:00
Tom Moor 96a5034714 fix: Long code words can overflow comment bounds (#12961)
* fix: Long code words can overflow comment bounds

* Add to RevisionViewer
2026-07-10 17:30:34 -04:00
Tom Moor 3539278653 chore: Flaky test (#12957) 2026-07-10 22:33:35 +02:00
Tom Moor 30730179b8 Add sidebarHidden option (#12947) 2026-07-10 12:35:21 +02:00
Tom Moor 0d02a99188 chore: Upgrade GH actions to latest (Node 24) (#12955) 2026-07-10 05:41:59 -04:00
Tom Moor f0f935e38e chore: Add missing corepack enable (Removed in Node 25) v1.9.0 2026-07-09 13:50:20 +02:00
Tom Moor fa0059faa9 v1.9.0 2026-07-09 12:17:46 +02:00
Salihu e9d1a2387d correctly paste doc links with hash (#12900)
* doc link with hash

* fix trim bug
2026-07-09 06:14:13 -04:00
Tom Moor 361c875d04 fix: Presigned POST with accelerate (#12946) 2026-07-09 05:27:38 -04:00
Tom Moor 6e2d26aa55 perf: Do not load webhook content during failure check (#12944)
* perf: Do not load webhook content during failure check

* PR feedback
2026-07-09 05:25:23 -04:00
ZhuoYang Wu(阿离) 49952b971f feat: Add HTML input support to MCP create_document (#12943) 2026-07-09 03:51:36 -04:00
Tom MoorandClaude Fable 5 032379da93 feat: Add support for OIDC provider returning JWT from userinfo endpoint (#12879)
* feat: Add support for OIDC provider returning JWT from userinfo endpoint

closes #12878

* PR feedback

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 16:28:13 +02:00
Tom MoorandClaude Fable 5 d15fb6c6bc Change MCP _update tools to return error with no changes (#12890)
* fix: Reject document updates that contain no updatable fields

A documents.update request carrying a valid id but no recognized body
field (e.g. text omitted, or an unmapped key stripped by validation)
previously returned 200 OK while writing nothing, so API and MCP
callers could believe content was persisted when nothing changed.

documentUpdater now throws a ValidationError when none of the
updatable properties are provided, making the no-op fail loud with a
400 for both the REST route and the MCP update_document tool. Requests
that only signal an editing session (done) or publish a draft continue
to work.

Closes #12875

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

* fix: Error on MCP document update with no fields provided

Scope the no-op guard to the MCP surface only, and derive it from the
provided input rather than a hardcoded list of properties: any key
other than id counts, since the tool schema already strips
unrecognized fields.

Closes #12875

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

* fix: Base MCP no-op update detection on whether the document changed

Compare the document's revisionCount before and after documentUpdater
runs instead of inspecting the request input. Every save increments
revisionCount, so an unchanged count means nothing was persisted —
this catches both requests with no recognized fields and requests
whose values are identical to the current document.

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

* fix: Extend no-op update detection to all MCP update tools

Apply the same fail-loud behavior to update_collection and
update_comment: check model.changed() before saving and return an
error when the request would persist nothing. Mark all three update
tools as non-idempotent since retrying an already-applied update now
returns an error rather than a second success.

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

* chore: Fix punctuation in no-op update error messages

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-08 08:31:35 -04:00
Tom MoorandClaude Opus 4.8 46b6fcfe9c feat: Allow matching block input rules after soft-break (#12925)
* feat: Allow matching block input rules after soft-break

* fix PR feedback, math block handling

* perf: stop soft-break scan at the cursor position

Replace parent.forEach with a manual loop that breaks once past the
cursor, avoiding unnecessary per-keystroke iteration over inline nodes
after the cursor in large blocks.

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 08:30:30 -04: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 3fcef8d68e fix: validateUrlNotPrivate hardening (#12938)
* fix: Validate all DNS records in validateUrlNotPrivate SSRF check

A hostname with multiple A/AAAA records would pass validation as long as
the first record returned was public, even if another record pointed at a
private or link-local address the connection could actually use. Resolve
with { all: true } and reject if any record is private and not allowlisted.

Also wrap DNS resolution failures in InvalidRequestError so an unresolvable
hostname returns a clean 400 instead of an unhandled ENOTFOUND.

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

* chore: Add explicit type for resolved DNS addresses

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-08 08:28:39 -04: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 MoorandClaude Opus 4.8 84e039feab feat: Allow setting alignment on table row selection (#12898)
* Allow setting cell alignment from the table row menu

Add an "Align" submenu to the table row selection toolbar, mirroring the
existing column alignment menu. A new setRowAttr command applies the chosen
alignment to every cell in the selected row(s).

Note that per-cell (row) alignment cannot be represented in the markdown
serialization of a table, which only supports per-column alignment, so it is
preserved in the collaborative document only.

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

* Remove setRowAttr tests

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

* reorder

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-08 08:55:38 +00:00
Tom MoorandCopilot Autofix powered by AI d67e682594 fix: Math formulas not rendering correctly in HTML/PDF output (#12939)
* fix: Math formulas not rendering correctly in HTML/PDF output

* Fix version exactly.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-08 08:50:57 +00:00
Tom MoorandClaude Fable 5 db1d93f9b5 perf: Use SCAN and batched UNLINK instead of KEYS in CacheHelper.clearData (#12934)
* perf: Use SCAN and batched UNLINK instead of KEYS in CacheHelper.clearData

The KEYS command blocks the Redis event loop while it walks the entire
keyspace, which stalls all other clients on large installations —
notably on startup where the whole unfurl cache prefix is cleared.
Replace it with incremental SCAN iteration and delete the matched keys
in batches with UNLINK, which reclaims memory asynchronously, so
neither discovery nor deletion blocks the server. Adds test coverage
for CacheHelper including multi-page prefix clears.

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

* fix: Address review comments on CacheHelper.clearData

Unlink each SCAN batch as the scan progresses instead of buffering all
matching keys in memory, repeating until a full pass matches nothing so
implementations with unstable scan cursors still clear every key. Wrap
the operation in try/catch with logging for consistency with the other
CacheHelper methods, and mark constants as readonly.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-08 04:42:02 -04:00
Tom MoorandClaude Opus 4.8 8ea04c3bd4 fix: Skip attachment work in exports when includeAttachments is false (#12933)
Gate the workspace attachment-size query behind includeAttachments so it
no longer runs when attachments are excluded, and thread includeAttachments
through the single-document export path (previously hardcoded to true).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 10:20:18 +02: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
dependabot[bot] 3b8938acc2 chore(deps): bump the sentry group across 1 directory with 2 updates (#12919)
Bumps the sentry group with 2 updates in the / directory: [@sentry/node](https://github.com/getsentry/sentry-javascript) and [@sentry/react](https://github.com/getsentry/sentry-javascript).


Updates `@sentry/node` from 10.62.0 to 10.63.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/10.62.0...10.63.0)

Updates `@sentry/react` from 10.62.0 to 10.63.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/10.62.0...10.63.0)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-version: 10.63.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: sentry
- dependency-name: "@sentry/react"
  dependency-version: 10.63.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: sentry
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 17:01:44 -04:00
Tom Moor 24cf34ac81 chore: Remove straggling mentions of prettier (#12907) 2026-07-06 22:57:56 +02:00
Tom MoorandClaude Opus 4.8 236eabdcc8 fix: Decode percent-encoded filenames from URLs (#12906)
getFileNameFromUrl returned the raw URL path segment, so attachments
created from a URL were stored with encoded names (e.g. "My%20File.pdf").
Decode the filename, falling back to the raw value on malformed encoding.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 22:57:50 +02:00
Tom Moor d3c085462d fix: Sensitive fields can leak into logging when non-primitive (#12910) 2026-07-06 22:57:43 +02:00
Tom Moor ec3b26241f chore: Reduce file scanning in PluginManager on startup (#12911) 2026-07-06 22:57:39 +02: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
dependabot[bot] d42660be55 chore(deps): bump the aws group with 6 updates (#12920)
Bumps the aws group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3) | `3.1075.0` | `3.1079.0` |
| [@aws-sdk/cloudfront-signer](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/cloudfront-signer) | `3.1074.0` | `3.1078.0` |
| [@aws-sdk/lib-storage](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/lib/lib-storage) | `3.1075.0` | `3.1079.0` |
| [@aws-sdk/s3-presigned-post](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/s3-presigned-post) | `3.1075.0` | `3.1079.0` |
| [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/s3-request-presigner) | `3.1075.0` | `3.1079.0` |
| [@aws-sdk/signature-v4-crt](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/signature-v4-crt) | `3.1075.0` | `3.1079.0` |


Updates `@aws-sdk/client-s3` from 3.1075.0 to 3.1079.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1079.0/clients/client-s3)

Updates `@aws-sdk/cloudfront-signer` from 3.1074.0 to 3.1078.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/cloudfront-signer/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1078.0/packages/cloudfront-signer)

Updates `@aws-sdk/lib-storage` from 3.1075.0 to 3.1079.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/lib/lib-storage/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1079.0/lib/lib-storage)

Updates `@aws-sdk/s3-presigned-post` from 3.1075.0 to 3.1079.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/s3-presigned-post/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1079.0/packages/s3-presigned-post)

Updates `@aws-sdk/s3-request-presigner` from 3.1075.0 to 3.1079.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/s3-request-presigner/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1079.0/packages/s3-request-presigner)

Updates `@aws-sdk/signature-v4-crt` from 3.1075.0 to 3.1079.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/signature-v4-crt/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1079.0/packages/signature-v4-crt)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-s3"
  dependency-version: 3.1079.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/cloudfront-signer"
  dependency-version: 3.1078.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/lib-storage"
  dependency-version: 3.1079.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/s3-presigned-post"
  dependency-version: 3.1079.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/s3-request-presigner"
  dependency-version: 3.1079.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/signature-v4-crt"
  dependency-version: 3.1079.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 16:39:49 -04:00
Tom Moor 810d8999c3 chore: Modernize download lib (#12905) 2026-07-06 16:14:22 -04:00
Tom MoorandClaude Fable 5 2b6ee79778 fix: all _FILE suffix secrets in env are cemented at startup (#12889)
* fix: Resolve _FILE env secrets lazily to avoid clobbering third-party variables

The Docker-style secrets support added in #11906 eagerly copied every
*_FILE environment variable into its base variable at boot. This broke
AWS SDK credential refresh on EKS Pod Identity: the rotating token in
AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE was frozen into the static
AWS_CONTAINER_AUTHORIZATION_TOKEN variable, which the SDK prefers and
never re-reads, so S3 access failed once the boot-time token expired.
It similarly resolved the standard OpenSSL SSL_CERT_FILE CA bundle into
Outline's SSL_CERT setting, failing validation at startup.

File secrets are now resolved lazily through a proxy when a variable is
read off the environment export, which limits resolution to variables
declared on the Environment classes, and SSL_CERT_FILE is explicitly
reserved for OpenSSL.

Fixes #12885

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

* refactor: Generalize reserved file variable documentation

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

* refactor: Clear SSL_CERT_FILE in test environment instead of reserving it

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

* docs: Trim withFileSecrets JSDoc

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-06 16:14:03 -04:00
Tom Moor 3cc39e61c0 fix: timeout leak in useIdle (#12908) 2026-07-06 16:13:47 -04:00
Tom Moor a60373118c fix: Handle transient errors in HealthMonitor (#12913) 2026-07-06 16:13:32 -04:00
Tom Moor 9fb23f1f03 fix: useMediaQuery value incorrect on first render (#12914)
* fix: useMediaQuery value incorrect on first render

* Guard window usage
2026-07-06 16:13:19 -04:00
dependabot[bot] dd87174766 chore(deps): bump the radix-ui group with 12 updates (#12921)
Bumps the radix-ui group with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [@radix-ui/react-collapsible](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/collapsible) | `1.1.14` | `1.1.15` |
| [@radix-ui/react-context-menu](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/context-menu) | `2.3.1` | `2.3.2` |
| [@radix-ui/react-dialog](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/dialog) | `1.1.17` | `1.1.18` |
| [@radix-ui/react-dropdown-menu](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/dropdown-menu) | `2.1.18` | `2.1.19` |
| [@radix-ui/react-one-time-password-field](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/one-time-password-field) | `0.1.10` | `0.1.11` |
| [@radix-ui/react-popover](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/popover) | `1.1.17` | `1.1.18` |
| [@radix-ui/react-select](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/select) | `2.3.1` | `2.3.2` |
| [@radix-ui/react-switch](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/switch) | `1.3.1` | `1.3.2` |
| [@radix-ui/react-tabs](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/tabs) | `1.1.15` | `1.1.16` |
| [@radix-ui/react-toolbar](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/toolbar) | `1.1.13` | `1.1.14` |
| [@radix-ui/react-tooltip](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/tooltip) | `1.2.10` | `1.2.11` |
| [@radix-ui/react-visually-hidden](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/visually-hidden) | `1.2.6` | `1.2.7` |


Updates `@radix-ui/react-collapsible` from 1.1.14 to 1.1.15
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/collapsible/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/collapsible)

Updates `@radix-ui/react-context-menu` from 2.3.1 to 2.3.2
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/context-menu/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/context-menu)

Updates `@radix-ui/react-dialog` from 1.1.17 to 1.1.18
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/dialog/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/dialog)

Updates `@radix-ui/react-dropdown-menu` from 2.1.18 to 2.1.19
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/dropdown-menu/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/dropdown-menu)

Updates `@radix-ui/react-one-time-password-field` from 0.1.10 to 0.1.11
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/one-time-password-field/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/one-time-password-field)

Updates `@radix-ui/react-popover` from 1.1.17 to 1.1.18
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/popover/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/popover)

Updates `@radix-ui/react-select` from 2.3.1 to 2.3.2
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/select/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/select)

Updates `@radix-ui/react-switch` from 1.3.1 to 1.3.2
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/switch/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/switch)

Updates `@radix-ui/react-tabs` from 1.1.15 to 1.1.16
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/tabs/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/tabs)

Updates `@radix-ui/react-toolbar` from 1.1.13 to 1.1.14
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/toolbar/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/toolbar)

Updates `@radix-ui/react-tooltip` from 1.2.10 to 1.2.11
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/tooltip/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/tooltip)

Updates `@radix-ui/react-visually-hidden` from 1.2.6 to 1.2.7
- [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/visually-hidden/CHANGELOG.md)
- [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/visually-hidden)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-collapsible"
  dependency-version: 1.1.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-context-menu"
  dependency-version: 2.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-dialog"
  dependency-version: 1.1.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-dropdown-menu"
  dependency-version: 2.1.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-one-time-password-field"
  dependency-version: 0.1.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-popover"
  dependency-version: 1.1.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-select"
  dependency-version: 2.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-switch"
  dependency-version: 1.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-tabs"
  dependency-version: 1.1.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-toolbar"
  dependency-version: 1.1.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-tooltip"
  dependency-version: 1.2.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
- dependency-name: "@radix-ui/react-visually-hidden"
  dependency-version: 1.2.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: radix-ui
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 16:12:38 -04:00