Add pinned attributes to entry preview panel - #13574
Open
eric-lemesre wants to merge 1 commit into
Open
Conversation
Allow pinning additional attributes (custom strings) so they show on the entry preview panel below the password field. Pinned attributes are stored per entry in CustomData under the KPXC_PINNED_ATTRIBUTES key as a compact JSON array, leaving the KDBX schema untouched. * Add a "Pin" checkbox next to "Protect" in the entry edit Advanced tab * Show pinned attributes on the preview General tab; protected values are masked with a reveal toggle, double click copies the value * Keep the pinned list in sync on attribute rename and removal; pinned names that no longer exist are silently ignored * Add TestEntry::testPinnedAttributes, extend TestGui::testEditEntry (pin, preview display, masking, rename and removal sync) * Document the feature in the user guide Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
eric-lemesre
marked this pull request as ready for review
August 6, 2026 19:21
Member
|
Cool, this is a good solution to the request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to pin additional attributes (custom strings) so they are displayed on the entry preview panel, below the password field.
CustomDataunder the keyKPXC_PINNED_ATTRIBUTES, as a compact JSON array of attribute names (JSON because attribute names may contain any character, including commas and quotes). The KDBX schema and the way custom strings are stored are unchanged.Design decisions we would like to flag explicitly for review:
CustomData, so a KDBX3 database will be upgraded to KDBX4 on save — the same behaviour as the browser integration settings.Note: this PR is independent of #13573 (
Entry::beginUpdate()CustomData fix), but that fix is required for the pinned state to be carried into and restored from entry history.Screenshots
Testing strategy
TestEntry::testPinnedAttributes: round-trip including names with commas/quotes/newlines/unicode, empty-name filtering, duplicate removal, empty list removing the key, malformed JSON tolerated, null-pointer safety.TestGui::testEditEntry: pin checkbox, persistence, preview panel display, masking and reveal toggle, rename sync, removal sync and section hiding.testentry,testmodified,testgroup,testkdbx2/3/4,testmerge,testcli,testbrowserand the fulltestguisuite — all passing.clang-formatclean; translation strings pushed vialupdate.Type of change
AI usage disclosure
Per the contribution guidelines: development was done with Claude Code (model: Claude Fable 5, Anthropic); an additional critical code review pass was performed with Kimi-k3. All changes were reviewed, built and tested locally by the submitter.
We would very much welcome your feedback: if there are changes you would like, or points we may have missed — naming, UX of the Pin checkbox, the design decisions above, or anything else — we will gladly rework them.
🤖 Generated with Claude Code