1771 Commits

Author SHA1 Message Date
mahula
581c919f23 ci: add GitHub workflow for lib Cypress component tests 2026-02-09 20:15:50 +01:00
mahula
b452fd5058
Merge branch 'main' into feature/tiptap-textview-migration 2026-02-08 09:12:58 +01:00
Anton Tranelis
298560c02e
fix(lib): infinite scroll in items index page (#438)
Co-authored-by: mahula <lenzmath@posteo.de>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2026-02-06 20:37:28 +01:00
ab515c20ad
feat(backend): database scripts for tasks required regularly (#694) 2026-02-06 16:51:53 +01:00
dependabot[bot]
529ee8cc81
build(deps-dev): bump eslint-plugin-react-refresh from 0.4.26 to 0.5.0 (#702)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 09:03:59 +00:00
dependabot[bot]
ab2380ec55
build(deps-dev): bump cypress from 15.9.0 to 15.10.0 (#698)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 09:53:46 +01:00
dependabot[bot]
afb280da14
build(deps-dev): bump happy-dom from 20.4.0 to 20.5.0 (#701)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 08:36:37 +00:00
dependabot[bot]
0f93c393a3
build(deps-dev): bump daisyui from 5.5.14 to 5.5.17 (#696)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 08:28:51 +00:00
dependabot[bot]
088516e3b7
build(deps): bump react-dropzone from 14.3.8 to 14.4.0 (#700)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 08:16:21 +00:00
dependabot[bot]
f3d282b29a
build(deps-dev): bump rollup from 4.57.0 to 4.57.1 (#697)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 09:10:07 +01:00
dependabot[bot]
6da1893078
build(deps-dev): bump @types/node from 24.10.2 to 25.0.10 (#687)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 04:49:18 +00:00
dependabot[bot]
d62f92d890
build(deps): bump vite-tsconfig-paths from 5.1.4 to 6.0.5 (#691)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 04:44:11 +00:00
dependabot[bot]
ed9d613db7
build(deps): bump maplibre-gl from 5.16.0 to 5.17.0 (#689)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 04:38:41 +00:00
dependabot[bot]
1d54110d2d
build(deps-dev): bump globals from 17.0.0 to 17.2.0 (#688)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 04:33:28 +00:00
dependabot[bot]
59c3ef52c9
build(deps-dev): bump the vitest-ecosystem group with 2 updates (#683)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 04:25:15 +00:00
dependabot[bot]
bfb23d9510
build(deps): bump react-router-dom from 7.12.0 to 7.13.0 (#684)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 23:52:59 +00:00
dependabot[bot]
ccc58ce8c3
build(deps-dev): bump rollup from 4.55.3 to 4.57.0 (#690)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 21:38:58 +01:00
dependabot[bot]
a9c318d6ea
build(deps-dev): bump happy-dom from 20.3.4 to 20.4.0 (#686)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-28 07:44:22 +00:00
dependabot[bot]
872add843f
build(deps): bump axios from 1.13.2 to 1.13.4 (#692)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-28 06:27:30 +00:00
dependabot[bot]
fe61c68183
build(deps): bump actions/checkout from 6.0.1 to 6.0.2 (#693)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-28 07:22:00 +01:00
dependabot[bot]
0c3b4d7fa0
build(deps-dev): bump eslint-plugin-prettier from 5.5.4 to 5.5.5 (#680)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 19:35:01 +00:00
dependabot[bot]
9b5163e31e
build(deps-dev): bump @testing-library/react from 16.3.1 to 16.3.2 (#675)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 19:27:47 +00:00
dependabot[bot]
893ae85066
build(deps-dev): bump prettier from 3.7.4 to 3.8.0 (#678)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 19:22:19 +00:00
dependabot[bot]
1d8cbeab2b
build(deps-dev): bump rollup from 4.55.1 to 4.55.2 (#679)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 20:15:03 +01:00
dependabot[bot]
3d7a3f1163
build(deps-dev): bump happy-dom from 20.1.0 to 20.3.4 (#681)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 18:44:31 +00:00
dependabot[bot]
c08c7e5f89
build(deps): bump actions/setup-node from 6.1.0 to 6.2.0 (#682)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 19:39:02 +01:00
mahula
1a91aa5310 fix: use 'as const' for isNew literal type in SuggestionList tests 2026-01-19 12:57:48 +01:00
mahula
c48aed88cd test: add suggestion system component tests for TipTap autocomplete
- 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.
2026-01-19 10:52:37 +01:00
mahula
942559247e test: add component tests for TipTap editor integration
- Add TextViewStatic.spec.tsx (16 tests): static HTML renderer tests
- Add TextView.spec.tsx (10 tests): TipTap read-only viewer tests
- Add RichTextEditor.spec.tsx (9 tests): editable editor tests
- Update setupTest.ts with TipTap DOM mocks (Range, Document APIs)

Tests cover rendering, truncation, hashtag/mention styling and clicks,
link navigation, and video embed rendering.
2026-01-19 10:29:54 +01:00
mahula
8e5c6a0907 Revert "docs: add TipTap migration testing strategy"
This reverts commit 64b6e60951dbefee64a54e688396099f370ee150.
2026-01-16 12:20:13 +01:00
317ec72c7e fix(tiptap): fix truncation breaking mentions and hashtags in TextViewStatic
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>
2026-01-16 09:33:25 +01:00
9f74815ee3 fix(tiptap): add null checks, extract video patterns to shared module
- 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>
2026-01-16 09:10:20 +01:00
04c8001114 Revert "fix(tiptap): prevent video embed replacement when adding content below"
This reverts commit df62f39b8fb1146a84f30de757773e7bc56699a3.
2026-01-16 08:49:22 +01:00
mahula
7c31198792 fix(lib): remove unnecessary default prop values and format tests 2026-01-15 18:23:02 +01:00
mahula
6f45c47765 chore(lib): add marked dependency and cleanup 2026-01-15 18:22:47 +01:00
mahula
df62f39b8f fix(tiptap): prevent video embed replacement when adding content below 2026-01-15 18:22:16 +01:00
mahula
5e2d19fb46 test(tiptap): add Cypress component tests for TipTap extensions 2026-01-15 18:21:56 +01:00
mahula
64b6e60951 docs: add TipTap migration testing strategy 2026-01-15 18:21:44 +01:00
mahula
ff6d940ad9 test(tiptap): add unit tests for markdown preprocessing and XSS prevention
- preprocessMarkdown.spec.ts: 76 tests covering URL conversion, video links,
  hashtags, item mentions, markdown removal, and truncation
- simpleMarkdownToHtml.spec.ts: 21 tests for HTML conversion and formatting
- xss.spec.ts: 22 security tests covering script injection, event handlers,
  javascript URLs, tag restoration bypass, and attribute injection
2026-01-15 13:29:46 +01:00
mahula
783a205c58 fix(security): prevent XSS in simpleMarkdownToHtml tag restoration
- 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
2026-01-15 13:29:34 +01:00
b052a877cd fix: address GitHub Copilot review feedback
- 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>
2026-01-15 09:51:40 +01:00
0ef35df335 fix: use @tiptap/markdown API for Hashtag and ItemMention extensions
- Replace addStorage() with markdownTokenizer/parseMarkdown/renderMarkdown
- Remove tiptap-markdown from rollup commonjs config
- These changes fix serialization of hashtags and mentions to markdown
2026-01-15 09:12:35 +01:00
237c84528b fix: lint import order 2026-01-15 09:08:39 +01:00
3d7307b759 fix(lib): improve markdown processing and truncation
- 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>
2026-01-15 08:53:37 +01:00
3a8477f863 fix: use preprocessMarkdown for parsing hashtags and item mentions
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>
2026-01-15 08:53:27 +01:00
90eb66bc80 refactor: clean up markdown serialization, use @tiptap/markdown API
- 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>
2026-01-15 08:53:13 +01:00
acda71ee7b fix(lib): remove extra blank line in RichTextEditor
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:52:57 +01:00
77391dde19 refactor(editor): migrate to native @tiptap/markdown extension
- 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>
2026-01-15 08:52:57 +01:00
Anton Tranelis
02bce69ab3
Merge branch 'main' into feature/tiptap-textview-migration 2026-01-15 08:36:28 +01:00
b40b6c8160 fix: case-insensitive UUID matching in preprocessItemMentions
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>
2026-01-14 16:58:15 +01:00