Commit Graph
10200 Commits
Author SHA1 Message Date
tsushanth e80d95df23 fix: [Bug] "All members" set to "Can Edit" on Collection permissions defaults to read-only (#13392) 2026-08-12 08:07:45 -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 MoorandClaude Opus 5 c29c97441d Stabilize command bar result ordering (#13382)
* fix: Command bar options changing as the menu animates away

Freeze the rendered results while the command bar is animating out, so
that navigation triggered by the selected action cannot reorder or
resize the list that is still on screen.

Also order sections by their declared priority in all cases – a section
that declares no priority was falling back to the fuzzy match score of
its first result, and recent searches shared a heading with recently
viewed documents, so both groups moved around unpredictably.

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

* fix: Record the last command bar matches after render, not during

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 19:55:29 -04:00
Tom Moor 65603756d6 fix: isNode detection 2026-08-10 18:58:54 -04:00
Tom Moor b7d942b663 perf: Remove Mermaid from initial bundle (#13380) 2026-08-10 18:54:07 -04:00
dependabot[bot] 5e815e6ce8 chore(deps): bump the aws group with 5 updates (#13373)
Bumps the aws group with 5 updates:

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


Updates `@aws-sdk/client-s3` from 3.1100.0 to 3.1105.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.1105.0/clients/client-s3)

Updates `@aws-sdk/lib-storage` from 3.1100.0 to 3.1105.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.1105.0/lib/lib-storage)

Updates `@aws-sdk/s3-presigned-post` from 3.1100.0 to 3.1105.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.1105.0/packages/s3-presigned-post)

Updates `@aws-sdk/s3-request-presigner` from 3.1100.0 to 3.1105.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.1105.0/packages/s3-request-presigner)

Updates `@aws-sdk/signature-v4-crt` from 3.1100.0 to 3.1105.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.1105.0/packages/signature-v4-crt)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-s3"
  dependency-version: 3.1105.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/lib-storage"
  dependency-version: 3.1105.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/s3-presigned-post"
  dependency-version: 3.1105.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/s3-request-presigner"
  dependency-version: 3.1105.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: aws
- dependency-name: "@aws-sdk/signature-v4-crt"
  dependency-version: 3.1105.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-08-10 18:53:34 -04:00
