- Add HashtagSuggestion.cy.tsx (16 tests): popup trigger, filtering,
keyboard/click selection, new tag creation, escape to close
- Add ItemMentionSuggestion.cy.tsx (16 tests): popup trigger, filtering,
keyboard/click selection, markdown serialization, edge cases
- Add SuggestionList.cy.tsx (14 tests): rendering, keyboard navigation,
click selection, empty state
- Update TestEditor.tsx to support enableSuggestions prop for testing
These tests validate user-facing autocomplete behaviors for # and @
mentions in the rich text editor.
Reorder processing steps: truncate raw markdown first, then preprocess.
Previously, preprocessMarkdown converted mentions/hashtags to HTML tags
before truncation, but truncateMarkdown only recognizes markdown syntax
([@Label](/item/id)), not HTML tags (<span data-item-mention...>),
causing tags to be cut in half.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add null checks for editor in RichTextEditor (handleChange, useEffect)
- Extract video URL patterns to shared videoPatterns.ts module
- Refactor VideoEmbed.tsx and preprocessMarkdown.ts to use shared patterns
- Add helper functions: getVideoEmbedUrl, getVideoCanonicalUrl, parseVideoUrl
- Remove unused markdownToTiptapJson function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add strict regex patterns for tag restoration that only match exact expected format
- Add sanitizeUrl() to block javascript:, data:, vbscript: URLs in markdown links
- Add containsDangerousAttributes() to detect event handlers in restored content
- Prevents onclick/onload injection via malformed preprocessed tags
- Add missing dependencies to useEditor in TextView.tsx (items, getItemColor, addFilterTag)
- Remove redundant useEffect that duplicated editor initialization
- Update all TipTap packages to v3.15.3 for version consistency
- Make YouTube video ID pattern more flexible (10-12 chars instead of exactly 11)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace addStorage() with markdownTokenizer/parseMarkdown/renderMarkdown
- Remove tiptap-markdown from rollup commonjs config
- These changes fix serialization of hashtags and mentions to markdown
- Add convertNakedUrls() to skip URLs already inside markdown links
- Rewrite truncateMarkdown() with token-aware truncation
- Add @tiptap/markdown support to VideoEmbed, ItemMention, Hashtag
- Fix double-conversion of URLs in existing links
- Fix truncation cutting tokens in the middle
- Fix eslint warnings with proper types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The @tiptap/markdown extension doesn't automatically parse custom
markdown syntax like [@Label](/item/id). We need to preprocess the
markdown before loading it into the editor to convert these patterns
to HTML spans that the extensions' parseHTML handlers can recognize.
- RichTextEditor: preprocess defaultValue before loading
- TextView: preprocess innerText before loading
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove old addStorage.markdown.serialize (community tiptap-markdown)
- Keep only renderMarkdown (official @tiptap/markdown)
- Update TextView.tsx to use @tiptap/markdown with contentType
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace community `tiptap-markdown` with official `@tiptap/markdown`
- Use new API: `editor.getMarkdown()` instead of `editor.storage.markdown.getMarkdown()`
- Add `contentType: 'markdown'` for direct markdown loading
- Remove unused `@tiptap/extension-color` (no UI was using it)
- Remove custom MarkdownStorage type declaration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
UUIDs can contain both uppercase and lowercase hex characters (A-F, a-f).
The regex was only matching lowercase, causing @mentions to not be
converted to links in TextViewStatic.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>