Refactor presto/records_on_the_day.py into a unified app with a splash screen, search capability, and the existing calendar. All work is in the single MicroPython file.
New states
STATE_HOME (new, default on boot/wake)
STATE_SEARCH_INPUT (new — search box + on-screen keyboard)
STATE_SEARCH_RESULTS (new — results list, reuses day-view rendering)
fetch_search_results() — New API client calling GET /api/v1/collection?q=<encoded>&limit=20. Returns (records_list, error_flag). Depends on ML-176.1 for the backend q parameter.
Splash screen (STATE_HOME) — draw_home_screen() with two large buttons: "Search Collection" and "Today's Records".
On-screen keyboard (STATE_SEARCH_INPUT) — draw_search_input() with 3-row QWERTY + numbers keyboard. Hit-test via _keyboard_hit_test(). Touch handler handle_search_input_touch(). Visual key-press feedback. OK button dimmed when query empty.
Search results (STATE_SEARCH_RESULTS) — Reuses _draw_record_row(). Own scroll state (search_scroll_offset, _search_content_height). prepare_records_for_display(recs=None) made generic to support both records and search_results. Empty/error states.
Navigation tracking — previous_state tracks whether detail was entered from day or search. Back from detail returns to correct origin.
Back-to-Home — Home button added to month header. wake_display() sets state = STATE_HOME. redraw_current_view() updated for new states.
Boot flow — Starts at STATE_HOME, no auto-fetch. User taps "Today's Records" → month view.
Main loop dispatch — Added handlers for all new states. handle_home_touch(). Search results drag-scroll mirrors day view.
Cleanup — Remove all STATE_STARTUP references.
Deploy — Verify ML-176.1 deployed → mise run presto → manual verification on device.
Key design decisions
"Today's Records" navigates to month view (with today highlighted), not directly to day — preserves calendar context
Keyboard: fixed layout, lowercase only, no shift/caps, max 50 chars
Search results: 20 per page, no infinite scroll. Own scroll state per AGENTS.md rules.
prepare_records_for_display() parameterized to accept optional list — avoids duplicating the entire display-prep pipeline