Bug 482196 - Disabling history doesn't disable memory of last-typed search
Summary: Disabling history doesn't disable memory of last-typed search
Status: CONFIRMED
Alias: None
Product: krunner
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.0.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-03-01 21:37 UTC by Andrew Brouwers
Modified: 2025-07-22 21:04 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
krunner (583.48 KB, image/png)
2024-03-01 21:37 UTC, Andrew Brouwers
Details
konsole launched, while "kons" retained in a future krunner instance (373.37 KB, image/png)
2024-03-02 17:29 UTC, Andrew Brouwers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Brouwers 2024-03-01 21:37:35 UTC
Created attachment 166275 [details]
krunner

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
I've unchecked disabled history in krunner's settings.  If I spawn krunner, start typing something, and escape (say, "fir"), it will be be present the next time I open krunner.  In the attached screenshot, the text shown was not entered in the current krunner "session," but from the time previously.

STEPS TO REPRODUCE
1. Disable history
2. Open krunner, type something, hit escape
3. Open krunner again, notice text still present

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: plasma 6.0 & Qt 6.6
Comment 1 Alexander Lohnau 2024-03-02 13:37:42 UTC
Hmm, I am not sure how to handle this. It is not any persistent history, but just your last typed query. In case a window opens and KRunner closes, you might otherwise miss your previously typed text. Though you should be able to override the text with just one keystroke.

A sensible differentiation might be the cause for closing KRunner. Like the escape key could be handled separately and clear the text when a match is run. Though I am not sure if this behavior seems consistent to the average user.
Comment 2 Andrew Brouwers 2024-03-02 17:28:54 UTC
(In reply to Alexander Lohnau from comment #1)
> Hmm, I am not sure how to handle this. It is not any persistent history, but
> just your last typed query. In case a window opens and KRunner closes, you
> might otherwise miss your previously typed text. Though you should be able
> to override the text with just one keystroke.
> 
> A sensible differentiation might be the cause for closing KRunner. Like the
> escape key could be handled separately and clear the text when a match is
> run. Though I am not sure if this behavior seems consistent to the average
> user.

I should clarify, even if I type "kons," hit "enter" once konsole is highlighted (ie, it didn't get interrupted, but rather successfully launched my searched-for app), it *still* shows in my history.  The history setting just seems broken in plasma 6.
Comment 3 Andrew Brouwers 2024-03-02 17:29:32 UTC
Created attachment 166311 [details]
konsole launched, while "kons" retained in a future krunner instance
Comment 4 Nate Graham 2024-03-05 23:12:29 UTC
Currently this behavior is intentional, but I can see how it's somewhat confusing: disabling history doesn't disable *recent* history, only long term history. Maybe we need another setting for this:

> History: ( ) Disable
>          ( ) Only last-typed search
>          ( ) Suggestions from all past searches
>          (o) Auto-complete from all past searches
Comment 5 Andrew Brouwers 2024-03-05 23:35:01 UTC
(In reply to Nate Graham from comment #4)
> Currently this behavior is intentional, but I can see how it's somewhat
> confusing: disabling history doesn't disable *recent* history, only long
> term history. Maybe we need another setting for this:
> 
> > History: ( ) Disable
> >          ( ) Only last-typed search
> >          ( ) Suggestions from all past searches
> >          (o) Auto-complete from all past searches

Yeah, I would expect disable history to start with a blank input, every time.
Comment 6 Naxdy 2024-09-03 11:13:48 UTC
(In reply to Nate Graham from comment #4)
> Currently this behavior is intentional, but I can see how it's somewhat
> confusing: disabling history doesn't disable *recent* history, only long
> term history. Maybe we need another setting for this:
> 
> > History: ( ) Disable
> >          ( ) Only last-typed search
> >          ( ) Suggestions from all past searches
> >          (o) Auto-complete from all past searches

Retaining history and retaining prior search are actually two different pieces of functionality. See the implementation of the former here: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/226

If memory serves right, there used to be a checkbox that allowed you to toggle just that specific setting. In fact, if you manually add

[General]
RetainPriorSearch=false

to your ~/.config/krunnerrc , KRunner will no longer retain your previous searches, as the author of this bug report desires. So, for me, the two takeaways are:

1. The current behavior for retaining search history is indeed intentional
2. The actual bug lies within removing the checkbox that allowed users to toggle this functionality
Comment 7 Naxdy 2024-09-03 11:14:26 UTC
Correction on my previous comment: I meant "implementation of the latter", of course...