Skip to content

Conversation

@juzu-o
Copy link
Contributor

@juzu-o juzu-o commented Aug 29, 2025

Add Show Subgroup Entries feature with intelligent Group column management

This PR implements "Show subgroup entries in entry list view" setting that allows users to view entries from nested subgroups with intelligent Group column display management.

This feature brings KeePassXC closer to feature parity with the original KeePass application, which has long supported the ability to view entries from subgroups in a flattened list. This functionality is particularly valuable for users who organize their passwords in hierarchical structures but want the convenience of seeing all related entries at once without navigating through multiple subgroups or resorting to use search functionality for viewing subgroup entries.

Technical Implementation

Modified Components

  • EntryModel: Enhanced setGroup() to conditionally use entriesRecursive() instead of entries() when feature is enabled
  • EntryView: Added intelligent Group column visibility management with enhanced header menu and column toggle functionality
  • Configuration: Integrated setting persistence and automatic UI refresh on configuration changes
  • State Management: Proper tracking of user column preferences across different viewing modes

Key Changes

  • Modified EntryModel::setGroup() for conditional recursive entry fetching
  • Enhanced column visibility logic in entry view headers
  • Added configuration UI integration in General settings
  • Maintained full backward compatibility with existing search functionality

AI Disclosure

This pull request was created with the assistance of GitHub Copilot AI using the Claude Sonnet 4 model.

Features Added

Configuration Setting

  • Added GUI_ShowSubgroupEntries configuration option (default: false)
  • Integrated into the General settings tab with a user-friendly checkbox: "Show subgroup entries in entry list view"

Core Functionality

When enabled, the entry list view displays all entries from the current group and all its subgroups recursively, providing a flattened view of the hierarchical structure.

For example, with this group structure:

Root
├── Work (2 entries)
│   ├── Projects (5 entries)
│   └── Archive (3 entries)
└── Personal (1 entry)
    └── Banking (2 entries)

Selecting the "Work" group with the feature enabled shows all 10 entries (2 + 5 + 3) in a single list.

Intelligent Group Column Management

  • Auto-show: Group column automatically appears when subgroup entries is enabled, since entries from different groups are displayed together
  • User preference respect: If user manually hides the Group column while in subgroup mode, the preference is remembered
  • Smart reset: When the feature is toggled off/on, user preferences reset to allow the Group column to auto-appear again
  • Search mode compatibility: Maintains existing behavior in search mode where Group column is always available

Screenshots

vmware_Jg4ztMvnKt

vmware_G7s7mOFI74

Testing strategy

  • Manually tested that new setting enables viewing subgroups and Group column
  • Verified that disabling setting restores normal functionality and removes Group column
  • Verified that Group column can be hidden while new setting is enabled and column stays hidden unless setting is disabled and re-enabled again

Type of change

  • ✅ New feature (change that adds functionality)

Copilot AI review requested due to automatic review settings August 29, 2025 14: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

This PR implements a new "Show subgroup entries in entry list view" feature that displays entries from nested subgroups in a flattened list, similar to functionality in the original KeePass application. This provides users with the convenience of viewing all related entries without navigating through multiple subgroups.

  • Added a new configuration option GUI_ShowSubgroupEntries with UI integration in General settings
  • Enhanced EntryModel to conditionally use recursive entry fetching when the feature is enabled
  • Implemented intelligent Group column visibility management that auto-shows the column when subgroup entries are displayed while respecting user preferences

Reviewed Changes

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

Show a summary per file
File Description
src/gui/entry/EntryView.h Added config change handler and user preference tracking for Group column visibility
src/gui/entry/EntryView.cpp Implemented intelligent Group column management and config change handling
src/gui/entry/EntryModel.cpp Enhanced setGroup() to conditionally use entriesRecursive() when feature is enabled
src/gui/ApplicationSettingsWidgetGeneral.ui Added checkbox UI element for the new setting
src/gui/ApplicationSettingsWidget.cpp Integrated setting persistence in load/save settings methods
src/core/Config.h Added GUI_ShowSubgroupEntries configuration key
src/core/Config.cpp Added configuration directive with default value false
share/translations/keepassxc_en.ts Added translation entry for the new UI text

@juzu-o juzu-o force-pushed the feature-show-subgroup-entries branch from bc23373 to 1b46c1c Compare September 8, 2025 07:03
@juzu-o juzu-o requested a review from Copilot September 18, 2025 15:21
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

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

@droidmonkey droidmonkey added this to the v2.8.0 milestone Sep 20, 2025
@droidmonkey
Copy link
Member

I think we should move this to the View menu since you may want to toggle this type of view on/off. We also need to think about cleaning up the EntryView/EntryModel ... this has gone through a lot of iterations over the years and can be much cleaner.

@juzu-o
Copy link
Contributor Author

juzu-o commented Sep 20, 2025

Agree, that would be more logical place for the option.
That's where KeePass has this option (View→Show entries of Subgroups).

Copilot AI and others added 3 commits October 26, 2025 09:09
Co-authored-by: juzu-o <[email protected]>
Fix drag-and-drop entry refresh to use subgroup entries setting

Co-authored-by: juzu-o <[email protected]>

Fix EntryModel connections for subgroup entries to receive all group signals

Co-authored-by: juzu-o <[email protected]>

Fix EntryModel to handle new subgroup entries immediately when Show Subgroup Entries is enabled

Co-authored-by: juzu-o <[email protected]>

Fix EntryModel to always connect to current group when Show Subgroup Entries is enabled

Co-authored-by: juzu-o <[email protected]>

Fix memory crash by using QPointer for group references in EntryModel

Co-authored-by: juzu-o <[email protected]>

Fix compilation errors by changing QSet<QPointer<const Group>> to QList<QPointer<const Group>>

Co-authored-by: juzu-o <[email protected]>

Update src/gui/entry/EntryModel.cpp

Co-authored-by: Copilot <[email protected]>
Update src/gui/entry/EntryModel.cpp

Co-authored-by: Copilot <[email protected]>
@droidmonkey
Copy link
Member

There are a few fringe case issues with this change.

  1. When you select the option from the view menu, the currently displayed entries do not change. Only the group column is shown. When selecting the group again from the group list the entries update properly.
  2. Unsorted entries allow you to move them up/down in the list, this is an awkward thing when showing subgroup entries.

Recommend combining the view menu entry in the same partition as the "Show Group Panel" and "Show Preview Panel"

@droidmonkey droidmonkey force-pushed the feature-show-subgroup-entries branch from 8575cc6 to bbeaf94 Compare October 26, 2025 13:27
@droidmonkey droidmonkey changed the title Add Show Subgroup Entries feature Add Show Entries of Subgroups feature Oct 26, 2025
@droidmonkey droidmonkey added the pr: ai-assisted Pull request contains significant contributions by generative AI label Oct 26, 2025
@droidmonkey droidmonkey marked this pull request as draft November 2, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: ai-assisted Pull request contains significant contributions by generative AI user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants