Bug 417034 - Notification says that skipped files were copied to destination
Summary: Notification says that skipped files were copied to destination
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.245.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-02-01 18:39 UTC by Patrick Silva
Modified: 2023-11-19 11:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.76


Attachments
screen recording (2.52 MB, video/webm)
2020-02-01 18:39 UTC, Patrick Silva
Details
new screen recording (1.95 MB, video/webm)
2020-11-03 11:02 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-02-01 18:39:51 UTC
Created attachment 125599 [details]
screen recording

Sometimes plasma shows a notication after a successful file copy with Dolphin:

"Copying (Finished)
X of X files to destination"

Such notification does sense if at least one file was in fact copied to destination.

However, if all files that we are trying to copy are already present in destination and we use the "Skip all" ("Apply to all" checkbox > "Skip" button) feature of the file conflict dialog to ignore all of them, plasma shows the same notification after the file operation. In this case, none file is in fact copied to destination but the notication causes confusion because it induces the user to think that some file was copied to destination and therefore "Skip all" feature may have failed.

Watch the attached screen recording please.

EXPECTED RESULT
notification shlud be clear about the amount of files in fact copied

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1
Comment 1 David Faure 2020-08-14 10:23:38 UTC
Right. And if a single file was copied (out of 4) then the notification should say "1/1 file copied", instead of "4/4", right? (1/4 would lead to a 25% progress bar, that would be bad). So by extension skipping all files would lead to "0/0 files copied"... ?


This is all doable using setTotalAmount(KJob::Files, ...) in copyjob.
Comment 2 Patrick Silva 2020-08-14 20:38:13 UTC
My 2 cents as an end user:
The notification says
"Copying (Finished)
y of x files to /path/to/destination"

What means "x" here? The amount of files which the user wants to copy to destination? As an end user, I think so. But I could be mistaken.

I suppose that "y of x" indicates the proportion between the amount of files that the user wants to copy and the one effectively copied to destination. However, in my screen recording the notification confusely says

"Copying (Finished)
4 of 4 files to /path/to/destination"

despite 0 file have been copied to destination. 4 of 4 files were skipped, not copied. :)

A notification saying "Copying (Finished) 0 of 4 files to..." would be coherent
in my screen recording, because I have dragged-n-dropped 4 files and 0 was copied to destination.

If 1 file was copied, the notification should say "Copying (Finished) 1 of 4 file to..."

Personally I consider these file operations notifications annoying and sometimes confusing,
that's why I opened bug 425355 a few minutes ago.
Comment 3 Bug Janitor Service 2020-10-22 22:50:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/183
Comment 4 David Faure 2020-10-22 22:50:34 UTC
OK, this requires separating the notion of progress (50% = we have *processed* 50% of the files) from the amount of files *copied* (rather than processed).

I thought the two were linked, but actually, KJob calculates percent based on bytes, not files.

So this might be sufficient:
https://invent.kde.org/frameworks/kio/-/merge_requests/183

Do you want to test that change?
Comment 5 Ahmad Samir 2020-10-31 18:35:48 UTC
Git commit 36aca3c617cddad0c3e79b87aa8e45148b1193d5 by Ahmad Samir, on behalf of David Faure.
Committed on 31/10/2020 at 18:35.
Pushed by ahmadsamir into branch 'master'.

CopyJob: don't count skipped files in the notification

If we copy 4 files, and 3 of those end up being skipped,
the user should see "1 of 4 files copied", at 100%.

M  +7    -7    autotests/jobtest.cpp
M  +14   -12   src/core/copyjob.cpp

https://invent.kde.org/frameworks/kio/commit/36aca3c617cddad0c3e79b87aa8e45148b1193d5
Comment 6 Patrick Silva 2020-11-03 11:02:40 UTC
Created attachment 132984 [details]
new screen recording

Unfortunately this issue is not fixed yet.
The notification shown after this commit is a bit different
but it also confuses the user inducing him/her to think that the files were copied
to destination instead of skipped.
Furthermore, a useless "Undo: Copy" entry is created in "Edit" menu.
Nothing happens when I click on it (because no file was copied, all of them was skipped, so there is no copy to undo).

Watch the new attached screen recording please.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.0
Comment 7 postix 2020-11-08 11:18:48 UTC
Can confirm it on

Operating System: Manjaro Linux
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 8 postix 2020-11-08 11:20:15 UTC
Sorry, didn't see that you are testing/reviewing changes on the master branch. I guess I could confirm it there as well. ;)