feat: Add Tag Feature#1356
Conversation
feat: improve tag autocomplete pane UI and location
|
Nice and cool feature. The tags work beautifully. However, in my local tests, the pin shortcuts seem to be broken i.e. the pin shortcuts don't work anymore when selected, e.g. CMD+K or so. The line:
seems to be the origin of this issue. Rolling back to the original version retains the expected behavior:
Also, the previous database entries are deleted (I understand why this may be necessary). If there's a way to maintain compatibility with the existing structure, that would be great! Happy to test and share feedback on this cool feature. |
TYSM for your feedback! I committed your fix on fix: Pin shortcuts not working. I am open to further feedbacks & recommendations |
|
The fix works and I can select the pins. One trivial issue, though: This code in HistoryItem in Maccy/Models folder is unnecessary, I feel. I've commented out these lines in my local build and this feature works dandy with the CMD+t assignment. |
|
Close, but no cigar. When this PR is merged and the app used for a while, the popup panel size shrinks until only a single top-most pin is visible. I've rolled back this feature in my local compilation, but would be happy to share some screenshots the next time I try replaying the PRs in my local instance. |
|
Thanks for the feedback! I've pushed a fix for the shortcut key conflict (the unnecessary As for the panel shrinking issue, I'm currently trying to reproduce it on my end. |
|
I've fixed the database migration issue. As symptom of migration fails, history items were being cleaned. The previous destructive behaviour (drop & recreate on failure) was a shortcut I used during development to speed up iteration — not intended as a permanent solution. This update brings a proper fix:
Existing clipboard history should be preserved on upgrade now. |
|
Hi @batuyilmazer , Did some tests today, but nothing positive to report! Perhaps, the inputs @weisJ share might remediate these inconsistencies! Not a QA professional, but happy to share feedback to see this feature through to the main branch! |

This PR is a complete rewrite of the tagging feature originally proposed in #1350, implementing all feedback from @weisJ.
Implemented: all three requested features
1. Colored tag dots in the history list
Each history item displays up to 3 Finder-style colored circles (8 px, macOS system colors)
next to its title. A
+Noverflow indicator appears for items with more than 3 tags.Colors are assigned per tag name in Settings → Tags.
2. Tag button in the preview pane toolbar
A tag button (default shortcut ⌥T, configurable in Settings → General) has been added
to the toolbar alongside the existing pin and delete buttons. It opens a
TagInputViewoverlay with live autocomplete of existing tag names, keyboard navigation (↑↓), Enter to
confirm, and Escape to cancel.
3. Tag search with
#tagsyntaxTyping
#tagnamein the search bar filters items to those with that tag. Typing#aloneshows all tagged items. Tag filtering composes with all existing search modes
(exact, fuzzy, regex, mixed).
On NSTokenField vs
#tag@weisJ suggested using
NSTokenFieldfor tokenised searching. After investigation, thiswas not adopted:
TextField. WrappingNSTokenFieldviaNSViewRepresentablewould introduce an AppKit seam into an otherwise fully SwiftUIview hierarchy, adding significant coordinator complexity.
#tagfollows a convention already familiar to most users (GitHub, Slack, Notion,Bear, etc.) and is more memorable than a key–colon prefix.
tag:syntax would be parsed as plain text until the colon is typed, causingspurious search results mid-input.
#is unambiguous from the first keystroke.Search.ParsedQueryis intentionally architected to support additional token types(e.g.
type:image,date:today) in the future — the same extensibility theNSTokenField approach was meant to enable, without the AppKit dependency.
TagInputViewoverlay handles tag assignment separately from searching,which avoids overloading the search field with two responsibilities.
Open to revisiting if there is a strong preference for the native AppKit component.
Settings
Data model & migration
HistoryItemgains atags: [String]field. Existing items migrate automatically with an empty tag list. Tag colours are stored inUserDefaults.Tests
TagColorTests— all 8 color cases,Codable,Identifiable, dictionary serialization.SearchTests—#tagfilter,#(any-tag filter), tag + text composition.Related issues
Closes / addresses: #254, #176, #581, #156, #40
Screenshots