Skip to content

Conversation

@werererer
Copy link

@werererer werererer commented Oct 12, 2025

Solves: #6817

State: Workes. waiting for Review
TODO:

Done:

  • Replaced scattered createNote calls with unified createNoteIntoPath / createNoteIntoInbox
  • Added CreateMode to autocomplete system
  • Introduced MentionAction enum for CKEditor mentions
  • Updated translations for new creation strings
  • Refactored note_autocomplete.ts and related widgets for consistency
  • Hopefully improved code structure for creating Notes

PS
Yes I had to put my hands on many files, because the logic of creating notes was handled by a lot of different files. After this PR managing the code for creating notes should becomes easier.

@werererer
Copy link
Author

werererer commented Oct 12, 2025

Hm, I can't get every checks to pass, I don't think this PR changes are at fault based on reviewing the logs. If it is pls send me back to draft.

I tested the code and it works reliably on my computer.

Its now officially open for review now, not a Draft anymore.

@werererer werererer marked this pull request as ready for review October 12, 2025 18:43
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 12, 2025
@werererer werererer changed the title Draft: feat(search): add create into inbox to search feat(search): add create into inbox to search Oct 12, 2025
@werererer
Copy link
Author

werererer commented Oct 12, 2025

@eliandoran
image

for the code-review it is especially interesting if it was okay to edit these 2 files mention_customization and augmentation.ts (See picture). Through git blame i found your name there and concluded custome code there would be okay. Maybe there are other ways to fix what I did here, but fixing without editing these files would be a bit more convoluted.

@contributor
Copy link
Contributor

contributor commented Oct 12, 2025

for the code-review it is especially interesting if it was okay to edit these 2 files mention_customization and augmentation.ts

  • MentionAction placement in packages/ckeditor5/src/augmentation.ts looks off to me, it rather belongs to something like packages/commons
  • Also no need to make srtrings enum, just plain enum
  • The name NoteCreateAction better explains the type. The fact that we can create notes via mentions as well, should not be encoded in the type name.

I pushed commit 80afdaf with the changes to review (branch)

If @eliandoran is ok with that commit, please cherry pick it, or I can add it to your PR if it allows edits from maintainers.

@werererer
Copy link
Author

@contributor Thanks for the additional review. And Improvement
Your changes make sense. Let's wait for feedback from Elian. I will cherrypick your changes if he gives me the okay here.

Feel free to play around with things that don't align with standards I am not so much aware of to speed up the process.

@werererer
Copy link
Author

werererer commented Oct 17, 2025

Okay, I will revert to draft.
The following things I will fix before reopening for further review:

  • @contributor Cherrypicking your changes already. To reduce review workload by removing ambiguity of planned action.
    contributor@80afdaf
  • Remove some translations that cause merge issues. The solution was discussed in Matrix:
Matrix solution image image

@werererer werererer marked this pull request as draft October 17, 2025 16:55
@werererer
Copy link
Author

werererer commented Oct 18, 2025

@contributor The Commit contributor@80afdaf didn't work yet. In my case it generated the following error:

Error Message { "message": "unexpected-error\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error\nOriginal error: ReferenceError: CreateNoteAction is not defined", "stack": "ReferenceError: CreateNoteAction is not defined\n at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35)\n at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7728:37)\n at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)\n at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7731:21)\n at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:44674:20)\n at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:46394:28)\n at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/ckeditor5.js?v=23194951:38746:14)\n at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)\n at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/ckeditor5.js?v=23194951:38729:22)\n at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)", "filename": "http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951", "lineno": 7279, "colno": 11, "date": 1760748587043 }, { "message": "unexpected-error\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error\nOriginal error: ReferenceError: CreateNoteAction is not defined", "stack": "ReferenceError: CreateNoteAction is not defined\n at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35)\n at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7728:37)\n at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)\n at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7731:21)\n at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:44674:20)\n at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:46394:28)\n at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/ckeditor5.js?v=23194951:38746:14)\n at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)\n at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/ckeditor5.js?v=23194951:38729:22)\n at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)", "filename": "http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951", "lineno": 7279, "colno": 11, "date": 1760748592273 }, { "message": "unexpected-error\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error\nOriginal error: ReferenceError: CreateNoteAction is not defined", "stack": "ReferenceError: CreateNoteAction is not defined\n at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35)\n at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7728:37)\n at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)\n at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7731:21)\n at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:44674:20)\n at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:46394:28)\n at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/ckeditor5.js?v=23194951:38746:14)\n at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)\n at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/ckeditor5.js?v=23194951:38729:22)\n at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951:7413:16)", "filename": "http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/Trilium/.cache/vite/deps/chunk-D46A7232.js?v=23194951", "lineno": 7279, "colno": 11, "date": 1760748599023 } ] Stack: Error

