Skip to content

Add "Search Here..." to group context menu#13158

Open
AgostonSzepessy wants to merge 6 commits intokeepassxreboot:developfrom
AgostonSzepessy:feature/right-click-group-search
Open

Add "Search Here..." to group context menu#13158
AgostonSzepessy wants to merge 6 commits intokeepassxreboot:developfrom
AgostonSzepessy:feature/right-click-group-search

Conversation

@AgostonSzepessy
Copy link
Contributor

@AgostonSzepessy AgostonSzepessy commented Mar 17, 2026

When the user clicks "Search Here...", the search bar is populated with with g:<group-name>.

Screenshots

Screenshot_search-here

Testing strategy

I added a test in TestGui.cpp that tests the functionality. I also tested it manually.

Type of change

Populates search bar with `g:<group-name>`.
Copilot AI review requested due to automatic review settings March 17, 2026 02:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new group context-menu action that helps users quickly scope searches to a specific group by inserting a group-qualified term into the search bar.

Changes:

  • Add a new SearchWidget::setSearchGroupName() helper to programmatically populate/focus the search field.
  • Add actionGroupSearchHere to the group context menu and wire it to a new MainWindow::searchInGroup() slot.
  • Update English translation sources for the new UI strings.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/gui/SearchWidget.h Exposes a new API for setting group-based search text.
src/gui/SearchWidget.cpp Implements populating/focusing the search field with a group filter.
src/gui/MainWindow.ui Adds the “Search Here...” action to the group context menu.
src/gui/MainWindow.h Declares the new searchInGroup() slot.
src/gui/MainWindow.cpp Sets icon, connects the action, and implements the slot behavior.
share/translations/keepassxc_en.ts Adds translation entries for the new action text/tooltip.

Copilot AI review requested due to automatic review settings March 17, 2026 02:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Search Here…” action to the group context menu so users can quickly populate the search bar with a g:<group> filter for the currently selected group (addresses #12945).

Changes:

  • Add a new group context-menu action (actionGroupSearchHere) and wire it to a new MainWindow::searchInGroup() slot.
  • Add SearchWidget::setSearchGroupName() helper to populate the search field with a quoted g:"<group-path>" query.
  • Add a GUI test that creates groups/entries and verifies the search bar is populated correctly.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/gui/TestGui.h Declares new GUI test and helper methods for group/entry setup.
tests/gui/TestGui.cpp Implements helpers plus testSearchHere() validating the new action behavior.
src/gui/SearchWidget.h Adds new public API to programmatically set the group search filter.
src/gui/SearchWidget.cpp Implements query construction and focus behavior for “Search Here…”.
src/gui/MainWindow.ui Adds the new QAction to the Groups menu/context menu.
src/gui/MainWindow.h Declares the new searchInGroup() slot.
src/gui/MainWindow.cpp Wires the new action, enables it, and populates the search widget using the current group path.
share/translations/keepassxc_en.ts Adds new translatable strings for the action text/tooltip.

@droidmonkey
Copy link
Member

Oh I love this

@droidmonkey droidmonkey added feature: Search pr: new feature Pull request adds a new feature labels Mar 17, 2026
@droidmonkey droidmonkey added this to the v2.8.0 milestone Mar 17, 2026
@droidmonkey droidmonkey self-requested a review March 17, 2026 04:34
Copilot AI review requested due to automatic review settings March 18, 2026 00:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “Search Here…” group menu action to quickly populate the search bar with a group-scoped query, and introduces a GUI test to validate the behavior.

Changes:

  • Add actionGroupSearchHere to the Groups menu and wire it to a new MainWindow::searchInGroup() slot.
  • Extend SearchWidget with setSearchGroupName() to set a quoted g:"<group path>" query and focus the search field.
  • Expand GUI test data helpers and add a new GUI test that triggers the action and verifies the search text.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/gui/TestGui.h Declares new GUI test and helper functions for groups/entries.
tests/gui/TestGui.cpp Adds group/entry creation helpers, extends canned data, and adds testSearchHere().
src/gui/SearchWidget.h Exposes setSearchGroupName() for MainWindow-driven search presetting.
src/gui/SearchWidget.cpp Implements group query construction and focuses the search edit.
src/gui/MainWindow.ui Adds the new Groups menu action and tooltip text.
src/gui/MainWindow.h Declares searchInGroup() slot.
src/gui/MainWindow.cpp Connects the action, updates enabled state, and sets search text from current group.
share/translations/keepassxc_en.ts Adds new translatable strings for the action text/tooltip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: Search pr: new feature Pull request adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Right-click a group > Search here

3 participants