Add a brief notes section to the day entry screen#5
Draft
ghackett wants to merge 4 commits into
Draft
Conversation
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
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.
Summary
OutlinedTextFieldbelow the pill selection.notesTEXT column onheadache_entries(db version 3 → 4, withMIGRATION_3_4).HeadacheBackupEntry.notes, optional with a null default so older backup files still import).NULL.focusProperties { canFocus = true }), so initial focus lands harmlessly on the first row instead, and the notes field stays reachable by hardware-keyboard tab navigation.imePadding(), and the activity setsandroid:windowSoftInputMode="adjustResize"so the window resizes instead of panning.Testing
:app:testDebugUnitTestpasses, including newEditViewModelTestcases for loading, trimming, and blank-notes-to-null behavior.verify36emulator: 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