What needs to be fixed
Please test the code on your own branch again and fix upcoming issues. I can only cherry pick if the feature still works after refactor. To check it works I test the code by running it.

I usually test trilium by pnpm run desktop:start or pnpm run server:start and literarly testing the intended feature, and trying to break it. Only afterward the feature works as intended i Compile it using pnpm run --filter desktop electron-forge:make --arch=x64 --platform=win32. You can ofc use linux instead of win32 if you have that instead. If it broke, then the mistake is either my mistake, or I test in a new test branch the code without my commit, then its the other persons fault (maybe this is why its called "git blame" lol)

Irrelvant extra details

While I love the code review, reviewing Code that isn't running properly yet is time consuming, as broken code always has weird glitches that need thinking investment in the code changes. So asking for cherry pick of a commit not tested yet, asks for more investment than glancing, which sometimes can be quite uncomfortable, as then the communication get ambiguous. What to do if it doesn't work? criticize creating bad impression? fix it yourself? reject?

How could it be fixed?
For this commit, while the naming is good, I would prefer not changing the build system for ckeditor, just for it to be able to import from trilium the same enum. As it might affect futur compatibility with upstream (trying to not diverge too much here).

previously one way I had to solved it is that i would let ckeditor define a subset of that enum that refers to a string, and then let have trilium refer to the same string.

I can fix the issue, but I am not 100% sure what you have planned, therefore would appreciate it, if you could fix it to preserve intent. I cherry pick afterwards

Conclusion
I can continue the PR if the ambiguity is resolved, by either the code fixed in logic or rejecting this commit 1 only taking over its central ideas. I prefer the first choice and will push for it, as it reduces duplication of work thus time commitment.

Therefore:

  • Wait on tested commit.
  • Then cherrypick it.

Status: DONE

Footnotes

  1. https://github.com/contributor/trilium/commit/80afdaf8ba835b3639c721309e3f158e1949d13e

@contributor
Copy link
Contributor

@werererer

The Commit contributor@80afdaf didn't work yet. In my case it generated the following error

I built, ran and tested the commit week ago before offering it.
I just double-checked my branch and confirmed that it works and can create both child and inbox note:

image

git log of the branch the branch https://github.com/contributor/trilium/tree/search-to-inbox:

