Commit Graph
3275 Commits
Author SHA1 Message Date
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 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 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 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
Tom MoorandClaude Opus 5 59ea433420 Add Invited by and Joined columns to the users table (#13325)
* Add Invited by and Joined columns to users table

* Move responsive column hiding into column definitions

Adds a hideOnMobile flag to the table column type, handled in the Table
component, replacing per-column isMobile ternaries in the users table.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 22:11:41 -04:00
Tom Moor 355d15ad4f chore: Requests bearing API+OAuth tokens should not fall through to default limiter (#13328) 2026-08-06 22:10:40 -04:00
Tom MoorandClaude Opus 5 6f8072eb68 fix: Avoid duplicate key errors when re-creating attachments by id (#13317)
Import tasks pass a known id to attachmentCreator so a retry can resume,
relying on a caught UniqueConstraintError to skip attachments that already
landed. The file was uploaded to storage before the insert though, so every
skipped attachment was re-uploaded in full and then orphaned, as the storage
key was derived from a fresh uuid rather than the supplied id.

Return the existing attachment before touching storage when the id is already
in use, and derive the key from the supplied id so a collision overwrites the
same object instead of leaking a new one. The lookup is scoped to the team, so
an id belonging elsewhere still falls through to the insert and collides there
as before.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 21:08:24 -04:00
Tom Moor 11ef69e381 fix: Unhandled rejection when a Redlock lock release fails (#13316)
* fix: Unhandled rejection when a Redlock release fails

Releasing a lock is best-effort, a lock that has already expired or been
taken over by another process cannot be released and that is not an error
for the caller. Previously the ExecutionError thrown from release replaced
the successful return value of CacheHelper.populate.

Also catch failures when joining rooms after websocket authentication,
which was a floating promise and so crashed the process.

* fix: Coerce caught values to Error before logging
2026-08-06 00:52:26 +00:00
Tom MoorandClaude Opus 5 2bf160ec39 perf: Avoid N+1 queries when deleting a document subtree (#13311)
Deleting a document walked its subtree with one query per document and
destroyed each in a serial post-order recursion, so large subtrees could
exceed the request statement_timeout.

Resolve the subtree with the existing recursive CTE helper and load the
children in a single query instead. Documents are still destroyed one at
a time so model hooks run for each, and deepest-first ordering is kept.

The subtree lookup also dropped the options it was passed, so it ran
outside the request transaction.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 20:44:29 -04:00
Tom Moor 90b5c4aa63 perf: Take document row lock after text processing (#13315)
Attachment replacement can perform S3 uploads, which was previously done
while holding the document's row lock for the duration of the request.
2026-08-05 20:44:21 -04:00
Tom Moor 9c3bff9b7a perf: Use FOR NO KEY UPDATE for collection structure locks (#13314)
FOR UPDATE conflicts with the FOR KEY SHARE lock Postgres takes on a
parent row when checking a foreign key, so every insert referencing a
collection blocked behind unrelated document structure updates in it.
FOR NO KEY UPDATE still self-conflicts, keeping structure writers
mutually excluded, without blocking child row inserts.
2026-08-05 20:30:34 -04:00
Tom Moor 81d9bed9ba feat: Attribute revisions to the auth type they were made with (#13312)
Adds a sourceMetadata JSON column to revisions, populated with the
authentication type of the request that produced the edit, so the
document history sidebar can show "Tom edited via MCP"
2026-08-05 20:07:03 -04:00
Tom MoorandClaude Opus 5 b032f1f819 feat: PDF import support (#13302)
* feat: Import PDF documents

Adds a PdfConverter that parses PDF files to markdown with pdf-inspector,
recovering headings, lists and tables from the layout of the text on the
page. A PDF with no embedded text is rejected, as reading it would need OCR.

Markdown has no syntax for underline, so the parser writes underlined text
as an HTML <u> element. Inline HTML is not enabled when the markdown is read
back, so the tags are rewritten to the underline syntax the editor knows.

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

* Accept PDF files in the import dialog, and give it a two column layout

The supported formats move alongside the drop target rather than below it,
so the dialog reads in one glance. Their badge icons are dropped with the
grid they were laid out in, leaving FileFormatIcon unused.

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-05 18:36:40 -04:00
Tom MoorandClaude Fable 5 0c2374dec1 perf: Index-friendly popularity score scan, spread runs over an hour (#13306)
* perf: Index-friendly candidate scan in popularity score task

The chunked scan that populates the working table combined "has a non-zero
score" and "has recent insights" into a single OR, which forced a scan of
every document in the partition with a correlated subquery per row. In
production this reached a p95 of 16.9s per chunk on the read replica, which
also serves user reads.

Query each source separately so both can use an index, then union. Limiting
each branch and then the union still yields the globally lowest ids, so keyset
pagination is unchanged. Validity is now a join rather than a predicate, with
the cursor tracked over candidates so filtered rows can't end the walk early.

Adds a partial index on documents(id) where the score is non-zero; the full
index on popularityScore was dropped as unused in 20251217161051 and would not
help this access pattern.

* perf: Drop per-batch COUNT(*) from popularity score task

Every batch issued a COUNT(*) over the working table purely to decide whether
to continue, doubling the round-trips for a loop that already runs thousands of
iterations. processBatch already reports how many rows it handled, so a short
batch is sufficient to detect a drained table.

setupWorkingTable now returns the row count it inserted, which removes the
remaining call site.

* perf: Spread popularity scoring across teams over six hours

The task partitioned by document id over a 30 minute window, which the cron
route expands to one partition per minute. Thirty partitions each took minutes
to run, so they piled up and saturated the database for the whole window.

Partition by team over six hours instead: 360 slices, one starting each minute,
each covering a fraction of the team space. Peak concurrency is bounded by how
long a slice takes rather than by the number of partitions.

Spreading past the hour breaks the interval gate, which read the wall clock at
execution time and so would skip every partition that ran in a later hour --
and worse, would let the next hour's cron schedule a second full run. Cron now
records when a run was scheduled and the gate reads that instead.

The partial index added for the score walk leads with teamId to match the new
access pattern; it is not deployed yet, so it is amended in place.

* perf: Re-key popularity partitions to document id, reduce spread to one hour

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: Compute scheduledAt once per cron run

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 07:12:11 -04:00
Tom MoorandClaude Opus 5 58e62c9a42 fix: Statement timeouts reported as 404 (#13300)
* fix: Statement timeouts reported as 404

A Postgres statement_timeout was set to exactly REQUEST_TIMEOUT, so the
socket was destroyed by the server timeout at the same moment the query
was canceled. The error handler could no longer write a response, leaving
Koa's placeholder 404 status for logging and tracing to report, while the
client saw a reset connection.

The statement timeout is now set below the request timeout so the response
can be delivered, canceled queries return a 503, and the status code is
corrected even when the response can no longer be written.

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

* fix: Statement timeout floor could exceed the request timeout

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 21:43:27 -04:00
Tom MoorandClaude 50a92db4b8 fix: Reduce peak memory duplicating large document trees, stabilize useActionContext identity (#13298)
* fix: Reduce peak memory when duplicating large document trees, stabilize useActionContext identity

Two regressions found via automated review of PRs merged in the last 24
hours:

- documentDuplicator (#13270) now assigns ids across a whole document tree
  before writing any duplicates, but the planning pass eagerly loaded every
  descendant's full content, holding the entire tree's content in memory at
  once for large trees. Content is now fetched lazily, immediately before
  each document is written, bounding peak memory to roughly one document at
  a time. Fixes #13296.

- useActionContext returned a freshly spread object on every render when
  overrides were passed, which DropdownMenu's new isEmpty check (#13292)
  depends on — this broke memoization and caused every action's visible()
  callback to be re-resolved on every render of every DropdownMenu on the
  page, even while closed. The hook now returns a referentially stable
  object as long as its shallow contents haven't changed. Fixes #13297.

* fix: Correct shallowEqual false positive for differing key sets

shallowEqual only iterated a's keys and never checked they existed on b,
so objects with entirely different keys (e.g. {a: undefined} vs
{b: undefined}) could compare equal whenever the mismatched key
happened to read back the same value on both sides. Also adds the
suggested a === b fast path.

Addresses Copilot review comments on #13298.

* refactor: Simplify content-loaded check, use es-toolkit's isEqualWith for shallowEqual

- Drop the hasContent field/plumbing through DuplicateItem and buildItem;
  check dataValues.content directly instead (direct property access throws
  under sequelize-strict-attributes when the column was excluded from the
  query, so the check has to read dataValues, which bypasses the guard).
- Replace the hand-rolled shallowEqual with a one-level-deep comparison
  built on es-toolkit/compat's isEqualWith, already used elsewhere in the
  app, instead of maintaining bespoke key-set comparison logic.
- Trim comments per review feedback.

Addresses review comments from tommoor on #13298.

* refactor: Inline isEqualWith directly in useStableValue

Drop the standalone shallowEqual wrapper and its dedicated test file;
useStableValue now calls es-toolkit/compat's isEqualWith directly.

Addresses review feedback from tommoor on #13298.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-04 08:58:20 -04:00
Tom MoorandClaude Fable 5 2414bb3a84 perf: Search queries (#13293)
* perf: Add team-scoped composite index for document search

The global tsvector GIN index scanned matches across all teams before
filtering by teamId. A composite (teamId, searchVector) index via
btree_gin confines the scan to a single team's documents.

* fix: Bound search queries with the request statement timeout

Search queries ran outside a transaction and so never received the
SET LOCAL statement_timeout applied to request-handling processes,
leaving cancelled requests running unbounded on the database.

* Bind queries to read-only replica where available

* Remove readOnly option for now

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 22:26:45 -04:00
Tom MoorandClaude Opus 5 8c66b56c3b feat: Show auth type in document history (#13294)
Surface when a history event was performed via the API or MCP, e.g.
"Tom published via MCP". Moves AuthenticationType to shared types and
exposes authType on the event presenter.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 21:45:21 -04:00
Tom MoorandClaude Opus 5 e737968365 fix: Allow inline comments on documents created via the API (#13289)
* fix: Allow inline comments on documents without collaborative state

Documents created through the API have no collaborative state until they
are opened in an editor, which made anchored comments fail. Derive the
state from the document content when it is missing.

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

* test: Read comment marks from content instead of decoding state

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

* test: Read node-anchored comment mark from content

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 18:26:01 -04:00
Tom MoorandClaude Opus 5 b2b41dd3ca fix: Remap internal links when duplicating a document tree (#13270)
* fix: Remap internal links when duplicating a document tree

Duplicating a document tree now assigns the identifiers of every duplicate
before any content is written, so links and mentions between the documents
being duplicated point at the copies rather than the originals.

* fix: Remap fully qualified links when duplicating a document tree

Links written as a full url to this installation are now remapped alongside
relative ones, and stay fully qualified. Where a link is displayed as its own
url the text is updated to match.

Also trims surrounding whitespace in sanitizeUrl, which otherwise failed
validation and prepended a second scheme to an already qualified url.

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

* fix: Remap links across trees when duplicating a collection

The collection duplication task duplicated each root document separately, so
only links within a single tree were remapped. It now duplicates the whole
collection as one unit, with identifiers assigned across every tree before any
content is written.

* fix: Match document links by identifier rather than host when duplicating

An installation can be reached through more than one host, so comparing a
link's host against the configured url left fully qualified links to a
document in the duplicated set unmapped. The document a link identifies now
decides whether it is replaced, and the host it was written with is kept.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 22:44:06 -04:00
Tom MoorandClaude Opus 5 000f2f98fb feat: Add TextPack (.textpack) support (#13235)
* feat: Add TextPack (.textpack) import support

Adds a single-document importer for TextPack, the zipped variant of
TextBundle used by Bear, Ulysses, iA Writer and others. Bare .textbundle
directories are not supported, as a directory cannot be delivered through
a browser file input.

The bundle's text entry may use any extension, per the spec, with
info.json's type deciding whether it can be read as markdown. Assets are
inlined as data URIs for the existing attachment pipeline to pick up,
bounded by the attachment size limit and a memory ceiling, and only for
media types markdown-it accepts as a link destination.

Also fixes an existing bug where a file embedded in an HTML or email
import as a data URI was stored in the document as base64 rather than
being uploaded as an attachment.

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

* Refactor to individual converters

* refactor

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 20:42:05 -04:00
Tom Moor 33c8d51e08 perf: Avoid membership joins in search (#13269)
* perf: Avoid membership joins in search

* feedback
2026-08-02 18:29:16 -04:00
Tom Moor 03ec96fd91 Return a compact success payload from MCP mutation tools (#13257)
* fix: Return a compact success payload from MCP mutation tools

Mutation tools serialized the entire resource — and for documents the
full markdown body — back to the client on every write, which the caller
already has. They now acknowledge the write with the identifying fields
needed to reference the resource.

The one exception is update_document with editMode "patch", which still
echoes the resulting content so the caller can verify what was replaced.

For move_document and restore_document the breadcrumb is now resolved
after the transaction commits, so it reflects the new location rather
than the cached pre-move document structure.

* test: Update MCP scope enforcement tests for the new response shape

* test: Assert the success acknowledgement across all mutation tool variants
2026-08-02 15:06:25 -04:00
Tom Moor b1b3db3430 Update all MCP tools to Markdown (#13234)
* Update all MCP tools to MD input+output

* feedback
2026-08-02 07:58:15 -04:00
Tom MoorandClaude Opus 5 273a146381 fix: Shared with me section disappears when page one holds only deleted docs (#13255)
Memberships pointing at soft-deleted or archived documents were still
returned by userMemberships.list and groupMemberships.list, consuming
slots in the first page the sidebar requests. Inner join the document so
they are excluded from the query entirely.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 07:56:42 -04:00
Tom MoorandClaude Opus 5 257c2bfdc0 fix: Whitelist fields in URL unfurl presenter (#13254)
Restores field-level picking in presentURL instead of casting the entire
UnfurlData blob, so transient metadata attached by unfurl plugins or
internal callers is never serialized into API responses.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 07:41:50 -04:00
Tom Moor bc3b3b3f97 fix: Log failures when scheduling collection duplication task (#13251) 2026-08-02 11:21:16 +00:00
Tom Moor efc68de4a0 fix: error id guards break for non-Error throwables (#13250)
Widen the narrowed instanceof Error checks introduced in the TypeScript 6
upgrade with a shared errToId helper that accepts any object carrying a
string id, restoring the login email-matching recovery path.
2026-08-02 07:19:24 -04:00
Tom MoorandClaude Opus 5 9ee3c1c999 fix: Missing revision on restore returns 404 instead of authorization error (#13249)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 07:18:42 -04:00
Tom Moor 890f0451a8 feat: Multi-select documents (#13041)
* first pass

* refactor

* refactor

* wip

* Fix BatchableApiMethods docs; remove ApiClient batch test

* Refactor actions

* refactor batch send to share error code handling

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

* refactor
2026-08-01 20:45:20 -04:00
Tom MoorandClaude Opus 5 13b9b2c62d feat: Add support for web page and eml import (#13229)
* feat: Add support for web page and email import

* fix: Type mailparser result explicitly

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

* Combine HTML and Web Page

* fix: Validate mime type before inlining MIME archive parts

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 18:30:06 -04:00
Tom MoorandClaude Opus 5 8b35f7bd17 feat: Import file dialog (#13228)
* feat: Replace import document file picker with a modal

Choosing "Import document" now opens a dialog that lists the supported
file formats with an icon for each, and accepts files either dropped onto
it or chosen with the system file picker.

Also closes the gaps between the formats the dialog advertises and those
the importer actually accepts:

- `.tsv` was offered by the file picker but rejected by the server, it is
  now converted to a table like CSV
- `.csv` and `.htm` are now recognised by extension, so they still import
  when the browser reports an unhelpful mime type
- `.markdown` is now offered by the file picker, it was already supported

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

* Add intermediate dialog for file import

* tweaks, polish

* Update failure message

* test

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-01 17:46:47 -04:00
Tom Moor a6b5898283 fix: Silence false positive sequelize class fields warning (#13224)
sequelize-strict-attributes defines per-instance accessors for attributes
omitted from a query's selection, which trips Sequelize's public class field
detection. The removed `Fix` decorator used to suppress this per model; do it
once on the base model instead.
2026-08-01 11:47:37 -04:00
Tom Moor e6908c1511 feat: Inline read-only comments (#13209)
* feat: Inline read-only comments

* Improve anchor disambiguation

* fix: Spurious edits from inline comments
2026-08-01 08:08:52 -04:00
Tom Moor 6e8b20e35f fix: OIDC forced secure cookie (#13217)
closes #13180
2026-08-01 07:24:31 -04:00
Tom Moor 23d20d749d fix: policy serialization (#13211)
* fix: Membership IDs not serialized correctly in policies

* fix: Policy serialization
2026-07-31 21:41:16 -04:00
Tom Moor a01b38665e fix: Shared content should not resolve for a suspended workspace (#13213) 2026-07-31 21:41:01 -04:00
Tom Moor aae3e4b81a perf: Reduce connections required for findByPk (#13214) 2026-07-31 13:19:40 -04:00
Tom Moor 9a50a980f8 Update CSRF handling to set secure host-bound where possible (#13203) 2026-07-30 17:27:11 -04:00