Skip to content

Senior preferences

A design for a feature that is not built yet. The family sets how the app behaves for one senior, on the web app, and the phone follows. Each change is recorded with when and why, so the session log and app opens can be read against it.

Why

Tom's first evening with the app (October 8, 2026) gave two changes at once: the songs were too loud, and a song does not need to play behind every memory. Today either change means a code edit and a TestFlight build. The people who see what works are the family, during a session, so they should be able to make the change themselves, from a laptop, without touching his phone.

Changing what Tom sees is also part of the research. If a change is not written down, a better week after it cannot be told apart from a good week.

The preferences

Three to start, each with a default that matches the app today, apart from the volume fix already made:

Preference Choices Default
Songs With every memory · Only songs the family chose · No songs Every memory
Song volume Soft · Medium · Full (a third, half, and all of the phone's volume) Medium
Memories a session 3 · 5 5

"Only songs the family chose" plays a song only on memories where a Loved One picked one with the web app's music search. That makes the music a choice made memory by memory, which answers "not on every memory" without a rule the app has to guess at.

More can follow the same pattern later: the font size, question or statement Memory Details (T3), whether new memories come first.

Deciding when to change a preference

The feature makes a change easy; these rules keep it meaningful. They go on the web page next to the choices:

  1. Change one thing at a time. Two changes on the same day cannot be told apart afterward.
  2. Say why. Each change asks for a short reason ("The speaker rattled at full volume"). It is kept with the change.
  3. Keep it for a week, or at least three sessions, before judging it. One evening is not a finding.
  4. Judge it from the log: sessions started, memories finished, and what he said, before and after the change.

How it works

For the Loved One (web app)

A Preferences tab for each senior, for Loved Ones with manage access:

  • The three choices, as radio buttons, each showing what it does.
  • A Why field, required when saving a change.
  • History below: every change, newest first, with who made it, when, the old and new value, and the reason.
  • A line saying when the phone will pick it up: "Tom's phone uses this the next time Memories opens."

For Tom (phone)

Nothing new to learn. The next time Memories opens, it follows the preferences: a song or no song, at the chosen volume, and the chosen number of memories. Offline, it keeps the last preferences it read. A phone not connected to the family keeps the defaults.

Records

  • Every change is a row in D1, never overwritten, so the history is complete.
  • Each change is also copied to the Google Sheet backup, on a Preference changes tab of the App Opens sheet, next to the opens, so both read on one timeline.

How to build it

It follows the pattern of memory songs and app opens.

Worker (apps/api)

  • Migration 0010_senior_preferences.sql:
  • senior_preferences (bank_id PRIMARY KEY, songs, song_volume, memories_per_session, updated_by, updated_at), the current values.
  • senior_preference_changes (id, bank_id, name, old_value, new_value, reason, changed_by, changed_at, sheet_backed_up_at), the history.
  • src/routes/preferences.ts, at /banks/:bankId/preferences:
  • GET / (any access): the current values, or the defaults when none are set, plus the history.
  • PUT / (manage): one or more new values and a reason (required, 1 to 200 characters). Writes the current row and one history row per value that changed. A value that did not change is not recorded.
  • src/sheet-backup.ts: a backupPreferenceChanges beside backupAppOpens, sending to a Preference changes tab.

Shared (packages/shared)

  • SeniorPreferences, the allowed values for each, and DEFAULT_PREFERENCES, so the Worker, web, and phone agree.

Phone (apps/mobile)

  • src/features/bank/preferences.ts: fetch, parse, and a cache under bank-preferences-v1:<senior id>, read alongside the bank in useStoryPool, as songs are.
  • Memories reads them:
  • Songs: "Only songs the family chose" keeps remoteSong and drops the bundled song (memoriesFrom already tells them apart); "No songs" drops both.
  • Volume: replaces the fixed MEMORY_SONG_VOLUME.
  • Memories a session: replaces MEMORIES_PER_SESSION in planSession.

Web (apps/web)

  • A Preferences tab in app.tsx, src/preferences-section.tsx, and getPreferences / putPreferences in api.ts.

Tests

  • Worker routes: access, validation, a history row only for real changes, a reason required.
  • Phone: each songs choice, the volume, the session length, the cache when offline.
  • Web: saving needs a reason, and the history shows the change.

Open questions

  • Should the phone's Settings show the preferences? Read-only, so someone holding the phone can see why there is no song, or not at all, to keep Settings short.
  • Can Tom change them himself? Probably not at first. The family decides and writes down why.
  • Does a preference change start a new "period" in the analysis automatically? The history makes that possible; the analysis plan (Pomodoro 2 of the October 8 working session) decides.