Memos: add tag-alarms, a one-morning alarm armed by tapping an NFC tag - #130
Merged
Conversation
A tag-alarm is a third kind of memo for mornings with no fixed pattern: a dormant alarm with a linked NFC tag, a first ring and optional follow-ups later the same day. A tap on the tag (or Set for next in the sheet) arms the next time the first ring comes round, today or tomorrow, weekday ignored; the morning plays out through remindAt and the alarm goes dormant again after its last ring. A tap never removes a ring, so tapping repeatedly is idempotent. - data/model/TagAlarm.kt holds every rule as pure functions; Reminder.kt's needsScheduling / isDone / afterRing / afterDone / withScheduleAligned branch on it, so the existing alarm, boot and snooze paths need no new alarm code (LESSONS.md #57). - tagalarm/TagAlarmService is the one place arming and turning off happen, and reports other tag-alarms set for the same morning so the caller can ask "Turn it off?" (TagAlarmConflictDialog). - MainActivity resolves a scanned tag against tag-alarms first, on-device, before the chore path, and shows a toast with the alarm's first ring. The sheet links a tag by scanning (a capture request plumbed through the nav graph) and refuses ids a chore or another tag-alarm owns; the chore sheet refuses a tag-alarm's id in return. - The sheet gains the Tag-alarm switch, a Follow-ups row, a Tag row and Set for next / Turn off links; the card says "off" while dormant; a swipe turns it off; the ring screen offers Stop for today while follow-ups are pending. - Unit tests pin the arming table, idempotence, the follow-up sequence, the dormant state, conflicts and the wording. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
mapgie
marked this pull request as ready for review
September 11, 2026 08:24
… on the page ground The Memos list gained a permission banner on main (#129) in the same rows the tag-alarm capture plumbing touched; both are kept. The sub-screen header is a Scaffold top bar the scroll column slides under, so it now carries the page background instead of letting rows show through it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
… dump supabase-kt's REST exception message carries the Postgres error on its first line and then the URL, every header (apikey and bearer included) and the HTTP method. The list screens and snackbars showed all of it. A userFacingMessage() helper keeps the first line; every view model error now goes through it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
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 tag-alarm is a third kind of memo, for mornings with no fixed pattern: a dormant alarm with a linked NFC tag, a first ring and optional follow-ups later the same day (Office A: 5:15, 5:30, 5:45).
How
data/model/TagAlarm.kt: every rule as pure functions.Reminder.kt'sneedsScheduling/isDone/afterRing/afterDone/withScheduleAlignedbranch onisTagAlarm, so the alarm scheduler,AlarmReceiver,BootWorkerand the snooze paths need no new alarm code. The morning advances throughremindAtunder a single alarm identity (LESSONS.md Visual refresh: typography hierarchy, 8pt spacing, and component polish #57).tagalarm/TagAlarmService: the one place arming and turning off happen; reports same-morning conflicts for the dialog.MainActivityresolves a scanned tag against tag-alarms first, on-device, before the chore path. A capture request for the sheet's "scan a tag" flow is plumbed throughDashNavGraph.AddReminderSheet: Tag-alarm switch, Follow-ups row, Tag row, Set for next / Turn off links, "Off · tap the tag to set" banner. Card badge reads "off" while dormant; a dormant alarm sorts last and never shows as Next Up.Tests
TagAlarmModelTestpins the arming table (Tue 22:00 rings Wed, Tue 05:00 rings Tue, Sat 22:00 rings Sun), idempotence, the follow-up sequence, the snoozed re-ring, the dormant state, editing an armed alarm, conflicts and the toast/dialog wording.ReminderUiStateTestandReminderDraftTestgain the list-state and draft cases.Changelog
changelog/unreleased/tag-alarms.json, minor bump.🤖 Generated with Claude Code
https://claude.ai/code/session_016rWgRBgBaGjrH7iWGmUeSv
Generated by Claude Code