Bug 508572 - Deleting cloned panel with a sticky note on it permanently destroys contents of *original* panel's sticky note
Summary: Deleting cloned panel with a sticky note on it permanently destroys contents ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: 6.4.80
Platform: KDE Linux Linux
: VHI critical
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-21 18:19 UTC by Nate Graham
Modified: 2025-08-26 14:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.4.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2025-08-21 18:19:05 UTC
STEPS TO REPRODUCE
1. Put a Sticky Note widget on your panel
2. Write lots of things in it that would be extremely disruptive or saddening to lose
3. Right-click on an empty area of the panel > Show Panel Configuration
4. Clone panel > click on one of the big arrows to clone the panel there
5. Delete the new panel
6. Restart plasmashell
7. Click on the Sticky Note widget on the *original* panel


OBSERVED RESULT
The sticky note is empty!

Fortunately I had a backup from a few days ago. However, this is still data loss, and if without that backup it would have been irretrievable data loss.


EXPECTED RESULT
The sticky note's text is still there.


SOFTWARE/OS VERSIONS
Operating System: KDE Linux 2025-08-21
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.1
Kernel Version: 6.16.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon™ 780M Graphics
Memory: 16 GiB of RAM (14.9 GiB usable)
Graphics Processor: AMD Radeon 780M Graphics


ADDITIONAL INFORMATION
Here's what happened: the cloned sticky note retained its config data, so it was pointing at a specific file in ~/.local/share/plasma_notes/ — the same file that the old sticky note is pointing at! When the cloned panel was deleted, the cloned Sticky Note widget deleted the underlying file that both Sticky Note widgets were using. This made it unavailable to the original panel too, but only after restarting plasmashell or the system. At that point, data loss has occurred.
Comment 2 Nate Graham 2025-08-21 18:24:08 UTC
Side note: it would be good to move the underlying file to the trash rather than deleting it.
Comment 3 Nate Graham 2025-08-21 18:25:28 UTC
Which would likely represent a fix for Bug 453673.
Comment 4 Niccolò Venerandi 2025-08-22 09:15:59 UTC
https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/897 would fix this
Comment 5 Niccolò Venerandi 2025-08-26 08:10:22 UTC
Git commit 04badef38de928e8386c93b044fd9bd54e95c0bd by Niccolò Venerandi.
Committed on 26/08/2025 at 08:10.
Pushed by niccolove into branch 'master'.

Deduplicate multiple applets asking to use the same note file

This also trashes notes instead of deleting them, which
makes them recoverable.
Related: bug 453673

M  +1    -0    applets/notes/CMakeLists.txt
M  +1    -1    applets/notes/abstractnoteloader.h
M  +29   -6    applets/notes/filesystemnoteloader.cpp
M  +2    -1    applets/notes/filesystemnoteloader.h
M  +2    -2    applets/notes/notemanager.cpp
M  +1    -1    applets/notes/notemanager.h
M  +1    -1    applets/notes/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/04badef38de928e8386c93b044fd9bd54e95c0bd
Comment 6 Niccolò Venerandi 2025-08-26 08:13:25 UTC
Git commit 865efe1aca54fe167b3f4317ba303d0b5ce6756b by Niccolò Venerandi.
Committed on 26/08/2025 at 08:13.
Pushed by niccolove into branch 'Plasma/6.4'.

Deduplicate multiple applets asking to use the same note file

This also trashes notes instead of deleting them, which
makes them recoverable.
Related: bug 453673

Apply 1 suggestion(s) to 1 file(s)

Co-authored-by: Nate Graham <nate@kde.org>

M  +2    -0    applets/notes/CMakeLists.txt
M  +1    -1    applets/notes/abstractnoteloader.h
M  +29   -6    applets/notes/filesystemnoteloader.cpp
M  +2    -1    applets/notes/filesystemnoteloader.h
M  +2    -2    applets/notes/notemanager.cpp
M  +1    -1    applets/notes/notemanager.h
M  +1    -1    applets/notes/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/865efe1aca54fe167b3f4317ba303d0b5ce6756b