Skip to content

Allow creating a chore without an NFC tag - #112

Open
mapgie wants to merge 2 commits into
mainfrom
claude/chore-creation-tags-bug-r5no0s
Open

Allow creating a chore without an NFC tag#112
mapgie wants to merge 2 commits into
mainfrom
claude/chore-creation-tags-bug-r5no0s

Conversation

@mapgie

@mapgie mapgie commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the "chore creation without tags" bug: the New chore sheet disabled Save unless the NFC "Tag ID" field was filled in, forcing users to invent a fake tag ID just to create a chore that has no physical NFC tag.

  • EditChoreSheet.kt: canSave now only requires a label, not tagId.
  • ChoreListViewModel.addChore: when tagId is left blank, generates a random unique id (UUID.randomUUID(), same pattern as ReminderRepository.addReminder) before creating the chore. This is needed because tags.tag_id is NOT NULL UNIQUE in the Supabase schema — a chore is stored as a row in the tags table, so simply relaxing the UI check would fail at insert time for a blank/duplicate tag_id.
  • Added a LESSONS.md entry documenting the schema constraint so a future "just remove this required-field check" doesn't hit the same DB-layer failure.
  • Added a changelog fragment (patch, backward-compatible bug fix).

Test plan

  • Open the chore list, tap "+", enter a name only (leave Tag ID blank), confirm Save is enabled and the chore is created.
  • Confirm creating a chore via NFC scan / with a typed Tag ID still works as before.
  • Confirm "Write tag" affordance is correctly absent for a chore created without a tag.
  • CI: unit tests, lint, changelog fragment check, a11y_check.py (run locally, no violations).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nj7xhk7ArLoNwnFNSxnmXG


Generated by Claude Code

The New chore sheet disabled Save unless the NFC Tag ID field was
filled in, even though a chore doesn't require a physical tag. Since
tags.tag_id is NOT NULL UNIQUE in the schema, blank tagIds can't just
be allowed through as-is: generate a random unique id when the field
is left blank instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nj7xhk7ArLoNwnFNSxnmXG
@mapgie
mapgie marked this pull request as ready for review September 3, 2026 17:45
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