Skip to content

Add a brief notes section to the day entry screen#5

Draft
ghackett wants to merge 4 commits into
mainfrom
day-entry-notes
Draft

Add a brief notes section to the day entry screen#5
ghackett wants to merge 4 commits into
mainfrom
day-entry-notes

Conversation

@ghackett

@ghackett ghackett commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an optional Notes section to the day entry screen: a 3-line OutlinedTextField below the pill selection.
  • Persists notes in a new nullable notes TEXT column on headache_entries (db version 3 → 4, with MIGRATION_3_4).
  • Notes round-trip through JSON export/import (HeadacheBackupEntry.notes, optional with a null default so older backup files still import).
  • Notes are trimmed on save; whitespace-only input is stored as NULL.
  • Fixes a focus grab found during on-device verification: the notes field was the only touch-mode-focusable element on the screen, so it was handed initial focus whenever the day entry pane opened — scrolling past the severity selector and popping the keyboard. The severity and pill rows now accept focus in touch mode (focusProperties { canFocus = true }), so initial focus lands harmlessly on the first row instead, and the notes field stays reachable by hardware-keyboard tab navigation.
  • Fixes the keyboard hiding the Cancel/Save bar while editing notes: the edge-to-edge window let the IME overlay the Scaffold with no way to scroll to the buttons. The day entry Scaffold now applies imePadding(), and the activity sets android:windowSoftInputMode="adjustResize" so the window resizes instead of panning.

Testing

  • :app:testDebugUnitTest passes, including new EditViewModelTest cases for loading, trimming, and blank-notes-to-null behavior.
  • Verified end-to-end on the verify36 emulator: entry opens at the top with no keyboard, notes are typed via the on-screen keyboard only after tapping the field, Cancel/Save stay visible above the open keyboard, save persists the note (db round-trip confirmed by reopening the day), the calendar recolors as before, and TAB traversal walks every selector row and into the notes field.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RKEvj3ttnWkJSs4UHnf37z

ghackett and others added 3 commits July 13, 2026 22:11
A 3-line text box below the pill selection lets you attach optional
free-form notes to a day's entry. Notes persist in a new nullable TEXT
column (db v4), round-trip through export/import backups, and are
trimmed on save (blank -> null).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKEvj3ttnWkJSs4UHnf37z
Opening a day was auto-focusing the new notes field (the only
touch-mode-focusable thing on the screen), scrolling past the severity
selector and popping the keyboard. Gate the field's canFocus on an
actual press so focus only lands when the user taps it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKEvj3ttnWkJSs4UHnf37z
Instead of gating the notes field's focusability on a press, let the
severity and pill rows accept focus in touch mode. The pane's initial
focus then lands on the first row (harmless) rather than the notes
field, and the notes field stays reachable by hardware-keyboard tab
navigation at all times.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKEvj3ttnWkJSs4UHnf37z
The edge-to-edge window let the IME overlay the Scaffold, hiding the
bottom bar with no way to scroll to it while editing notes. Apply
imePadding to the Scaffold (and set adjustResize on the activity so
the window resizes instead of panning).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKEvj3ttnWkJSs4UHnf37z
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.

1 participant