Skip to content

Settings › Tags maintenance + robust NFC memo deep links - #134

Closed
mapgie wants to merge 2 commits into
mainfrom
claude/task-app-ui-improvements-6v6en0
Closed

Settings › Tags maintenance + robust NFC memo deep links#134
mapgie wants to merge 2 commits into
mainfrom
claude/task-app-ui-improvements-6v6en0

Conversation

@mapgie

@mapgie mapgie commented Sep 11, 2026

Copy link
Copy Markdown
Owner

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 string chordash://memo?memo=<uuid> instead of the memo. That's the bug behind a memo named after its own link.

  • New pure parser parseTagPayload(raw) (nfc/TagScan.kt) that both the text and URI branches feed through. It reduces any chordash://… string (case-insensitive scheme, ?memo=/?tag= query, or a path-style last segment, url-decoded) to a ScannedTag(kind, id), and treats anything else as a bare chore tag id. Kept off android.net.Uri (uses java.net.URLDecoder + string ops) so it's JVM-testable.
  • MainActivity now 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 tags table, one per chore) and Tag-alarms (memos that carry an NFC tag). Tapping a row opens an editor to:

  • Rename the chore label / memo subject.
  • Archive / unarchive the tag.
  • Release NFC tag (tag-alarms only): unlinks the physical tag so it's free to reuse, keeping the memo.

No permanent delete, matching the app's archive-not-delete model. A chore is its tag id (and scans.tag_id references 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; ReminderRepository gains renameReminder and unlinkTag.

Checks

🤖 Generated with Claude Code

https://claude.ai/code/session_01ArC3EFNefEqRZrYkm9WobY


Generated by Claude Code

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
mapgie marked this pull request as ready for review September 11, 2026 23:28
@mapgie mapgie closed this Sep 11, 2026
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.

2 participants