* 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>
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>
* fix: Lightbox effect tweaks
* refactor
* refactor
* fix: Address review feedback on image lightbox
- Use useLayoutEffect in useHideElement to hide/restore before paint
- Intersperse separators between image hover actions to avoid orphaned dividers when Download is hidden in edit mode
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat: Record search query duration in milliseconds
Adds a `duration` column to search_queries that stores how long each
search took, including result presentation time.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Cmd+A in image caption selects caption text, not whole document
* fix: Share caption Cmd+A select-all and fix placeholder rendering
Move the Cmd/Ctrl+A select-all handling into the shared Caption
component so image and video captions both select their own text
instead of the whole document. Also fix a stray brace in the caption
styles that corrupted the empty-caption placeholder rendering.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The FileOperation-based ImportTask was superseded by the APIImportTask
pipeline (JSON/Markdown/Notion) in #12361 and #12380. Nothing extends or
imports it any longer.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Allow webhook urls without a top-level domain when self-hosted
Webhook URL validation required a top-level domain, rejecting valid
internal hostnames such as http://webhook on self-hosted installations.
The TLD requirement is now only enforced when cloud hosted.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor: Extract webhook url validation into reusable IsUrl decorator
Move the conditional top-level domain validation into a reusable IsUrl
validator alongside the other model validators, and restore mocks
between create tests to keep hosting mode isolated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test: Move webhook url validation tests onto IsUrl validator
The top-level domain validation is owned by the IsUrl decorator, so test
it directly via a collocated unit test rather than through the
webhookSubscriptions API.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* PR feedback
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>