Bug 500138

Summary: Opening a file using Kate can result in it being opened on another activity
Product: [Applications] kate Reporter: Patrik <idvert3x>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: christoph
Priority: NOR    
Version First Reported In: 24.12.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Patrik 2025-02-15 17:00:42 UTC
SUMMARY
When using multiple activities and opening a file using Kate, if there is an existing instance of Kate (window) running, even if it's on a different activity, it will be re-used, instead of the file being opened in a new instance on the current activity.

STEPS TO REPRODUCE
1. Create two arbitrary files
2. Create two arbitrary activities
3. Switch to activity 1, open Dolphin, using Dolphin, open the file 1 with Kate
4. Switch to activity 2, open Dolphin, using Dolphin, open the file 2 with Kate

OBSERVED RESULT
File 2 opened in activity 2 appears in existing Kate instance in activity 1

EXPECTED RESULT
File 2 opened in activity 2 starts a new instance of Kate, such that the file is actually editable on activity 2

KNOWN WORKAROUND
Each time a file is opened:
- the file must manually be moved to a new window, by right clicking the file tab in Kate and then clicking on "Detach Document"
- the newly opened window must be manually moved to the activity where the file was originally opened, by right clicking on the window titlebar and using the "Show in activities -> Move to X" option.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.1-arch2-1 (64-bit)
Graphics Platform: Wayland
Kate: 24.12.2
Comment 1 Patrik 2025-02-16 18:51:09 UTC
Additionally, when two instances of Kate are already running, one on each activity, opening a file in Dolphin on Activity 2 still results in the file being opened in the Kate instance on Activity 1, despite Kate instance being available on Activity 2 and user opening the file in Activity 2.
Comment 2 Christoph Cullmann 2025-02-16 19:30:41 UTC
Nobody in the Kate teams works with activities and therefore this has regressed. If this should be improved, we will need a person that steps up to code that and maintain it.