80afdaf8b 2025-10-12     contributor     rename MentionAction to CreateNoteAction and move to packages/common
794060d8e 2025-10-12     Jakob Schlanstedt       refactor(ECMAScript Modules jsimport convention): refactor newly created imports to js convention
a254e96a3 2025-10-12     Jakob Schlanstedt       refactor(note-create): change order of noteCreate intoPath and intoInbox to improve code compatibility
fbb4ab6ae 2025-10-12     Jakob Schlanstedt       feat(search): add create into inbox to search
4a0afe68e 2025-10-12     Elian Doran     fix(desktop): alignment of window overlay on vertical layout (closes #7257)

I use the same command to build and run.

Probably you miss something during cherry pick. Can you build and run my branch?

@contributor
Copy link
Contributor

contributor commented Oct 18, 2025

I just tried the commit over current state of the PR - and it cherry picks cleanly, and the app is running perfectly as well

git cherry-pick 80afdaf8b 
[search-into-inbox-new acd8307d6] rename MentionAction to CreateNoteAction and move to packages/common
 Date: Sun Oct 12 23:06:53 2025 +0300
 8 files changed, 36 insertions(+), 35 deletions(-)
 create mode 100644 packages/commons/src/lib/create_note_actions.ts
git lgf
acd8307d6 2025-10-12     contributor     rename MentionAction to CreateNoteAction and move to packages/common
bc87aae68 2025-10-18     Jakob Schlanstedt       (refactor): Revert non-English translation files to resolve merge issues
794060d8e 2025-10-12     Jakob Schlanstedt       refactor(ECMAScript Modules jsimport convention): refactor newly created imports to js convention
a254e96a3 2025-10-12     Jakob Schlanstedt       refactor(note-create): change order of noteCreate intoPath and intoInbox to improve code compatibility
fbb4ab6ae 2025-10-12     Jakob Schlanstedt       feat(search): add create into inbox to search
4a0afe68e 2025-10-12     Elian Doran     fix(desktop): alignment of window overlay on vertical layout (closes #7257)

The branch is here: https://github.com/contributor/trilium/tree/search-into-inbox-new

@werererer

This comment was marked as outdated.

@werererer
Copy link
Author

werererer commented Oct 18, 2025

@contributor Actually sorry for my fast generalization: funnily I only tested what you didn't test. Thus miscommunication lol.

not working:
(tested on your branch): using @ to create a note. Reason: That part runs under a different part of the application specifically over the ckeditor part Which I had to modify for it to work.

image

@werererer
Copy link
Author

werererer commented Oct 18, 2025

@contributor Trace & Log

Stack Trace 200 GET /api/notes/RGCyxYx1gtqE/blob with 348 bytes took 0ms JS Error: Uncaught error: Message: Uncaught CKEditorError: unexpected-error Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error Original error: ReferenceError: CreateNoteAction is not defined, URL: http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b, Line: 7279, Column: 11, Error object: TypeError: Converting circular structure to JSON --> starting at object with constructor 'ClassicEditor' | property 'accessibility' -> object with constructor 'Accessibility' --- property '_editor' closes the circle, Stack: ReferenceError: CreateNoteAction is not defined at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35) at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7728:37) at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16) at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7731:21) at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:44674:20) at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:46394:28) at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38746:14) at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16) at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38729:22) at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16) Stack: Error at Object.logError (http://127.0.0.1:37742/assets/v0.99.1/src/services/ws.ts:22:14) at window.onerror (http://127.0.0.1:37742/assets/v0.99.1/src/services/glob.ts:33:8) JS Info: CKEditor state changed to crashed JS Error: CKEditor crash logs: [ { "message": "unexpected-error\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error\nOriginal error: ReferenceError: CreateNoteAction is not defined", "stack": "ReferenceError: CreateNoteAction is not defined\n at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35)\n at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7728:37)\n at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)\n at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7731:21)\n at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:44674:20)\n at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:46394:28)\n at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38746:14)\n at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)\n at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38729:22)\n at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)", "filename": "http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b", "lineno": 7279, "colno": 11, "date": 1760782443406 } ] Stack: Error at logError (http://127.0.0.1:37742/assets/v0.99.1/src/services/ws.ts:22:14) at EditorWatchdog. (http://127.0.0.1:37742/assets/v0.99.1/src/widgets/type_widgets/editable_text.ts:119:7) at EditorWatchdog._fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:42864:16) at EditorWatchdog._handleError (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:42902:12) at Watchdog._boundErrorHandler (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:42815:14) JS Info: CKEditor state changed to initializing JS Info: Creating new CKEditor 200 GET /api/search/%23textSnippet with 2 bytes took 1ms JS Info: CKEditor state changed to ready 204 PUT /api/notes/RGCyxYx1gtqE/data with 0 bytes took 4ms 200 GET /api/notes/RGCyxYx1gtqE/blob with 163 bytes took 1ms 200 GET /api/autocomplete?query=&activeNoteId=RGCyxYx1gtqE&fastSearch=true with 143 bytes took 1ms Slow 200 GET /api/autocomplete?query=jdkfls&activeNoteId=RGCyxYx1gtqE&fastSearch=true with 2 bytes took 12ms 204 PUT /api/notes/RGCyxYx1gtqE/data with 0 bytes took 7ms 200 GET /api/notes/RGCyxYx1gtqE/blob with 170 bytes took 0ms JS Error: Uncaught error: Message: Uncaught CKEditorError: unexpected-error Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error Original error: ReferenceError: CreateNoteAction is not defined, URL: http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b, Line: 7279, Column: 11, Error object: TypeError: Converting circular structure to JSON --> starting at object with constructor 'ClassicEditor' | property 'accessibility' -> object with constructor 'Accessibility' --- property '_editor' closes the circle, Stack: ReferenceError: CreateNoteAction is not defined at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35) at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7728:37) at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16) at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7731:21) at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:44674:20) at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:46394:28) at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38746:14) at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16) at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38729:22) at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16) Stack: Error at Object.logError (http://127.0.0.1:37742/assets/v0.99.1/src/services/ws.ts:22:14) at window.onerror (http://127.0.0.1:37742/assets/v0.99.1/src/services/glob.ts:33:8) JS Info: CKEditor state changed to crashed JS Error: CKEditor crash logs: [ { "message": "unexpected-error\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error\nOriginal error: ReferenceError: CreateNoteAction is not defined", "stack": "ReferenceError: CreateNoteAction is not defined\n at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35)\n at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7728:37)\n at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)\n at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7731:21)\n at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:44674:20)\n at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:46394:28)\n at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38746:14)\n at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)\n at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38729:22)\n at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)", "filename": "http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b", "lineno": 7279, "colno": 11, "date": 1760782443406 }, { "message": "unexpected-error\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error\nOriginal error: ReferenceError: CreateNoteAction is not defined", "stack": "ReferenceError: CreateNoteAction is not defined\n at CustomMentionCommand.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/packages/ckeditor5/src/plugins/mention_customization.ts:32:35)\n at CustomMentionCommand. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7728:37)\n at CustomMentionCommand.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)\n at [as execute] (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7731:21)\n at CommandCollection.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:44674:20)\n at ClassicEditor.execute (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:46394:28)\n at MentionsView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38746:14)\n at MentionsView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)\n at MentionListItemView. (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/ckeditor5.js?v=e341837d:38729:22)\n at MentionListItemView.fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:7413:16)", "filename": "http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b", "lineno": 7279, "colno": 11, "date": 1760782448777 } ] Stack: Error at logError (http://127.0.0.1:37742/assets/v0.99.1/src/services/ws.ts:22:14) at EditorWatchdog. (http://127.0.0.1:37742/assets/v0.99.1/src/widgets/type_widgets/editable_text.ts:119:7) at EditorWatchdog._fire (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:42864:16) at EditorWatchdog._handleError (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:42902:12) at Watchdog._boundErrorHandler (http://127.0.0.1:37742/assets/v0.99.1/@fs/home/jakob/git/contributor/trilium/.cache/vite/deps/chunk-D46A7232.js?v=f45fe61b:42815:14) JS Info: CKEditor state changed to initializing JS Info: Creating new CKEditor
git log commit 80afdaf (HEAD -> search-to-inbox, origin/search-to-inbox) Author: contributor Date: Sun Oct 12 23:06:53 2025 +0300
rename MentionAction to CreateNoteAction and move to packages/common

commit 794060d
Author: Jakob Schlanstedt schlanstedtjakob@gmail.com
Date: Sun Oct 12 19:03:56 2025 +0200

refactor(ECMAScript Modules jsimport convention): refactor newly created imports to js convention

https://nodejs.org/api/esm.html#import-specifiers

commit a254e96
Author: Jakob Schlanstedt schlanstedtjakob@gmail.com
Date: Sun Oct 12 18:54:39 2025 +0200

refactor(note-create): change order of noteCreate intoPath and intoInbox to improve code compatibility

commit fbb4ab6
Author: Jakob Schlanstedt schlanstedtjakob@gmail.com
Date: Sun Oct 12 06:31:48 2025 +0200

feat(search): add create into inbox to search

@werererer
Copy link
Author

werererer commented Oct 18, 2025

@contributor Everything else works as expected.

@contributor
Copy link
Contributor

@werererer I see the problem with creating a note via mentions. Looking into this

Jakob Schlanstedt and others added 24 commits November 5, 2025 14:40
…consistent and resulting errors from corrected logic.
@werererer
Copy link
Author

As for the naming, let's go for "Create child note" and "Create note".
#7287 (review)

Solved in 0ab9b5d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants