Tag-alarms: write a memo's own id to a blank NFC tag from its sheet - #132
Merged
Conversation
Linking by scanning depends on the phone reading an id the tag already carries. Writing is the other way round: the app stamps the memo's own id on the tag as chordash://memo?memo=<id>, the same way a chore writes chordash://tag?tag=<id>, and saves the memo with that id as its linked tag. Both URIs read back as a bare id through NfcHandler, so arming, the one-job check and the capture flow are unchanged; the manifest gains the memo host so a cold tap still launches the app. The write request now carries its kind, so the Chores tab only shows the write dialog for a chore write and the Memos tab only for a memo write. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
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.
What
A saved tag-alarm can now write its own id to a blank NFC tag from the Tag row ("Write this tag-alarm to a tag"), the same way a chore writes its tag. The tag carries
chordash://memo?memo=<id>; a tap on it then sets the alarm from any screen or with the app closed.Linking by scanning stays for cards that already carry an id (an office pass, say). Writing is the path for a blank bedside tag: the app mints the id, so the link never depends on what the tag happened to answer with before.
How
NfcHandlerreads a?memo=query parameter alongside?tag=, so both URIs come back as a bare id and one id space serves chores and tag-alarms.writeUriis the shared write;writeTagIddelegates to it. A newNfcWriteRequest(kind, id)names what is being written.NDEF_DISCOVEREDfilter for hostmemo, so a cold tap launches the app.MainActivityholds the typed write request;DashNavGraphhands the Chores tab only chore writes and the Memos tab only memo writes, so neither pops the other's dialog.RemindersListScreenshows the existingWriteTagDialogfor a memo write. The sheet's Tag dropdown gains the write item, which saves the memo with its own id as the linked tag, closes, and starts the write. The hint under the Tag row now names both routes.Changelog
changelog/unreleased/memo-write-tag.json, minor bump.🤖 Generated with Claude Code
https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
Generated by Claude Code