Skip to content

NFC tags: sticker filter, Erase, and rename writes the sticker - #135

Merged
mapgie merged 3 commits into
mainfrom
claude/nfc-alarm-scheduling-0m9cre
Sep 12, 2026
Merged

NFC tags: sticker filter, Erase, and rename writes the sticker#135
mapgie merged 3 commits into
mainfrom
claude/nfc-alarm-scheduling-0m9cre

Conversation

@mapgie

@mapgie mapgie commented Sep 11, 2026

Copy link
Copy Markdown
Owner

What

Three related changes to NFC tag maintenance, one per commit.

1. Split chores by whether they are on a sticker. Settings > NFC tags gains a chip row over the Chores list: All · N, On a sticker · N, No sticker · N. Rows that are on a sticker say so in their subtitle. Every chore has a tag id in Supabase whether or not a sticker exists, so the only evidence the app has is its own: it wrote the id to a sticker, or it read the id off one. A sticker made elsewhere counts as soon as it is tapped once.

2. Erase a sticker. Erase beside Scan on the Identify card. Behind a confirm, the next tag held to the phone has its NDEF message replaced with an empty record, so a read finds nothing and it can be written for something else. The chore or tag-alarm it pointed at is untouched. The id it carried is read first and dropped from the sticker record. A never-formatted tag counts as already blank.

3. A renamed tag is written to its sticker on Save. Renaming changed what the memo answered to while the sticker kept the old name, so a tap matched nothing. Save on a renamed tag now reads "Save and write tag" and goes straight into the write dialog, with a note naming the old and new ids; the rename dialog warns up front.

How

  • TagStickerStore (DataStore, on-device, never synced) maps tag id to the last time this phone met it on a sticker; MainActivity records every successful write and every id read off a tag, and forgets an erased one.
  • NfcWriteRequest.Kind.ERASE, NfcHandler.eraseTag / currentTagId; WriteTagDialog gains erasing and note.
  • TagsUiState gains stickers, choreFilter, filteredChoreTags and per-chip counts; tests in TagsUiStateTest pin the split and counts.

Changelog

tags-sticker-filter.json and erase-tag.json (minor), rename-rewrites-tag.json (patch).

🤖 Generated with Claude Code

https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv

Every chore has a tag id in Supabase whether or not a sticker exists, so
the only evidence the app has is its own: TagStickerStore records, on this
phone, every id it writes to a sticker and every id it reads off one (a
chore tap, a tag-alarm tap, a scan to link or identify). Settings > NFC
tags gains an All / On a sticker / No sticker chip row over the chores,
with counts, and marks rows that are on a sticker. A sticker made elsewhere
counts once it is tapped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
Settings > NFC tags gains Erase beside Scan on the Identify card. Behind a
confirm, the next tag held to the phone has its NDEF message replaced with
an empty record, so a read finds nothing and the sticker is ready for a
new write; a never-formatted tag counts as already blank. The id it carried
is read first and dropped from this phone's sticker record, and the write
dialog says "Erase tag" / "Tag erased" for the run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
Renaming changed what the memo answered to while the sticker kept the old
name, so a tap matched nothing. Save on a renamed tag now reads "Save and
write tag" and goes straight into the write dialog, with a note naming the
old and new ids; the rename dialog warns up front. The write dialog gains
an optional note line for that.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
@mapgie mapgie changed the title NFC tags: split chores by whether they are on a sticker NFC tags: sticker filter, Erase, and rename writes the sticker Sep 12, 2026
@mapgie
mapgie marked this pull request as ready for review September 12, 2026 00:24
@mapgie
mapgie merged commit aafd47e into main Sep 12, 2026
6 checks passed
@mapgie
mapgie deleted the claude/nfc-alarm-scheduling-0m9cre branch September 12, 2026 00:24
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