Skip to content

Global search should clear badges as soon as the related search term is deleted or changed #1672

Description

@jeremypw

What Happened?

After performing a global search with matches, the search term in the header bar was deleted. The badges remained but there is no longer any information as to what search they refer.

Steps to Reproduce

  • Perform a global search with matches
  • Delete the search term
  • Observe the badges remain

Expected Behavior

The badges should disappear as soon as the search term to which they relate is changed.

OS Version

8.x (Circe)

OS Architecture

amd64 (on most hardwares)

Session Type

Secure Session (Wayland)

Software Version

Latest release (I have run all updates)

Log Output

Hardware Info

No response

Activity

  1. added theissue type on Nov 10, 2025
  2. changed the title [-]Global search should clear badges as soon as a the related search term is deleted or changed[/-] [+]Global search should clear badges as soon as the related search term is deleted or changed[/+] on Nov 10, 2025
  3. kahhong commented on Sep 19, 2026

    @kahhong
    Contributor

    Hi @jeremypw , I looked at the code and thought of a naive solution to call FileView.clear_badges() whenever search_entry changes. However, this means we need to maintain a weak reference of sidebar in search_bar and I'm not sure if the coupling between the two widgets is desired.

    The alternative solution would be to add a separate dedicated search_bar for the sidebar (or FileView) for searching within the entire project (I can come up with a design for this).

    Let me know what you think!

  4. jeremypw commented on Sep 19, 2026

    @jeremypw
    CollaboratorAuthor

    @kahhong Thanks for your suggestions and interest. I think a separate searchbar for the sidebar could be confused with the "fuzzy search" facility for the sidebar that already exists as a plugin. At the moment this is only accessed with a shortcut (Alt + F) but the intention is to bring it into the main code and expose in the sidebar at some point.

    SearchBar already has a reference to MainWindow (which has a public reference to sidebar) so no new references are needed I don't think.

  5. linked a pull request that will close this issueFix stale global search result badges #1822on Sep 21, 2026
  6. moved this to Needs Review in OS 9on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions