* Harden shared tree utilities and add test coverage
- Fix ancestors() throwing a TypeError when a node's parent is undefined
rather than null, which is the case for nodes that haven't been
annotated by useCollectionTrees (e.g. shared trees from the server).
- Guard against malformed parent cycles in ancestors() so a bad tree can
no longer hang the client.
- Compute descendants() depth limits relative to the given node during
traversal instead of relying on optional absolute depth annotations,
which silently returned an empty list when they were missing.
- Tolerate nodes without a children array in traversal.
- Remove type assertions, add JSDoc, and add collocated unit tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vt5wWLYomgKZjfgPNk8wN4
* Address review: exclude node from own ancestors on parent cycles
- Seed the cycle guard with the starting node so a malformed parent
cycle can never include the node in its own ancestor list.
- Widen flattenTree's parameter to accept nullish roots so the runtime
guard and the type contract agree.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vt5wWLYomgKZjfgPNk8wN4
---------
Co-authored-by: Claude <noreply@anthropic.com>
classDiagram, erDiagram, and requirementDiagram render node labels using
<foreignObject> elements. Browsers skip layout of <foreignObject> content
inside visibility:hidden SVGs, causing mermaid's layout engine to measure
zero-size labels and produce inflated viewBox dimensions (thousands of
pixels for a small diagram).
Switching the render container from visibility:hidden to opacity:0 keeps
the element in the render tree and fully laid out — preserving correct
getBBox() results for both regular SVG elements and foreignObject content —
without making the rendering visible to the user.
The cache prefix is bumped to v3 so previously mis-sized diagrams cached
under v2 are discarded and re-rendered correctly.
* Add Slab importer backed by the Markdown import pipeline
Slab exports a zip of Markdown documents that is structurally identical to
the Outline Markdown export, with one difference: images are referenced as
remote signed URLs rather than files inside the archive.
Rather than build a parallel importer, this reuses the Markdown task and
processor and teaches the shared import pipeline to download remote images:
- Enable per-page attachment upload for the Markdown task. The base
APIImportTask already downloads remote image/video/attachment URLs and
rewrites them to internal redirect URLs; the Markdown task previously
opted out because its attachments live in the zip.
- Make the base upload step skip URLs that are already internal, so local
zip attachments (resolved to redirect URLs during rewriteMarkdown and
uploaded from the archive in onAllTasksCompleted) pass through untouched
while remote URLs are fetched and re-hosted. Also guards the URL rewrite
against nodes not present in the download map.
- Introduce IntegrationService.Slab as a distinct, importable service that
routes through the Markdown task/processor, so imports are tracked and
labelled as "Slab" with no duplicated import logic.
- Wire the create API (schema + route), the import settings UI (Slab card
and dialog), and a placeholder logo asset.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
* Add shell SlabAPIImportTask as a Slab-specific seam
Slab imports previously ran through MarkdownAPIImportTask directly. Introduce
a thin SlabAPIImportTask subclass so Slab gets its own task name (for
scheduling, tracing, and retries) and a dedicated place to override
behavior as Slab exports diverge from the generic Markdown shape.
The subclass inherits all conversion/attachment/persistence logic and only
overrides scheduleNextTask to keep the whole import chain on the Slab class.
MarkdownImportsProcessor now selects the task implementation by the import's
service when scheduling the first task.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
* Unwrap single root "slab" directory in Slab imports
Slab exports wrap the entire workspace in a single top-level directory named
"slab". Without handling this, the import produces one "slab" collection
containing everything, instead of mapping each workspace area to its own
collection.
Add a `resolveCollectionRootNodes` seam on the Markdown bootstrap phase
(default: pass entries through unchanged) and override it in SlabAPIImportTask
to descend into a lone, case-insensitive "slab" root directory so its child
directories become collections. Paths are left intact, so the attachment
manifest, completion re-walk, and internal-link resolution stay consistent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
* Use the filename, not the first heading, as the title for Slab imports
In Slab a document's leading heading is real content, not its title — the
filename is authoritative. Add an `extractTitle` option to
DocumentConverter.convert (default true, preserving existing callers) that,
when false, skips lifting a leading H1 into the title and leaves it in the
body. Expose it through a `shouldExtractTitleFromHeading` seam on the
Markdown task and override it in SlabAPIImportTask. With no extracted title,
the page falls back to the filename-derived title.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
* Update logo
* Narrow MarkdownAPIImportTask generic back to Markdown
Slab imports now run through SlabAPIImportTask, so the base Markdown task no
longer handles the Slab service directly and its generic can return to
Markdown-only. SlabAPIImportTask keeps a Markdown | Slab union on its
scheduleNextTask override, which is required so the override stays a valid
(contravariant) override of the base's Markdown-typed parameter.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
* Optimised images with calibre/image-actions
* reorder
* Move Slab importer into its own plugin
Restructure the Slab importer to live in plugins/slab, mirroring the Notion
plugin, instead of being threaded through the core Markdown importer.
- plugins/slab/server registers SlabImportsProcessor (Hook.Processor) and
SlabAPIImportTask (Hook.Task). The processor extends MarkdownImportsProcessor
to claim the Slab service and schedule the Slab task; the task keeps its
Slab-specific overrides (remote image download, root "slab" dir unwrap,
filename-as-title).
- plugins/slab/client registers the Slab import card (Hook.Imports) and owns
the import dialog.
- Revert MarkdownImportsProcessor to Markdown-only and drop the hardcoded Slab
card from the Import settings screen.
The Slab service enum, import schema, and create route remain in core, as the
Notion plugin's equivalents do.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
* Generalize DropToImport to accept an importable service
DropToImport previously branched on `format` to map MarkdownZip/JSON/Slab
to specific imports.create calls, with a dead collections.import fallback.
Replace this with a single `service` prop and one generic imports.create
call. Core no longer hardcodes any service name (notably the Slab plugin
service), and the Markdown, JSON, and Slab dialogs each pass their service.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AC5Ho2SHBjNpxEAMr5uL6o
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Images with a stored pixel width (e.g. from paste) set an inline
style="width: 1920px" on the image-wrapper and img elements. In tables
without explicit colwidth attributes the browser uses table-layout: auto,
which lets cells expand to the element's preferred width. The existing
max-width: 100% in the ImageWrapper styled-component cannot constrain
the wrapper because 100% of the already-expanded cell is also 1920px.
Changing to width: min(Npx, 100%) breaks the expansion: during auto
table layout the browser resolves 100% against the table's available
width rather than the cell's inflated size, so the element's
min-content contribution stays bounded and the cell no longer grows
beyond its share of the table width.
Fixes#12866
Co-authored-by: tsushanth <t.sushanth@gmail.com>
* feat: Allow matching block input rules after soft-break
* fix PR feedback, math block handling
* perf: stop soft-break scan at the cursor position
Replace parent.forEach with a manual loop that breaks once past the
cursor, avoiding unnecessary per-keystroke iteration over inline nodes
after the cursor in large blocks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Allow setting cell alignment from the table row menu
Add an "Align" submenu to the table row selection toolbar, mirroring the
existing column alignment menu. A new setRowAttr command applies the chosen
alignment to every cell in the selected row(s).
Note that per-cell (row) alignment cannot be represented in the markdown
serialization of a table, which only supports per-column alignment, so it is
preserved in the collaborative document only.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ntSQZRBPPzERhRqmRCU6h
* Remove setRowAttr tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ntSQZRBPPzERhRqmRCU6h
* reorder
---------
Co-authored-by: Claude <noreply@anthropic.com>
getFileNameFromUrl returned the raw URL path segment, so attachments
created from a URL were stored with encoded names (e.g. "My%20File.pdf").
Decode the filename, falling back to the raw value on malformed encoding.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Various unlabelled and undescribed interactable elements
* fix: guard sort keydown against key repeat and label remaining help button
Prevent held Space from repeatedly toggling table sort, and add an
accessible name to the "Email subscriptions" help button.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
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
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>
* 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>
* 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>
* 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>
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Czech translations from Crowdin [ci skip]
* fix: New Romanian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Hebrew translations from Crowdin [ci skip]
* fix: New Hungarian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Ukrainian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New English, United Kingdom translations from Crowdin [ci skip]
* fix: New Norwegian Bokmal translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Catalan translations from Crowdin [ci skip]
* fix: Encode code & math fences in table cells with <br> to avoid breaking rows
Code and LaTeX fences inside table cells emitted literal newlines during
Markdown serialization, breaking the single-line table-row structure and
corrupting the whole table. Serialize them on a single line using <br> for
line breaks (and escaped pipes) when inside a table, matching the existing
handling for lists and hard breaks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Escape backslashes in table-cell code & math fences
CodeQL flagged incomplete string escaping: escaping pipes as \| without
escaping pre-existing backslashes leaves the encoding ambiguous. Escape the
backslash (the escape character) and pipe together in a single pass so cell
content cannot break out of the column.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test: Cover math block table-cell serialization
Add a test mirroring the code fence case to guard the MathBlock half of the
table-cell <br> encoding and pipe/backslash escaping.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Checkbox list item margin click and nested "Hide completed"
Clicking the margin beside a checkbox now places the cursor at the start
of the list item instead of being a dead zone, and shows a text cursor.
The "Hide completed" toggle no longer appears on a parent checkbox list
when completed items live in a checkbox list nested via a regular list
(checkbox -> list -> checkbox); those inner lists manage their own toggle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Checkbox improvements
* fix: Address PR review on checkbox NodeView
- Remove the checkbox click listener in CheckboxItemView.destroy() to
avoid leaks when items are deleted/replaced.
- Globally escape "#" in the SSR fallback data URIs (replace all, not
just the first occurrence).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: preserve nesting when toggling to/from checklist in nested lists
Converting a list to or from a checklist previously cleared all nodes and
re-wrapped them, which flattened any nested list structure. Convert the
list nodes in place instead, recursively mapping list and item types so
nesting is preserved.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* feat: convert plain list to checklist when typing checkbox marker
Typing "[ ] " at the start of an existing bullet or ordered list item now
converts the whole list to a checklist, preserving nested list structure,
reusing the in-place list conversion utility.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: place cursor at start of item after checklist conversion
After converting a list to a checklist via the checkbox marker input rule,
position the selection at the start of the converted item so the user can
continue typing immediately.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: remove vertical margin from checklist nested in a list
A checklist nested inside any list (bullet, ordered, or another checklist)
no longer carries the 1em vertical margin of a top-level checklist. Since
both list_item and checkbox_item render as li elements, target any
checklist-wrapper inside an li rather than only those inside another wrapper.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: only highlight the closest list in the formatting toolbar
When the selection sits inside a nested list, the toolbar previously marked
both the inner list and any ancestor list of a different type as active,
because each list button walked the full ancestor chain. Highlight only the
list closest to the selection.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: consider node selections on lists in isListActive
When a list node is the target of a NodeSelection, findParentNode resolves
to its parent list rather than the selected node. Check the selected node
directly so the toolbar reflects the selected list.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add date mentions to the editor
Introduce a new "date" mention type alongside the existing user,
document and collection mentions. Typing @ with a natural language date
(e.g. "tomorrow", "next friday", "jan 2") surfaces a date suggestion,
parsed via chrono-node. Dates are stored as date-only ISO strings and
displayed with increasing granularity (Today / Tomorrow / January 2nd /
February 3rd, 2024), recomputed dynamically so relative labels stay
fresh. Clicking a date mention opens a Radix popover calendar to change
it.
* Load chrono-node lazily to keep it out of the main bundle
Convert parseNaturalLanguageDate to dynamically import chrono-node on
first use so the bundler splits it into a separate chunk fetched only
when a date is actually parsed. The mention menu now resolves the parse
asynchronously in an effect.
* Add DynamicCalendarIcon
* Lock page scroll while the date mention picker is open
Wrap the date picker popover content in RemoveScroll (via a Slot, with
the Radix content asChild), mirroring the inline editor menu, so the
page can't scroll behind the open calendar.
* Restyle the date mention calendar picker
The react-day-picker base stylesheet isn't loaded in the editor, so day
cells fell back to default browser button styling. Style the calendar
from scratch to match the rest of the app: reset button chrome, show
outside (previous/next month) days clearly de-emphasised, render the
selected day as a solid accent-filled circle, and emphasise today with
the accent colour. Enable showOutsideDays and fixedWeeks for a stable
6-week grid.
* Share one themed Calendar between the date mention and API key pickers
Extract the custom react-day-picker styling into a reusable Calendar
component and use it in both the date mention picker and the API key
expiry picker, so they look identical. The calendar owns its own padding
and the API key scene no longer needs the library's base stylesheet.
* Make the ISO date the single source of truth for date mentions
Date mentions no longer persist a human-readable label in the ProseMirror
data. Instead the displayed text, plaintext, DOM text and markdown link
text are all derived from the ISO modelId, so the saved data can never
drift or go stale. parseDOM/parseMarkdown no longer capture rendered text
as a label for dates, and the mention menu/picker stop writing one.
* tweaks
* Make DynamicCalendarIcon day text contrast with its fill
The day number is rendered white with mix-blend-mode difference, which
produces the exact inverse of the icon's (currentColor) fill, so it stays
legible whatever colour the icon takes. The SVG is isolated so the blend
only considers the icon's own fill.
* Lazy-load the date picker to keep Radix out of the editor schema graph
Importing @radix-ui/react-popover and react-day-picker at the top of
Mentions.tsx pulled them into the editor schema's static import graph,
which is also loaded on the server. Radix's prebuilt ESM does a bare
"react/jsx-runtime" import that the node/shared test resolvers can't
resolve, breaking all server and shared editor test suites.
Move the popover + calendar into DateMentionPicker, loaded via
React.lazy, so the browser-only dependencies are code-split out of the
schema graph and only fetched when an editable date mention renders.
* Deprecate block menu date/time commands in favor of date mention
Replace the block menu "Current date" entry so it inserts a date mention
for today instead of a static string/template token, and remove the
"Current time" and "Current date and time" entries. The underlying
DateTime extension and its {date}/{time}/{datetime} template placeholders
are left intact so existing documents and templates keep working.
* Omit the year from dateToReadable within the current year
dateToReadable now formats current-year dates without the year (e.g.
"June 8th") and includes it otherwise (e.g. "February 3rd, 2024"). This
keeps the mention menu subtitle compact while the relative title shows
"Today"/"Tomorrow".
* Let date mentions inherit surrounding font weight
The .mention style fixes font-weight to 500, which prevented a date
mention placed inside a heading from rendering bold like the rest of the
heading. Date mentions are plain text, so they now inherit the font
weight of their context.
* Address review feedback on date mentions
- MentionMenu: catch rejected date-parse promises so a chunk-load failure
clears the suggestion instead of leaving stale state / an unhandled rejection.
- parseNaturalLanguageDate: don't cache a rejected chrono import so a later
parse can retry after a transient failure.
- parseISODate: reject strings with a time component to honor the date-only
contract and keep day-granular comparisons correct.
- DynamicCalendarIcon: mark the decorative SVG aria-hidden / focusable=false.
* tweaks
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Toggling a nested list no longer converts parent lists
When the selection was inside a nested list, toggling the list type from
the toolbar or keyboard shortcut converted every list in the tree,
including ancestors of the selected list. This was caused by
doc.nodesBetween visiting ancestor nodes whose range overlaps the
selected list - these are now skipped so only the closest list and its
children are converted. Also guards against converting nested lists with
incompatible content such as checkbox lists.
Closes#12653https://claude.ai/code/session_01Q5hkRNp1Fo3jAc9fW5t68h
* test: Throw when selection text is not found in toggleList test helper
https://claude.ai/code/session_01Q5hkRNp1Fo3jAc9fW5t68h
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: Block math not closed by trailing $$ on a content line
The closing delimiter check compared a 3-character slice against the
2-character "$$" delimiter, so block math closed on the same line as
content (e.g. "c = d$$") was never detected and the block swallowed the
rest of the document. Use the delimiter length rather than a hardcoded
slice. Also fix the indexOf sentinel comparison (!== 1 instead of
!== -1) in inline math parsing, which terminated correctly only by
coincidence.
Adds tests for the math markdown rules and moves the findNodes test
helper into shared/test/editor for reuse.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: NaN width and height parsed for video and image nodes
Video parseDOM and parseMarkdown used parseInt on a missing attribute,
storing NaN instead of null and persisting it to markdown as NaNxNaN.
Image size syntax with a missing dimension (e.g. "=x100") hit the same
issue through optional regex groups. Parse dimensions only when
present, matching the existing guard in Image parseDOM, and correct the
video getAttrs element type.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: Normalize non-numeric video dimensions, avoid serializing nullxnull
Review feedback: parseInt could still produce NaN when the attribute
exists but is not numeric (e.g. width="auto"), and toMarkdown wrote
null dimensions as "nullxnull". Parse dimensions through a helper that
normalizes non-finite values to null, and serialize nullish dimensions
as empty strings, which still round-trips as a video node.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Add "+:emoji:" reaction shorthand to comment form
Typing a comment that consists solely of a leading "+" followed by a
single emoji now adds that emoji as a reaction to the comment above,
instead of posting a new reply — mirroring the Slack shorthand.
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
* Move parseReactionShorthand into editor/lib/emoji
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
* Open emoji menu when colon is preceded by a plus
The suggestion menu's trigger boundary excluded "+", so typing "+:" never
opened the emoji menu — preventing the "+:emoji:" reaction shorthand from
being typed. Add a configurable `precededBy` option to the Suggestion
extension and set it to "+" for the emoji menu.
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
* Always allow "+" before suggestion trigger
Simplify by adding "+" to the trigger boundary for all suggestion menus
rather than making it a per-menu option. This lets the "+:emoji:" reaction
shorthand open the emoji menu.
https://claude.ai/code/session_01RSiUiEFLBaRF6YBfPNPiX6
---------
Co-authored-by: Claude <noreply@anthropic.com>