Add confirmation dialog before executing tag#4617
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an approval step before forwarding newly encountered NFC tag scans to Home Assistant, plus supporting UI and persistence for “always allow” tag identifiers.
Changes:
- Introduces an approval bottom sheet for unapproved tags, with “Allow Once” and “Allow Always” actions.
- Persists approved tags in a new GRDB table (
allowedTags) and adds Settings UI to view/remove allowed tags. - Updates settings navigation/strings to group NFC read/write and allowed-tag management under a new “Tags” entry.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/Shared/Resources/Swiftgen/Strings.swift | Adds generated string accessors for tag approval + allowed tags UI. |
| Sources/Shared/Environment/TagManagerProtocol.swift | Adds requiresApproval(tag:type:) result for tag handling. |
| Sources/Shared/Database/Tables/AllowedTagTable.swift | New GRDB table definition + legacy UserDefaults migration. |
| Sources/Shared/Database/GRDB+Initialization.swift | Registers the new AllowedTagTable in schema setup. |
| Sources/Shared/Database/DatabaseTables.swift | Adds allowedTags table and column enum definitions. |
| Sources/Shared/Database/AllowedTag.swift | Adds persistence/query helpers for approved tags. |
| Sources/App/Settings/Settings/SettingsItem.swift | Routes Settings “NFC” entry to a new Tags hub view. |
| Sources/App/Settings/NFC/TagsView.swift | New Settings hub view linking to NFC read/write and allowed tags list. |
| Sources/App/Settings/NFC/iOSTagManager.swift | Gates tag event firing on approval and returns requiresApproval when needed. |
| Sources/App/Settings/NFC/AllowedTagsView.swift | New UI to list/delete allowed tags and clear all. |
| Sources/App/Settings/DebugView.swift | Adds a developer action to clear approved tags. |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds new strings for approval + allowed tags UI. |
| Sources/App/Frontend/TagApprovalBottomSheet.swift | New approval bottom sheet UI shown for unapproved tags. |
| Sources/App/Frontend/IncomingURLHandler.swift | Presents approval sheet when required and refactors tag read confirmation display. |
| HomeAssistant.xcodeproj/project.pbxproj | Adds new Swift files to the project build. |
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.
Summary
Before forwarding unknown tags to Home Assistant, present a confirmation dialog.
Android implementation: home-assistant/android#6814
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes