reorproject / reor

Private & local AI personal knowledge management app.
https://reorproject.org
GNU Affero General Public License v3.0
6.83k stars 413 forks source link

New note creating issue #364

Closed pachieh closed 2 weeks ago

pachieh commented 3 weeks ago

When creating a new note in the root directory using the icon on the left menu bar, it is creating a new directory, sub directory, and then the note. The two directories it creates take the name of the note you type in as well. Noticed this today after trying to name a note. Very odd.

macOS Sonoma 14.6.1 Reor 0.2.19

joseplayero commented 3 weeks ago

Could you explain a bit more how to reproduce this/do a little screen record to show what happened? I tried replicating this and i could not

pachieh commented 3 weeks ago

When I hit the create new note icon and type in a name, it would create two folders and then the note.

And like taking your car to a mechanic, I tried to do screenshots/recording and it stopped doing it.

pachieh commented 3 weeks ago
Screenshot 2024-08-21 at 14 00 15

See attached. It's hard to do a recording, will try again because it doesn't happen all the time.

Here's the dump when I toggle Developers Tools in Reor...

Refused to load the font 'data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmftt...mCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC' because it violates the following Content Security Policy directive: "font-src 'self' https://fonts.gstatic.com".

index-5fe8633b.js:238 [tiptap warn]: Duplicate extension names found: ['paragraph', 'doc', 'text']. This can lead to issues. resolve @ index-5fe8633b.js:238 3index-5fe8633b.js:649 Uncaught (in promise) Error: Error invoking remote method 'read-file': Error: ENOENT: no such file or directory, open '/Users/brian/Documents/AWC (Reor)/Decoding the Adversary (Hink/Cullen).md' index.html:1 Uncaught (in promise) Error: Error invoking remote method 'index-file-in-database': Error: ENOENT: no such file or directory, stat '/Users/brian/Documents/AWC (Reor)/Decoding the Adversary (Hink/Decoding the Adversary (Hink/Decoding.md' index.html:1 Uncaught (in promise) Error: Error invoking remote method 'index-file-in-database': Error: ENOENT: no such file or directory, stat '/Users/brian/Documents/AWC (Reor)/Decoding the Adversary (Hink/Decoding the Adversary (Hink/Decoding the Adversary Hink and Cullen.md' 2index-5fe8633b.js:649 Uncaught (in promise) Error: Error invoking remote method 'read-file': Error: ENOENT: no such file or directory, open '/Users/brian/Documents/AWC (Reor)/Decoding the Adversary (Hink/Decoding the Adversary (Hink/Decoding the Adversary Hink and Cullen.md' index-5fe8633b.js:649 Uncaught (in promise) Error: Error invoking remote method 'read-file': Error: ENOENT: no such file or directory, open '/Users/brian/Documents/AWC (Reor)/Decoding the Adversary (Hink/Cullen).md' 6index-5fe8633b.js:649 Uncaught (in promise) Error: Error invoking remote method 'read-file': Error: ENOENT: no such file or directory, open '/Users/brian/Documents/AWC (Reor)/Decoding the Adversary (Hink/Decoding the Adversary (Hink/Decoding the Adversary Hink and Cullen.md' index.html:1 Uncaught (in promise) Error: Error invoking remote method 'index-file-in-database': Error: ENOENT: no such file or directory, stat '/Users/brian/Documents/AWC (Reor)/Design Thinking (Rauch/Tackett).md' index-5fe8633b.js:649 Uncaught (in promise) Error: Error invoking remote method 'read-file': Error: ENOENT: no such file or directory, open '/Users/brian/Documents/AWC (Reor)/Design Thinking (Rauch/Thinking.md'

milaiwi commented 3 weeks ago

Weird. I was able to reproduce it and I think this is a simple fix. I'll make a PR soon.

Steps to reproduce:

Bug:

milaiwi commented 3 weeks ago

Okay, this error happens on the creation of the file. Users should not be able to have any form of slashes in their title since slashes represent directories and files in paths. To fix this, we need to check getInvalidCharacterInFileName on the creation or a note or directory