Settings › Tags maintenance + robust NFC memo deep links - #134
Closed
mapgie wants to merge 2 commits into
Closed
Conversation
A memo NFC tag (chordash://memo?memo=<memoId>) written as a plain text record (as NFC Tools does) was passed through whole, so its raw URI leaked in as an id (and, for the user, as a memo name). Add a pure parseTagPayload() that reduces any chordash URI (URI record or text record) to its bare id + kind, and treats a non-URI payload as a bare chore tag id. Route a memo-kind scan by the memo's own id: a tag-alarm memo is armed, any other memo is opened. Chore tags and unmatched ids fall through to the existing path unchanged. Adds TagScanTest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ArC3EFNefEqRZrYkm9WobY
…cognises Adds a Tags screen under Settings > Personalisation that lists both chore tags (the tags table) and tag-alarm memos that carry an NFC tag. Tapping a row opens an editor to rename the tag, archive/unarchive it, or (tag-alarms only) release its NFC tag so the physical tag can be reused. No permanent delete, matching the app's archive-not-delete model: archiving a chore frees its tag, releasing a memo unlinks it. The tag list logic lives in SettingsViewModel (TagRow + loadTags/renameTag/ setTagArchived/releaseTag); ReminderRepository gains renameReminder and unlinkTag. Pairs with the NFC deep-link parser so a memo tag routes to its memo instead of leaking its chordash:// link. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ArC3EFNefEqRZrYkm9WobY
mapgie
marked this pull request as ready for review
September 11, 2026 23:28
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.
Two halves of the same request: name a memo something friendly (not its deep link), and a Settings menu that lists every tag the app recognises with maintenance actions.
NFC deep links (fix)
A
chordash://memo?memo=<id>link written to a tag isn't always an NDEF URI record; NFC Tools writes the same string as a plain text record. The old handler's TEXT branch returned the payload verbatim, so a memo tag was matched (and saved) as the literal stringchordash://memo?memo=<uuid>instead of the memo. That's the bug behind a memo named after its own link.parseTagPayload(raw)(nfc/TagScan.kt) that both the text and URI branches feed through. It reduces anychordash://…string (case-insensitive scheme,?memo=/?tag=query, or a path-style last segment, url-decoded) to aScannedTag(kind, id), and treats anything else as a bare chore tag id. Kept offandroid.net.Uri(usesjava.net.URLDecoder+ string ops) so it's JVM-testable.MainActivitynow routes a scanned MEMO to its own reminder id: arms it if it's a tag-alarm, otherwise opens the memo. Chore tags keep the existing auto-log / foreground behaviour.TagScanTest(8 cases) is the guard that a raw link never leaks through as an id or a name.Settings › Tags (feature)
A new screen under Settings › Personalisation listing every NFC tag in two groups: Chore tags (the
tagstable, one per chore) and Tag-alarms (memos that carry an NFC tag). Tapping a row opens an editor to:No permanent delete, matching the app's archive-not-delete model. A chore is its tag id (and
scans.tag_idreferences it with no cascade), so there's nothing safe to release there; archiving the chore frees the physical tag instead, and the editor says so.List logic lives in
SettingsViewModel(TagRow+loadTags/renameTag/setTagArchived/releaseTag) rather than the composable;ReminderRepositorygainsrenameReminderandunlinkTag.Checks
a11y_check.pypasses (133 files); the new rows useSettingsNavRow(alreadyRole.Button) and the editor is a standardAlertDialog.minor).LESSONS.mdfix: switch to XML font resources so Nunito/Lora render on first frame #59 records the text-vs-URI record gotcha.🤖 Generated with Claude Code
https://claude.ai/code/session_01ArC3EFNefEqRZrYkm9WobY
Generated by Claude Code