RFC 7591 §2 marks every client metadata field as OPTIONAL. Outline's
schema currently treats client_name as required, which rejects MCP
clients that omit it during dynamic registration. The field becomes
optional and a generic 'Untitled application' label is used when the
caller doesn't supply one.
Drop rejectOnEmpty so a deleted team yields null and the existing optional
chaining guard short-circuits the no-op transaction.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The team or user can be deleted before the async processor runs, so
gracefully skip the avatar upload instead of throwing.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat(editor): support image corner drag resizing with aspect ratio lock
- Implement circular corner drag handles (ResizeTopLeft, ResizeTopRight, ResizeBottomLeft, ResizeBottomRight) using theme selection color.
- Update useDragResize hook to track coordinates as {x,y} object and handle aspect-ratio locked sizing for corner drags.
- Set overflow: visible on ImageWrapper to prevent corner handles from being clipped, and fade them in on hover.
* refactor(editor): simplify ResizeCorner styles by removing background and shadow properties
* fix(editor): fix corner resize speed and sync inputs in real-time
* fix(editor): improve corner resize cursor tracking and drag cursors
Project corner drag deltas onto the aspect-ratio vector so resizing
follows the pointer at 1x speed. Add a body class and global cursor
styles during image/media resize drags.
* refactor(editor): use relative import path inside shared directory
* fix(editor): resolve typescript type mismatch on dragging property in PDF component
* 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>
* fix: correct find-and-replace highlight positions for CJK/Hangul text
The in-document find feature searched over `deburr(text) + text` and assumed
the deburred prefix had the same length as the original, mapping match indices
with `m.index - text.length`. `deburr` normalizes to NFD form, which decomposes
precomposed CJK/Hangul syllables (e.g. "강" is one UTF-16 code unit but
decomposes into three jamo), so the deburred prefix is longer than the original.
This broke the boundary assumption, producing misaligned highlights, undercounted
matches, and out-of-bounds positions (the "array index out of bounds" console
error from expandCollapsedCodeBlockForCurrentMatch).
Replace the length-based offset math with an explicit index map built by
`deburrWithMap`, which records the original index of every emitted code unit.
The text is searched both deburred (diacritic-insensitive) and verbatim, with
each match translated back to its true position via the map.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAYuiMFqpBNbCPirhe8yk
* refactor: extract deburrWithMap into its own module with unit tests
Move the diacritics-stripping/index-map helper out of the extension into a
dedicated module so it can be unit-tested in isolation without pulling in the
editor's React/ProseMirror component tree. Add tests covering ASCII, diacritics,
Hangul (NFD-expanded) text, ASCII matches surrounded by CJK, and surrogate pairs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAYuiMFqpBNbCPirhe8yk
* perf: add fast path to deburrWithMap to avoid per-character work
Only build the per-character index map when deburring actually changes the
string length (NFD-decomposed CJK/Hangul, expanded ligatures). For ASCII and
ordinary accented Latin text – where length is preserved and indices line up
1:1 – return an identity mapping with no per-character table, and skip the
redundant second search pass over deburred text when it equals the original.
Within the slow path, skip normalization of ASCII characters.
This keeps the common case as cheap as a single deburr() call (~0.4ms/keystroke
on a 100k-char document) and roughly halves the mixed-CJK cost.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAYuiMFqpBNbCPirhe8yk
* test: cover interleaved ASCII and Hangul in deburrWithMap
Verify the index map stays consistent when ASCII characters (which take the
fast skip branch) are interleaved with Hangul characters (which decompose under
NFD), so every ASCII match still resolves to its exact original code unit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAYuiMFqpBNbCPirhe8yk
* fix: skip zero-length deburred matches and reduce slow-path allocations
Address review feedback on the CJK find-and-replace fix:
- A regex match against the deburred text can cover only part of a decomposed
sequence (e.g. a single jamo of a Hangul syllable), which maps back to a
zero-length range in the original text. Recording such a range made replace
behave like an insert (from === to); skip matches where to <= from.
- Build the deburred string in the slow path by joining an array of parts once
instead of repeated string concatenation in the loop, keeping it linear with
less allocation churn.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAYuiMFqpBNbCPirhe8yk
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Retain location state when clicking on hash links in doc and TOC
* fix: Pass explicit location fields when navigating to hash links
Avoid spreading history.location (which carries internal fields like key)
and preserve the href's query string for absolute same-path links.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Refactor to patchLocation helper
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The secrets context is not available in step-level if conditions, which
made the workflow file invalid. Map the secret to an env var and test
that instead.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix(test): restore plugin loading under Vite 8
Vite 8 dropped support for extglob negation (`!(...)`) in glob patterns,
so the test setup's plugin glob matched zero files and no plugin routes
were registered, causing every plugin API test to 404. Use Vite's
array-with-negative-patterns syntax to exclude test and schema files.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* ci: run relative-ci agent action only when key secret is present
* ci: gate RelativeCI step on secret directly, drop redundant env block
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: umbraci <umbraci@qq.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Include surrounding container in document mention emails
getNodeForMentionEmail only preserved tables and checkbox lists around a
mention; mentions inside bullet/numbered lists, blockquotes and notices were
returned as a bare paragraph with their structure stripped. Add those
containers so the snippet keeps its context.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor: Resolve mention position and walk ancestors for email snippet
Replace the top-down scan-and-guess over a block-node allowlist with a single
position resolve and an ancestor walk. Behaviour is unchanged — same outermost
container, minified to the child on the path to the mention — but extraction is
idiomatic ProseMirror and drops the redundant subtree traversals.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor: Size-bound mention email snippet, drop container special-casing
Replace the per-type container allowlist and minify logic with a single rule:
climb the mention's ancestor chain outward and keep the largest complete block
that still fits a character budget. This drops all special-casing, is robust to
new node types, and naturally bounds snippet size.
Semantics change accordingly — a small container is now shown whole (with its
sibling rows/items) rather than minified to the mention's child, degrading to an
inner block once the container overflows the budget. Tests updated to match.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat: Window mention email snippet to nearby list items
Lists can be long, so instead of including the whole list as the size-bounded
walk would, trim a surrounding list to the mentioned item plus one sibling on
either side. Uses the nearest list ancestor so nested lists show the items
closest to the mention. Non-list content keeps the size-bounded behaviour.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Ensure mention in doc emails always include context
* PR feedback
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
An empty Notion table was converted to a schema-invalid table node with
no rows. Node.fromJSON accepts it, but Markdown serialization then crashed
in renderTable's node.child(0), surfacing only "Index 0 out of range for <>".
Drop empty tables in the Notion converter, and guard renderTable against
tables with no rows so any source is handled safely.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Add composite (userId, createdAt) index for searches.list
The searches.list endpoint filters by userId/teamId and orders by
createdAt DESC, but search_queries only had single-column indexes. Since
a row is inserted on every search, the table grows large and the planner
must either fetch and sort a user's entire search history or scan the
createdAt index until enough matching rows are found — both proportional
to history size rather than page size.
Add a composite index on (userId, createdAt) so the query can seek
directly to the user's rows in createdAt order and stop after LIMIT rows.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wAHcneY9eV4fZtCBq8Ue3
* Drop redundant userId and unused createdAt indexes on search_queries
With the new (userId, createdAt) composite index in place, the
single-column userId index is fully redundant (covered as a leftmost
prefix) and the createdAt index is unused — no query orders or filters
by createdAt without also constraining userId. Dropping both removes
index-maintenance overhead on the high-write search_queries table. The
teamId index is kept for the team permanent deleter.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wAHcneY9eV4fZtCBq8Ue3
* Use CONCURRENTLY for search_queries index changes to avoid table locks
Switch the composite index creation and the redundant index drops to raw
CREATE/DROP INDEX CONCURRENTLY IF [NOT] EXISTS so the migration takes no
blocking lock on the high-traffic search_queries table. The migration
runner (Umzug) does not wrap migrations in a transaction, so CONCURRENTLY
is safe here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wAHcneY9eV4fZtCBq8Ue3
---------
Co-authored-by: Claude <noreply@anthropic.com>
When the desktop app forces a passkey login it opens the login page in the
system browser, where the passkey ceremony is triggered automatically. Show
the same "Signing in" screen used during desktop redirect instead of the
login buttons, since no manual interaction is needed. The passkey provider
stays mounted to drive the ceremony and reveals a retry button if it fails.
Claude-Session: https://claude.ai/code/session_01SEx6QwWA3v1pghHtN8XYy2
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Vertically center empty state in notifications popover
The empty state relied on percentage heights to center, but the
height chain was broken by the outer container only setting min/max
height. Switch to flexbox growth so the scroll region fills the
available space and the empty message centers reliably.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J7kMKxnH5gfziT5GNgsXZW
* chore: Add development util to create test notifs
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Mobile spacing fixes
* Keep mobile selection toolbar sticky above the iOS keyboard
The mobile selection toolbar positioned itself with absolute positioning
and a bottom calc derived from the document body rect and visual viewport
height. On iOS the layout viewport (which fixed/absolute elements anchor
to) does not shrink when the software keyboard opens, only the visual
viewport does, so the toolbar drifted and lagged relative to the keyboard.
Anchor the toolbar with position: fixed; bottom: 0 and introduce
useKeyboardStickyOffset, which translates it up by the gap between the
layout and visual viewport bottoms. It recomputes on visual viewport
resize/scroll and runs a short requestAnimationFrame loop so the toolbar
glides with the keyboard's open/close animation, and re-applies after every
render so parent re-renders cannot clobber the offset.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Replace the fixed 12-line collapse threshold with one derived from the
viewport height, so a code block is collapsible when its estimated height
exceeds half the screen rather than an arbitrary line count.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Treat legacy boolean commenting preference as disabled
Teams not yet migrated to the CommentingAccess enum may still have a
boolean `false` stored for the commenting preference. Guard the
enabled checks so `false` reads as disabled rather than enabled.
* Move commenting setting from Details to Security settings
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>