1110 Commits
Author SHA1 Message Date
Tom Moor a46968c3f4 feat: Hover menu to switch mentions between inline and card display (#14588)
* feat: Show a display menu on hover for mentions that can be cards

Mentions that can display as a card show an overflow button on hover,
inside the end of the pill or in the top corner of the card. The button
opens a menu to switch between the mention and card display, which
replaces the selection toolbar for these mentions.

* fix: Resolve the mention position on click and hide the button on scroll

The menu looks up the mention position when an item is chosen, as edits
by collaborators can move it while the menu is open. The button follows
the mention when content above it changes and hides when a table is
scrolled.

* feat: Show the mention display button for a selected mention

The button shows for the selected mention as well as the hovered one, so
keyboard users can reach it. Touch devices show it for the selected mention
only. Only the button takes the pointer, so the fade does not block clicks
on short mentions.
2026-11-19 18:05:06 -05:00
Tom Moor adba69af33 fix: Remove empty line above images at the start of a paragraph (#14655) 2026-11-19 17:57:15 -05:00
Tom Moor 49aee74190 feat: Add filtering to tables in the editor (#14625)
* feat: Add filtering to tables in the editor

* Show the column filter button on header hover in edit mode

* Keep the filter button shown while its menu is open

* Move focusEditor to its own module

* Anchor the filter menu to the filter button

* Address review feedback on table filtering

* Show the filter button background while its menu is open

* Always show the filter button background with its icon

* Remove value counts and hide Clear when there is no filter

* Translations

* placeholder
2026-11-18 22:37:15 -05:00
Tom Moor 2ccf74bbdd fix: Full-width tables render at default width in the template editor (#14621) 2026-11-17 18:43:01 -05:00
Tom Moor c3274d17d1 Redesign search filters with a scalable chip bar (#14589)
* Redesign search filters

* Design refinement

* Search filter polish: chip states, Text components, Published filter

* Encode search filters as <field>.<operator> URL params

Filters read and write a standard <field>.<operator>=<value> format, a
bare key reads as eq, and the previous dateFilter, statusFilter and
titleFilter params are still read.

* Add custom date ranges to search date filters

Updated, Created and Published get a Custom option that opens a range
calendar in a modal. The range is stored as <field>.gte and <field>.lte
dates and sent to the API as whole days in local time.

* Keep date filter chip shown while its range dialog is open

* Align calendar with modal edges

The calendar had its own 12px padding, so in modals it sat inside the
title and footer edges. The popovers that need the space now pad it.

* Search filter refinements: menu height, chip spacing, steady results line

* Simplify search filters and address review comments

Parse each filter once per URL change, unify URL writes, share status and
date helpers with the server, add a maxHeight prop to MenuContent, ignore
counts from obsolete searches, and show the empty state for filter-only
searches.

* Refine filter chip remove button and skip animation on auto-opened menus
2026-11-14 12:00:47 -05:00
Tom Moor aa454033ec fix: Keep callouts and rules nested when serialized to Markdown (#14528)
* fix: Keep notices and rules nested in lists and quotes when serialized to Markdown

* fix: Keep the blank line above notices and rules, written per line
2026-11-11 08:09:35 -05:00
Tom Moor 309dd022f6 fix: Add spacing around images in list items (#14518)
* fix: Add spacing around images in list items

* fix: Space list images at the wrapper so inline text is separated too
2026-11-09 22:44:57 -05:00
Tom MoorandClaude f680d5dec9 feat: Display links, documents and collections as preview cards (#14511)
* feat: Display links as preview cards

Adds a display attribute to mentions so a link can render either inline
or as a card with image, title and description from its unfurl. Pasting
a URL offers a "Card" option, and selecting a link mention shows a
toolbar to switch between the two displays.

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

* feat: Arrow key selection, full width and Return for link cards

Cards fill the document width, hide the blank line below them, are selected
by the up and down arrow keys like images, and Return on a selected card
adds a paragraph below it.

* feat: Display document and collection mentions as cards

Document and collection mentions can be switched to a card from the
selection toolbar. Document cards show the summary, collection and the
first image larger than 100x100. Collection cards show the first line of
the description. On public shares the preview image is signed, as the
share page already signs the attachments of that document. Card images
are hidden until they load and removed if they fail.

* feat: Keep mention cards through Markdown

The card display is written as the link title, so URLs are not changed.
Document and collection cards are written as @ links to their id and
parsed back into mentions.

* refactor: Move mention cards to their own file

Document cards show the collection after the title instead of below it.

* fix: Address review feedback on mention cards

- Include the share id in the document card unfurl URL for root shares.
- Return on a card in a heading adds a paragraph.
- URL cards keep their URL in Markdown, and the server does not narrow
  their type.
- Unfurl results apply to the current node, not the node at first render.
- Collection card descriptions stop at the first line break.

* refactor: Reuse existing helpers for mention cards

- Sign the preview image with TextHelper.attachmentsToSignedUrls.
- Check document and collection ids with isUUID.
- Return lines from getFirstText without changing an input array.

* fix: Preserve JSON output for inline mentions

* refactor: Centralize mention selection classes

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-08 08:11:31 -05:00
Tom Moor f70428c338 fix: Retain scroll position when switching between "edit" mode (#14415)
* fix: Clicking Edit scrolls to the top of the document

* fix: Restore scroll after node views render

* fix: Switch to editing without redrawing the document

* fix: Keep Yjs undo working after switching to editing
2026-11-06 22:41:32 -05:00
Tom Moor 634d8d6493 fix: Keep preceding character when splitting code block on triple backticks (#14463)
* fix: Keep preceding character when splitting code block on triple backticks

* test: Cover dry-run result of triple backtick split
2026-11-05 19:33:56 -05:00
Tom Moor e21d1ed8d4 fix: Linear time whitespace and bracket handling in markdown serializer (#14460) 2026-11-04 20:28:57 -05:00
Tom Moor e5b90b50c7 fix: Safari video controls stick after scrubbing a selected video (#14458) 2026-11-03 08:21:41 -05:00
Tom Moor 6d7cd455e9 chore: Decouple core plugins (#14340)
* chore: Move plugin-specific integration code into plugins

Core no longer imports from or names the settings of individual plugins.
Plugins now register mention providers, issue status icons, instance URLs,
settings keys, settings and import schemas, and OAuth clients through hooks.

* fix: Recompute embed instance URLs after plugins load and match legacy issue icons by URL

* fix: Skip logo upload jobs queued without a settings path

* chore: Choose issue status icons from the unfurl state
2026-11-02 19:42:48 -05:00
Tom Moor fedc50d8e7 fix: Pasting list content at the start of an item nests a new list (#14453)
* fix: Pasting list content at the start of an item nests a new list

* test: Cover pasting over a selection that spans list items
2026-11-02 18:37:49 -05:00
Tom Moor 33a388f268 fix: Backspace and Delete do not remove emoji on Android (#14452) 2026-11-02 18:00:59 -05:00
Tom Moor a9428805c1 feat: Show code block toolbar on hover in read-only editors (#14432)
* feat: Show code block toolbar on hover in read-only editors

* fix: Keep hover toolbar while focused, use tap path on touch-only devices
2026-10-31 14:55:04 -04:00
Tom Moor 880f58b20d fix: Cursor moves before highlighted token in code blocks with line numbers (#14382) 2026-10-31 10:40:39 -04:00
Tom Moor a374ce9b46 fix: Viewers attributed as editors when their editor repairs remote changes (#14424)
* fix: Viewers attributed as editors when their editor repairs remote changes

* fix: Rescan after remote changes and assign block ids when parsing markdown

* chore: Import uuid as generateUuid in ToggleBlock

* refactor: Add RepairPlugin to repair only on local changes, checking remote changes for pending repairs

* fix: Assign block ids on the server so patches keep existing ids, keep unchanged mention ids

* fix: Store API edits in the editor's trailing node form
2026-10-30 22:27:31 -04:00
Tom Moor 04cafebea5 fix: Sticky table headers lag behind the scroll position (#14426)
Move the header row with a CSS scroll-driven animation so the browser updates it in the same frame as the scroll. Browsers without support keep the scroll listener.
2026-10-30 08:29:42 -04:00
Tom Moor 77c7521d3b fix: Arrow keys move the cursor into code block line numbers (#14388)
* fix: Arrow keys move the cursor into code block line numbers

* fix: ArrowLeft at the start of a code line hides the caret
2026-10-29 18:49:24 -04:00
Tom Moor 55ff532b44 fix: HTML import crashes on elements without a style property (#14358) 2026-10-26 22:43:18 -04:00
Tom Moor 4eca029b05 feat: Keep code block collapse button visible at the bottom of the viewport (#14328) 2026-10-24 20:28:32 -04:00
Tom Moor f4620c26d1 fix: Blue outlines and faded images in document update emails (#14325)
* fix: Editor selection outline and upload fade leak into email diffs

* fix: Round the outline on code blocks
2026-10-24 19:27:13 -04:00
Tom Moor 316a873d49 fix: Backspace and Delete do not remove line breaks in code blocks (#14319) 2026-10-24 18:17:33 -04:00
Tom Moor 0d13c183fd chore: Add lint rules for test conventions (#14318) 2026-10-24 14:09:36 -04:00
Tom Moor 33296fb974 chore: Add lint rule to require sanitizeUrl for href/src in toDOM (#14309)
* chore: Add lint rule to require sanitizeUrl for href/src in toDOM

* fix: Resolve sanitizer by binding and only match literal setAttribute names
2026-10-24 11:16:12 -04:00
Tom Moor 0fc91c3da8 fix: Skip pasted images without a src (#14287) 2026-10-24 10:02:48 -04:00
Tom Moor 4e807ca6fc perf: Copy only the patched path when recreating transforms (#14250)
* perf: Copy only the patched path when recreating transforms

recreateTransform deep copied the whole document for each patch
operation, and diffArrays compared elements with a generic isEqual. Copy
only the containers on the operation path and compare with a JSON-only
equality check. Revision changesets are about 6x faster.

* Use fast-deep-equal in place of a custom JSON equality check

* Restore isJSONEqual, fast-deep-equal throws on null-prototype attrs
2026-10-22 20:33:22 -04:00
Tom Moor 0995a8e36b perf: Reduce traversals and skip unneeded work in ProsemirrorHelper (#14243)
* perf: Reduce traversals and skip unneeded work in ProsemirrorHelper

* fix: Coerce leaf text to a string when checking for text
2026-10-22 18:33:16 -04:00
Tom Moor 3e5de4b1f5 chore: Upgrade refractor from 3 to 5 (#14195)
* chore: Upgrade refractor from 3 to 5

* Revert unrelated tsconfig formatting
2026-10-21 22:56:53 -04:00
Tom Moor 4f4fd88278 chore: Upgrade pako to 3 and remove @types/pako stub (#14199) 2026-10-21 08:36:51 -04:00
Tom Moor af83062fad perf: Faster typing in large code blocks (#14181)
* perf: Cache code block highlighting by node and defer large blocks

* perf: Reuse decorations of unchanged code blocks, only edits postpone refresh
2026-10-20 21:14:32 -04:00
Tom Moor 695e973e6b feat: Allow tables inside notices (#14175)
* feat: Allow tables inside notices

Blend table, rule and code colors onto the notice background, keep table
scroll shadows inside the notice, hide full width for tables in notices,
and fit new table columns to the available width.

* fix: Leave room for table row controls in notices

* fix: Blend table grips onto the notice background

* fix: Derive notice content colors from the softer notice styles
2026-10-20 19:05:10 -04:00
Tom Moor 0853354daf feat: Show code block line numbers alongside line wrapping (#14170)
* feat: Show code block line numbers alongside line wrapping

Render line numbers as a widget at the start of each line so they align
with wrapped lines and stay fixed during horizontal scroll.

* fix: Keep line number gutter size inside table cells
2026-10-20 19:02:27 -04:00
Tom Moor 190c5e5148 feat: Softer notice colors with matching menu icons (#14177) 2026-10-20 18:55:51 -04:00
Tom Moor 94276a743c fix: Prevent duplicate heading anchor IDs (#14162)
A heading whose text ends in a number could get the same slug as a
numbered duplicate. Heading slugs now come from one HeadingSlugger that
skips taken IDs, and the server section lookup counts nested headings
like the editor does.
2026-10-20 08:28:54 -04:00
Tom Moor 2f68f32b40 fix: Polish UI copy, casing, and punctuation (#14144)
* fix: Polish UI copy, casing, and punctuation across the app

* fix: Remove duplicate period in API key scope hint
2026-10-19 09:05:24 -04:00
Tom Moor 9d4304a332 chore: Remove unused code (#14133)
* chore: Remove unused code

* Restore DiscordClient
2026-10-18 18:27:05 -04:00
Tom Moor e14dfcfcb4 perf: Stop restyling the document on every frame of the sidebar animation (#14132)
The document container and editor exposed their measured widths as inherited
CSS variables, so each frame of a width animation restyled every element in
the document. Full width blocks now use a container unit, and media resizing
measures the editor content width when it is needed.
2026-10-18 17:52:20 -04:00
Tom Moor 97cc147726 feat: Render Mermaid diagrams with Pele (#14126)
* feat: Render Mermaid diagrams with Pele

* fix: Translate empty diagram label

* fix: Prevent diagram flash when editors swap on load
2026-10-18 08:11:41 -04:00
Tom MoorandClaude Opus 5.5 5647621224 chore: Prune redundant comments and type suppressions (#14124)
* chore: Prune redundant comments and normalize lint directives

Removes comments that restate the following line and stale TODOs, drops
the passive event listener feature check now that all supported browsers
support it, and renames eslint directives to oxlint.

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

* fix: Evaluate restricted team domains at validation time

The restricted email provider list was captured when the model loaded, so
it could not follow the hosting environment and the tests that covered it
never reached the model.

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

* chore: Replace type suppressions with accurate types

Adds a Concrete helper type for registries of abstract classes, declares
missing Sequelize and refractor typings, uses public ProseMirror APIs, a
typed mock context helper in middleware tests, and a StaticLink component
for sidebar rows being edited.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 17:07:39 -04:00
Tom Moor bd49f85819 fix: Arrow up/down selects images like block nodes (#14119)
* fix: Arrow up/down selects images as block nodes, animate empty caption

* fix: Address review feedback on image arrow navigation and caption

- Check rendered display and visibility instead of attributes
- Keep navigation inside table cells
- Hide collapsed captions and remove min-height jump

* fix: Empty caption clipped in table cells

* Remove empty caption animation
2026-10-17 16:51:16 -04:00
Tom Moor 178e923cb7 feat: Add selection toolbar for video nodes (#14118)
* feat: Add selection toolbar for video nodes

* fix: Keep video caption on replace, download video as a file

* fix: Drop removed upload progress prop from video replace
2026-10-17 12:21:46 -04:00
Tom Moor 128c240405 Render uploads with the same component as the uploaded node (#14117)
* feat: Render uploading images and videos with their node component

* fix: Insert uploaded block nodes next to the paragraph instead of inside it

* fix: Insert dropped block nodes on the nearest side of the paragraph

* feat: Fade in uploaded images and videos from their placeholder

* feat: Preview the new image while it replaces an existing one

* fix: Keep the placeholder size and preload pasted images after upload

* fix: Move the selection off an image while an upload replaces it

* feat: Play uploaded videos from the local file in the uploading editor

* feat: Display uploaded images from the local file in the uploading editor

* feat: Soften image and video corners, round them fully when selected

* feat: Render uploading attachments with the attachment component

* feat: Show the file size of an attachment while it uploads

* feat: Show upload progress on the placeholder instead of a toast

* fix: Fade the content of an uploading file but not its progress bar

* fix: Keep the local file of an upload when its placeholder is mapped away

* chore: Simplify upload placeholder state and remove unused progress callback

* Remove test

* fix: Address review feedback on upload placeholders

Expose upload progress to assistive technology outside the inert placeholder, free local files when the editor state is replaced, reuse the fadeIn animation and move the video wrapper class to EditorStyleHelper.

* chore: Move image and PDF wrapper class names to EditorStyleHelper

* feat: Scale in an upload placeholder when it appears

* chore: Make the upload placeholder scale-in more subtle
2026-10-17 12:12:25 -04:00
Tom Moor d7711ee96f perf: Render editor UI from observable state instead of forceUpdate (#14073)
* perf: Coalesce editor React renders into an animation frame

dispatchTransaction ran calculateDir and forceUpdate synchronously on every
transaction, adding a style read and a React render to each keystroke. These
now run in an animation frame, at most once every 50ms.

Refs #14069

* fix: Reset the pending render frame on unmount

StrictMode remounts the same instance, and a stale handle would stop all later renders.

* perf: Render editor UI from observable state instead of forceUpdate

Replace the coalesced animation frame render with an observable editorState.
The editor no longer re-renders its widget tree on every transaction; the
selection toolbar observes the state only while it is active, so updates stay
synchronous and typing with a collapsed caret renders nothing. The floating
toolbar no longer measures the selection while hidden.

Refs #14069
2026-10-17 11:11:46 -04:00
Tom Moor f4c4018872 fix: Unfold toggle blocks when jumping to a comment (#14100)
* fix: Unfold toggle blocks when jumping to a comment

* fix: Reveal pending draft comment anchors in folded toggles
2026-10-15 21:40:53 -04:00
Tom MoorandClaude Opus 5.5 9e2565184e chore: Prune stale comments, TODOs, and type suppressions (#14092)
* chore: Remove unused lint disable directives

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

* chore: Replace TODO type suppressions with typed code

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

* chore: Remove obsolete workaround comments in tests and MediaDimension

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

* chore: Remove Tippy compatibility props from Tooltip

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

* chore: Decouple DropdownMenu props from Tooltip and clarify sharing styles

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

* chore: Remove stale retention TODOs from cleanup tasks

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

* chore: Register relations synchronously and clarify workaround comments

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

* chore: Replace Notion import TODOs with descriptive comments

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 08:54:37 -04:00
Tom Moor 22ab9ff592 fix: Do not escape periods inside numbers at the start of a line (#14085) 2026-10-13 18:20:28 -04:00
Tom Moor ee0f099439 fix: Dropped videos without a content type insert as attachments (#14086) 2026-10-13 18:20:24 -04:00
Tom Moor d3e991f977 fix: Restore selection outline on non-text block nodes (#14058) 2026-10-13 08:07:00 -04:00