dependabot[bot] 8a157e880e chore(deps-dev): bump unplugin-swc from 1.5.9 to 1.5.10 (#13374)
Bumps [unplugin-swc](https://github.com/unplugin/unplugin-swc) from 1.5.9 to 1.5.10.
- [Release notes](https://github.com/unplugin/unplugin-swc/releases)
- [Commits](https://github.com/unplugin/unplugin-swc/compare/v1.5.9...v1.5.10)

---
updated-dependencies:
- dependency-name: unplugin-swc
  dependency-version: 1.5.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 18:53:26 -04:00
dependabot[bot] 724bfd68fe chore(deps): bump react-colorful from 5.7.0 to 5.8.0 (#13375)
Bumps [react-colorful](https://github.com/omgovich/react-colorful) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/omgovich/react-colorful/releases)
- [Changelog](https://github.com/omgovich/react-colorful/blob/master/CHANGELOG.md)
- [Commits](https://github.com/omgovich/react-colorful/compare/5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: react-colorful
  dependency-version: 5.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 18:53:12 -04:00
Tom MoorandClaude Opus 5 d2afe26f96 chore: Upgrade kbar to 1.0.0 (#13378)
Also bumps @tanstack/react-virtual to ^3.14.9 to dedupe the copy kbar now
depends on, replacing the unmaintained react-virtual v2.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 18:42:54 -04:00
Tom MoorandClaude Opus 5 031616a581 chore(deps): bump sonner from 1.7.4 to 2.0.8 (#13379)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 18:42:46 -04:00
Tom MoorandClaude Opus 5 60619649b5 fix: Consistently sanitize urls in editor components (#13372)
* fix: Consistently sanitize urls in editor components

Node attributes are authored content and cannot be assumed safe, but a few
render sinks were reading href and src straight from them. Applies the
existing sanitize helpers at the point of use in the attachment, PDF and
image components.

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

* feedback

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 12:21:23 +00:00
Tom Moor a0fcc32622 Normalize document export options (#13364) 2026-08-10 07:43:37 -04:00
Tom Moor 3afb0517bf fix: Stop retrying document persistence indefinitely (#13370)
Add a per-document consecutive failure counter to PersistenceExtension so
that permanent errors no longer cause an unbounded retry loop.
2026-08-10 07:21:17 -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 MoorandClaude Opus 5 17e8174b3f fix: Stale workflow failing on Print outputs step (#13367)
The staled-issues-prs output is a JSON blob that was interpolated
directly into the shell script, where its quotes and parentheses
were parsed as syntax. Pass it through the environment instead.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 03:18:28 +00:00
Tom MoorandClaude Opus 5 f81e8c3674 fix: Make the whole toggle title clickable in read only mode (#13365)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 22:58:47 -04:00
Tom MoorandClaude Opus 5 ed93fb746c feat: Badge archived documents in command menu (#13366)
Adds a `badge` property to actions, rendered at the end of the item in
the command bar, and uses it to mark archived documents in search
results.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 22:58:42 -04:00
Tom Moor c3c5405ddc fix: Focus link editor input when opened with Cmd+K (#13363)
* fix: Focus link editor input when opened with Cmd+K

* fix: Link editor does not reliably gain focus after cmd-k trigger
2026-08-09 22:58:38 -04:00
Tom MoorandClaude Opus 5 05db32f8c1 fix: Only show ellipsis on Publish button when a dialog will open (#13361)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 22:23:43 -04:00
Tom MoorandClaude Opus 5 763fe2f90b fix: Improve block menu keyword coverage (#13362)
Several block menu items had no keywords at all, and others were missing
obvious synonyms, so searches like /formula, /callout, /grid or /numbered
returned nothing.

Adds the missing terms and drops keywords that only repeated the item
title, which is already matched.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 22:23:39 -04:00
Tom MoorandClaude Opus 5 2cc0d60ed8 feat: Multi-select in the shares settings table (#13360)
Revoking a share link now operates on every active share, so it can be
performed from the bulk selection toolbar as well as the row menu. The
copy link and go to source actions read their share from the action
context too, and hide when a multi-selection is active.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 22:16:20 -04:00
Tom MoorandClaude Opus 5 76b357f8f1 feat: Multi-select in the templates settings table (#13359)
Template publishing, duplication and deletion now operate on every active
template, so they can be performed from the bulk selection toolbar as well
as the row menu. Actions that only make sense for one template hide when a
multi-selection is active.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 20:48:28 -04:00
Tom MoorandClaude Opus 5 e4d07b4f24 Persist template drafts as they are written (#13357)
* fix: Warn before discarding unsaved template changes

Template content is only persisted when the form is explicitly submitted,
so navigating away or closing the tab silently lost everything typed.

Adds a navigation Prompt and a beforeunload handler to both template
scenes, and reverts the model on unmount so abandoned edits no longer
leak into other views rendering the same record.

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

* fix: Persist templates from the first keystroke

New templates were held only in browser memory until Save was pressed, so
a refresh, crash, or stray navigation lost everything written.

Templates are now created up front as an unpublished draft and autosaved,
mirroring how documents behave. Drafts are visible only to their author
until published, and are cleaned up if abandoned while empty.

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

* fix: Preserve icon edits made during an in-flight template save

applyEdits only restored title and content, so an icon or color changed
while a save was in flight was overwritten by the response and never
re-saved.

Pending edits are now tracked as a single record covering every field the
form can change, rather than one ref per field.

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

* feedback

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 00:09:20 +00:00
Tom MoorandClaude Opus 5 77fcd895c4 Replace custom tabs in IconPicker (#13358)
* Replace custom tabs in IconPicker

* Use standard click handler type for Tab in button mode

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 23:10:28 +00:00
Tom Moor 689cec6cd4 fix: Custom color picker should default to the current color (#13356) 2026-08-08 15:00:56 -04:00
Tom Moor 0f2beffa95 fix: Split view pane spacing and footer alignment (#13355)
* Add inset padding on secondary split view

* fix: Footer layout in split view
2026-08-08 14:30:54 -04:00
Tom Moor 94e8e89943 fix: Caret stuck in emoji node (#13354)
* fix: Caret positioning warning in editor

* fix: Caret stuck inside emoji node
2026-08-08 13:39:24 -04:00
Tom Moor 08838e816e chore: Fix up some warnings during yarn install (#13353) 2026-08-08 12:36:27 -04:00
Tom MoorandClaude Opus 5 6d97282045 Live document stats in the corner of the editor (#13318)
* feat: Live document stats in the corner of the editor

Moves word and character counts out of the Insights dialog into an
optional bar in the bottom corner of the document that updates as you
type, adding paragraph count and reading time.

Enabled with a new "Show editing stats" preference, or toggled with
Cmd+Shift+G. The counts switch to the selection while text is selected,
and fade out while idle.

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

* fix: Stats bar should not intercept clicks in the editor

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

* Add toggle to document menu and command menu

* fix: Empty documents should not report a one minute read

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 12:07:55 -04:00
Tom MoorandClaude Opus 5 2eff2b2652 chore(deps): dedupe js-yaml onto 4.3.1 (#13352)
The transitive ^4.1.0 descriptor was still resolving to 4.3.0 while the
direct dependency had already moved to 4.3.1. Re-resolved so both share
a single entry.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 15:08:43 +00:00
dependabot[bot] c9f8bb7816 chore(deps): bump dompurify from 3.4.12 to 3.4.13 (#13349)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.12 to 3.4.13.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.12...3.4.13)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 10:56:23 -04:00
dependabot[bot] 649c1dbad2 chore(deps): bump hono from 4.12.31 to 4.13.0 (#13351)
Bumps [hono](https://github.com/honojs/hono) from 4.12.31 to 4.13.0.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.31...v4.13.0)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.13.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 10:56:14 -04:00
dependabot[bot] f30f47366f chore(deps): bump mermaid from 11.16.0 to 11.16.1 (#13346) 2026-08-08 13:12:34 +00:00
dependabot[bot] 330c49e3f4 chore(deps): bump nanoid from 3.3.16 to 3.3.17 (#13350)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.16 to 3.3.17.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.16...3.3.17)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-version: 3.3.17
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 13:09:00 +00:00
dependabot[bot] 5e3afaf3b0 chore(deps): bump js-yaml from 4.3.0 to 4.3.1 (#13348)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.0 to 4.3.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.1/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.3.0...4.3.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 09:07:21 -04:00
Tom MoorandClaude Opus 5 2a77f76567 ci: Don't block merging on the dependency audit (#13347)
* ci: Make dependency audit a warning instead of a failure

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

* ci: Let audit fail on its own, drop it from the aggregate check

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

* docs

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 13:01:29 +00:00
Tom MoorandClaude Opus 5 39fec9e7c7 fix: Crash inserting a template with no content from the block menu (#13345)
Template content is nullable, but the presenter passed it through raw so
a template without content reached the client with no data at all.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 21:09:16 -04:00
Tom MoorandClaude Opus 5 b82c57cedf fix: Build canonical redirect url from team, not request host (#13344)
* fix: Build canonical redirect url from team, not request host

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

* test: Cover canonical host redirects

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:29:29 -04:00
Tom MoorandClaude Opus 5 399cd4041d perf: Reduce database and Redis round-trips on the MCP endpoint (#13333)
* perf: Reduce database and Redis round-trips on the MCP endpoint

Profiling production traces for the /mcp endpoint showed the time is
spent in repeated permission and breadcrumb lookups rather than in the
MCP layer itself.

- Cache Document.membershipDocumentIds in Redis, mirroring the TTL and
  key pattern of User.collectionIds. The two are resolved together for
  every search and this half was uncached, measuring ~200ms.
- Resolve each collection's cached document structure once, concurrently,
  when building breadcrumbs for a batch of documents. It was awaited per
  document inside a loop, so a page of search results meant a serial
  Redis round-trip for every result.
- Walk each collection structure once into a document ID to breadcrumb
  map instead of searching the whole tree per document.
- Reuse the collection association already loaded by Document.findByPk
  when resolving a single document's breadcrumb, rather than querying it
  again under the same membership scope.

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

* fix: Invalidate cached document membership IDs on permission changes

The cache added alongside membershipDocumentIds relied on its TTL alone,
so a revoked grant stayed searchable until it expired. Clear the key on
the paths that change which documents a user is a member of, keeping the
TTL as a backstop.

- UserMembership create and destroy where documentId is set.
- GroupMembership create and destroy where documentId is set, for every
  user in the group.
- GroupUser create and destroy, as joining or leaving a group changes
  which group grants reach the user.

Sourced memberships are written with hooks disabled and destroyed without
individual hooks, so the parent membership invalidates once for the group
rather than once per descendant.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 19:01:02 -04:00
Tom Moor d0ad25cd8f fix: Tighten scoping of share subscription notifications (#13343)
Resolve notification recipients through the same loader that backs the
public share endpoints, so a subscriber is only mailed about a document
the share would actually serve them.
2026-08-07 18:43:24 -04:00
Tom MoorandClaude Opus 5 df64de9b3c fix: Back off repeated confirmation emails for share subscriptions (#13342)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 18:04:40 -04:00
Tom Moor 97d74e84be fix: Missing ip on events created during account provisioning (#13334) 2026-08-07 18:03:38 -04:00
Tom MoorandClaude Opus 5 f65142989b fix: Run MCP create_document inside a transaction (#13335)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 18:03:14 -04:00
Tom MoorandClaude Opus 5 fc7f33577f fix: Sanitize user-provided name when building export storage keys (#13336)
* fix: Sanitize user-provided name when building export storage keys

Export keys interpolated a document title or collection name straight
into the storage path, so a name containing path separators could move
the archive out of the uploads bucket and into public, where files.get
serves content without authorization.

Sanitize the name down to a single path segment, dedupe the duplicated
key builder in collectionExporter, and reject traversal in LocalStorage
where resolve-path only guards the root, not movement between buckets.

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

* chore: Complete JSDoc on export key helpers

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 21:58:58 +00: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 a00b64a4e6 fix: Avoid issuing collab token to API clients (#13332)
* fix: Avoid issuing collab token to API clients

* Address feedback
2026-08-07 08:44:20 -04:00
Tom Moor eb07bfebec fix: documents.import writes into an unauthorized collection when nested (#13331)
* fix: documents.import writes into an unauthorized collection when a parentDocumentId is also given

* test: assert imported child resolves to the parent's collection
2026-08-07 12:30:34 +00:00
Tom MoorandClaude Opus 5 046526839c fix: Guests can enumerate users and groups through mention suggestions (#13330)
suggestions.mention queried User and Group scoped only by team, while
users.list and groups.list both authorize against listUsers/listGroups,
which exclude guests. presentUser withheld the email, but membership in
the result set was unconditional and the query matched on email, so a
guest could enumerate the workspace and probe for addresses.

Gate both reads on the same policies. Documents and collections already
scope to the actor, so guests keep those suggestions.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 08:08:15 -04:00
Tom MoorandClaude Opus 5 34383b1690 fix: Duplicate team subdomain surfaced as a 500 error (#13329)
* fix: Friendly error and retry for duplicate team subdomains

Picking a subdomain already in use in settings surfaced the raw unique
constraint violation as a 500, and concurrent signups could race between
the availability check and the insert.

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

* test: Use setCloudHosted helper rather than spying on env

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

* refactor: Move retryOnUniqueConstraintError to storage/database

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 08:03:56 -04:00