Skip to content

Add AppControl hooks for tag creation and pinning#3991

Merged
guiyanakuang merged 3 commits intomainfrom
refactor/tag-app-control-hooks
Mar 6, 2026
Merged

Add AppControl hooks for tag creation and pinning#3991
guiyanakuang merged 3 commits intomainfrom
refactor/tag-app-control-hooks

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

Close #3990

Summary

  • Add isCreateTagEnabled() and isPinTagEnabled() to AppControl interface for mobile platform gating
  • Desktop implementation allows all operations (true)
  • Guard tag creation (SearchTagsView) and tag pin/unpin (DesktopPasteMenuService) with the new hooks

Test plan

  • Verify tag creation still works on desktop
  • Verify tag pin/unpin still works on desktop
  • Verify build compiles successfully

Replace the redundant favorite boolean field with tag-based protection.
Items are now protected from cleanup by tagging them (e.g., with a
"Favorite" tag) instead of using a separate favorite flag.

- Add SQLDelight migration (2.sqm) to create "Favorite" tag and migrate
  existing favorites
- Add schema versioning to DesktopDriverFactory via PRAGMA user_version
- Add getVersion/setVersion to HikariSqliteDriver
- Update cleanup queries to use tag-based exclusion instead of favorite
- Remove setFavorite/isFavoriteEnabled, rename to tag-based methods
- Replace favorite toggle with tag pin/unpin in UI
- Remove favorite filter from search, use tag filter instead
- Update storage statistics and export to use tagged/untagged terminology
- Delete FavCommand, replace --favorite with --tag in HistoryCommand
- Update i18n strings across all languages
- Update tests for new tag-based APIs

Closes #3988
@guiyanakuang guiyanakuang merged commit edb4c91 into main Mar 6, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the refactor/tag-app-control-hooks branch March 6, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AppControl hooks for tag creation and pinning

1 participant