The quiz¶
A few multiple-choice questions about the senior's own life, drawn from their memory bank. The first ones are Thomas's (senior 3): 40 questions written on October 27, 2026 from his Foursquare and Swarm check-ins, 2010 to 2026, and 100 more that evening, each with one of his photos, and 200 more on October 28, 185 of them with a photo. After each answer a thumbs up marks the memory so the family looks for a photo of it.
It reaches a phone in the build after Build 49. A Worker deploy brings the questions and the answer routes; Build 49 ignores both.
On the phone¶
- The way in is hidden. For a person whose bank holds at least one quiz
question, tapping the start screen's avatar opens the quiz. Nothing on
screen says so, and the start screen looks the same as before. A screen
reader hears the avatar as a button named Quiz, so the door is hidden
only from sight. Everyone else's avatar is a picture, as before
(
src/features/memories/memories-screen.tsx). - It keeps going as long as the senior likes (Thomas, October 28,
2026; Build 52 asked five at a time and offered Start again). There is no
Finish: Next question always follows an answer. The questions this phone
has never answered come first, then the ones answered longest ago
(
pickQuizSession,src/features/quiz/pool.ts), so a question just answered does not come back until the rest have had their turn. Among the never answered, those added to the bank on the latest day (UTC, from the Worker'screatedAt) lead, each day's in a random order, so what a Loved One just added is asked next (Thomas, November 2, 2026; before, all of them were shuffled together). Run through, the whole bank is drawn again in that order (endlesson the Stories screen). - Once every question has been answered at least once, leaving the last
one this phone had never answered opens a page over the next question
(
src/features/quiz/all-answered-page.tsx): You've answered every question, "You've answered all the questions at least once. Keep going to answer them again, starting with the ones from longest ago.", and Keep going, which (as Back does) goes on to the next question. It shows once a round: again only when new questions reach the bank and are all answered too, and never in a visit that started with all of them answered. - It plays on the Stories screen (
src/features/stories/stories-screen.tsx) in the Pane, with Back and Home: two taps to answer, as in every quiz here, and "That's right!" or "That one was ... Nicely tried." The Speak dock is left out, so a photo, the question, and four answers fit on an iPhone SE at Extra large (tests/one-screen-fit.test.ts, "Quiz"). - A question may show a photo from the bank above it ("Where was this
photo?"), as large as the room the question and answers leave. The photo
lives in the bank like any other, switched off the
phone (
on_phone = 0), so it is not also a memory of its own in Memories. - The thumbs up (
src/features/quiz/photo-wanted-toggle.tsx) shows under the feedback once a question is answered: Find a photo?, which opens a page of its own (photo-wanted-page.tsx): What photo should we find?, the question, a box for a note (up to 500 characters, and it may be left empty), and Save, which marks the memory: a filled thumb and We'll find a photo. It works as the thumbs down's page does (the keyboard comes up at once, Return saves, Back closes it unsaved), and opened again it holds the note and offers Don't look for a photo to take the mark off. Since Build 58, at Thomas's asking on November 2, 2026; before, Find a photo for this marked it in one tap, with no note. Both pages are oneQuizNotePage(quiz-note-page.tsx). - The thumbs down (
src/features/quiz/bad-question-toggle.tsx) sits under the thumbs up: Bad question?, and once marked, a filled thumb and Marked as a bad question. It opens a page of its own (bad-question-page.tsx): What's wrong with this question?, the question, a box for why (up to 500 characters, and it may be left empty), and Save. The keyboard comes up at once, and Return saves. The page is drawn over the answered question, which stays as it was; Back closes it without saving. Opened again, it holds what was typed and offers Not a bad question to take the mark off. Since Build 54.
The answers¶
Each answer is queued on the phone as it is given, and the thumbs up and the
thumbs down (with its reason) change it while it waits
(src/features/quiz/answers.ts). The queue goes to the Worker when the
senior moves past the question (Next or Finish) or leaves the quiz, so both
travel with their answer. Offline, or on a phone not yet
paired, answers wait and go next time, as app opens do
(App opens).
The Worker (POST /banks/:bankId/quiz-answers, apps/api/src/routes/quiz-answers.ts)
looks the question up in the bank and keeps its words, the choice tapped, the
right answer, and whether it was right (quiz_answers, migration 0023), and
the thumbs down with its reason (bad_question, bad_reason, migration
0024), and the thumbs up's note (photo_note, migration 0026), so the record
stands after the question is removed. Phones before Build 54 send no thumbs
down, which the Worker reads as none, and phones before Build 58 no note. A resend of an answer id is
ignored. An answer to a question the bank no longer has is dropped.
Four places show them:
- The Google Sheet, tab Quiz answers: every answer, with Answered at,
Who, Question, Chose, Right answer, Right?, Find a photo (Yes for a thumbs
up), App version, Received at, and Event id. The Worker sends it the same
way it sends app opens (
backupQuizAnswers,src/sheet-backup.ts); the Apps Script makes the tab the first time. - Find a photo on the web, a page of its own
(
apps/web/src/find-a-photo.tsx,?tab=find-photo), reached from one line on the Photos and videos page, where the photo gets added: "Find a photo (4)", shown only while there is something to find. Until November 12, 2026 the list itself sat at the top of that page. It holds the thumbs-up answers not yet found, newest first, each with Found a photo, which takes it off the list (PATCH /banks/:bankId/quiz-answers/:id); a line over the list counts them, and takes focus when one goes. A note the senior typed shows under the answer ("Thomas's note: ..."); the sheet's Quiz answers tab leaves it out, since its Apps Script never changes an existing tab's header. Each item says when and where its memory happened, when the question knows (When and where), with links to look for it in Google Photos (Looking for the photo). - The Google Sheet, tab Questions to fix: each thumbs down, with
Answered at, Who, Question, Chose, Right answer, Why, App version,
Received at, and Event id (
backupBadQuestions). It is a tab of its own because the Apps Script never changes an existing tab's header and reads each row's id from its last column, so new columns on Quiz answers would break it. - Questions to fix on the web, at the top of the Quiz page
(
apps/web/src/questions-to-fix.tsx), closed under a button that says how many there are, "Questions to fix (2)" (open, as a list, until November 12, 2026): the thumbs-down answers not yet fixed, newest first, each with the reason (or "No reason given"). Someone who manages the bank presses Fixed, or Remove the question, which removes it from the bank as Remove does below; either takes it off the list. A question cannot be reworded in place yet: remove it and add it again.
When and where¶
Each question may say when and where its memory happened, so the family can look for a photo of it (Find a photo, below). The Sheet's tabs leave them out.
- When: one day, or a from-to range, as dates (
when_from,when_to), and for a range, the days within it that count, such as each check-in (visit_dates, a JSON list, at most 1,000). Where: a name, and its coordinates when known (place_name,place_lat,place_lng). Migration 0025; the checks areparseMemoryWhenandparseMemoryPlaceinpackages/shared/src/memory-when.ts. - Each answer copies them from its question when it arrives, as it
copies the words. PATCH /banks/:bankId/questions/:id (manage access)
sets a when or a place, or clears one with
null; its answers get the change too, so a memory already on Find a photo gains it. - On the web, the Quiz page's Add a question form, which Add a question opens, has under More details, with the source quote, When it happened (From, and To for more than one day, as date pickers) and Where it happened (a name, as typed into a photo search), both optional. A question shows them under its answers. The form sets no visit days or coordinates; the script below does.
Filling Thomas's 40¶
pnpm quiz:when-where (apps/api/scripts/quiz-when-where.ts, a one-off)
reads every checkins<n>.json in the export and finds each question's
check-ins (src/quiz-when-where.ts): those at a venue named like the right
answer, or at an event whose name holds it ("Hamilton (NY)" for Hamilton),
within the month or years the prompt names, leaving out the private ones.
A venue's local name in brackets is ignored ("Barceloneta Beach (Platja de
la Barceloneta)"). One day makes a when of that day; more make a range with
each visit day. The place is the venue, at the middle of its check-ins'
coordinates.
Where the answer is not a venue (a city for a photo, a city for a note), a
hints file says which venue and day: a JSON list of { "prompt" or "id",
"venue", "day", "place" }. Thomas's is inputs/find-a-photo/when-where-hints.json,
which git ignores, drawn from the check-in each question was written from. A
question that already has a when or place is left as it is, unless
--overwrite. It needs migration 0025 and the Worker deploy first.
cd ~/Documents/GitHub/SilverApp && pnpm quiz:when-where "$HOME/Library/CloudStorage/GoogleDrive-thomas@equalentry.com/Shared drives/Silver Wellness App/Assets/3/4sq" --hints inputs/find-a-photo/when-where-hints.json --dry-run
Without --dry-run, add --yes to write to production. On October 27,
2026 it matched all 40 against a local copy of the bank.
Looking for the photo¶
What the platforms allow (checked October 27, 2026): since March 31, 2025 the Google Photos Library API only searches photos an app made itself, and the Picker API has no date or place filter, only a count. Google Photos' own search does understand dates and places. Apple has no web API for iCloud Photos; only an app on the device or a tool on the Mac can read it.
Google Photos, from the web¶
Each Find a photo item has Look in Google Photos for the memory: links
that open Google Photos' own search, each in a new tab
(apps/web/src/google-photos.ts):
- One day: the day ("March 19, 2015"), then its month, in case the photo was taken around it.
- A range with visit days: one link per day, newest first. Five show; Show more adds twenty at a time.
- A range without: the place and each year ("Okinawa 2020"), or each year alone without a place.
- A place and no when: the place.
The address is https://photos.google.com/search/<words>. On November 1,
2026 Thomas opened a day's link on his iPhone: it went to the Google Photos
app, titled with the date, with Best match and Recent sections, and the photos
of the memory were there. In a desktop browser the same address opens the
search with the words in its box, but a search of several days joined by "or"
answers No results, so each day needs its own search. A single day's results
have not been seen on a desktop yet; if they do not appear, change
googlePhotosSearch.
Later, perhaps: the Picker API, to bring the photos chosen there straight into the bank.
Apple Photos, on the Mac¶
pnpm photos:find (find-a-photo/, a uv project like e2e/, using
osxphotos) reads the open Find a
photo list of every bank the account can see, signed in as pnpm backup is
(backup.env), and copies the photos that may show each memory from the
Photos library on this Mac into inputs/find-a-photo/<memory>/, with an
about.txt saying which memory it is. It only reads the server.
- One day: photos from that day within 500 m of the place.
- A range with visit days: photos from each visit day within 500 m.
- A range without: photos from anywhere in the range within 300 m.
- No coordinates: every photo from the day or the visit days; a range without visit days is skipped.
The nearest come first, 40 at most (--limit). When a day has photos that
are only farther away, it says so; --radius widens both distances, for a
view taken from across a valley (Mürren's photos on December 29, 2025 were
4.2 km from the check-in). A photo whose original is only in iCloud is
skipped unless --download. Run again, it skips files it already copied.
The Terminal needs Full Disk Access to read the library. Then look through
the folder, add the right photo on the web, and press Found a photo.
cd ~/Documents/GitHub/SilverApp && pnpm photos:find --dry-run
cd ~/Documents/GitHub/SilverApp && pnpm photos:find --bank bank-thomas
On October 27, 2026 the library on Thomas's Mac held 5,712 photos and videos, 4,533 of them from 2026 and few before 2018, so most of his Foursquare memories find nothing there yet. On November 2 it held 6,032, and of the 33 open memories only one (Kyoto, October 2021) had a photo from its day and place.
Google Photos, by Takeout¶
Older photos are in Google Photos, and a Takeout of them carries what Apple
Photos does: beside each photo a JSON file with when it was taken
(photoTakenTime, in UTC) and where (geoData). So pnpm photos:find
reads Takeouts too:
- At https://takeout.google.com, Deselect all, check Google Photos, open All photo albums included, and keep only the years wanted ("Photos from 2015").
- Export once, as .zip. Google emails a link, sometimes hours later.
- Put the zips, as they are, in
inputs/find-a-photo/google/(git ignores it), and runpnpm photos:findas above. It reads that folder on its own;--takeout <zip or folder>reads another, and--no-appleskips Apple Photos.
The zips are not unpacked: only the photos a memory needs come out of them. Since the time is in UTC, a photo with a place is moved to its own time zone by its longitude (15 degrees to the hour), close enough to put an evening photo on its day; one without a place keeps the UTC day.
What the first one taught (November 2, 2026, 2015 alone, four zips of about
1.5 GB): a photo and its JSON are often in different parts, so the parts in
the folder are read together; a duplicate's JSON is named
IMG_0911.JPG.supplemental-metadata(1).json for IMG_0911(1).JPG; and
about three photos in four had no JSON in any part. Those are read from
their own EXIF (Pillow), which gives the camera's local day and, for most,
the place; HEIC, PNG, and videos without a JSON are left out. That made 1,346
of 1,834 readable, and found the Hamilton stage and curtain call, the
Momofuku Ko dessert, and the view from One World Observatory. Sufjan Stevens
(May 1) had no photos.
Thomas's Foursquare questions¶
The export is on the shared drive, Assets/3/4sq: 15,884 check-ins at 7,703
places, 1,389 with a note he typed, 192 events (films, shows, concerts), and
2,363 of his photos in pix/. It is personal: never commit it, or the
questions drawn from it, to this repo.
Four kinds, ten of each, chosen with Thomas:
| Kind | From | Example |
|---|---|---|
| Where were you? | A check-in's note and date | March 2015, "Luckiest peach in the world." Where? Momofuku Ko |
| What did you see? | Events | April 2024, two nights at The Town Hall. Who played? The Magnetic Fields |
| Where was this photo? | His photos, tied to their check-ins | November 2018. Which museum is this crowd in? The Louvre |
| Your regular spots | Most check-ins in a city and years | In Tokyo, which studio did you ride at most? FEELCYCLE Omotesando |
The rules they follow:
- The answer is as specific as it is memorable: the place when it is well known or he went often (Momofuku Ko), the city or trip when the place is obscure (Okinawa rather than a beach's name).
- Four answers to every question: the right one and three wrong ones, never fewer (Thomas, October 27, 2026, after the first play-through on three). Four fit on an iPhone SE at Extra large with the photo. The web's form still allows one to three wrong answers for other banks.
- Wrong answers are of the same kind: a band against bands, a film against films, a spin studio against spin studios, and for a place, others he went to in the same city in those years.
- A landmark answer says its city when the question does not and the answers are in more than one city: "St. Isaac's, St Petersburg" against "Helsinki Cathedral" (Thomas, October 29, 2026; see The thumbs down of October 29). "St Petersburg" goes without its period so the longest names fit 26 characters.
- Names as written: other people's names may appear, as in his notes.
- Left out: the 160 check-ins he marked private; airports, stations, hotels, and Starbucks as answers, and questions built on them (the Finnair question, from a check-in at the St. Petersburg airport, first asked "Which city?", which Helsinki answers as well; it now asks "Flying from?"); notes that give nothing to go on ("Work work work").
- Within the screen's budgets: a prompt fits 59 characters, an answer 26 (The one-screen rule).
They are one question set, Foursquare (October 2026), so the whole batch can be found on the web's Quiz page and removed together.
The 100 photo questions¶
Thomas asked for 100 more on October 27, 2026, photos first, so all 100 show
one of his photos above the question (which bridge, which museum, which
island), in a second set, Foursquare photos (October 2026). Each photo is one of his in pix/, joined to its check-in by the
photo's relatedItemUrl; the check-in gives the venue, the day (its
createdAt moved by timeZoneOffset), and the coordinates. The export names
no city, so places were grouped by their coordinates.
They follow the rules above, and a few more:
- One photo per place, at a place a photo can show: a landmark, museum, park, or view, not a restaurant table or a gym.
- Nothing in the frame gives the answer away: no Playbill, marquee, or sign naming the show or place.
- No repeat of the first 40: no photo from the same day as one of their 10 photos, and no show or concert they already ask about.
- Each carries its when and where (the check-in's day, venue, and
coordinates), so a thumbs up reaches Find a photo ready to search, and each
photo stays off Memories (
on_phone = 0), titledQuiz: <answer>, with a description for the screen reader.
They were written straight into D1 and R2, as the first 40 were; the questions, like the export, stay out of this repo.
The 200 more¶
Thomas asked for 200 more on October 28, 2026, pictures first, taking in the thumbs down so far. There was one: the Borough Market photo, "You can see that text in the image" (the market's name is on its umbrellas three times). That question was removed and its thumbs down marked fixed, as Remove the question on the web does. The 100 had been checked on contact sheets of small tiles, where the sign could not be read; at phone size it could.
They are a third set, Foursquare, 200 more (October 2026): 185 with one of his photos, and 15 without, about shows and films he checked in to, the kind the first 40 asked that most often got a thumbs up ("Waited 20 years for this!", a movie with Dad). They follow the rules above, and:
- Every photo is read at phone size or larger before it goes in, for any sign, banner, menu, or lantern that names the answer, in any language. That check took out four more (a museum's welcome panel, a market's own sign, a festival banner naming the square, a concert hall's banners) and changed a fifth to ask something the sign does not answer (why Kaminarimon was so crowded: the New Year's visit).
- No place, photo, or right answer from the first 140 again. Where a place's city was already an answer (Jeju, Milan, Yokohama), the question asks for the place itself.
- Hotels stay out as answers, so the Moana Surfrider's banyan asks what kind of tree it is.
They were written straight into D1 and R2, as before.
Three from Google Photos, 2015¶
On November 2, 2026, the first Takeout (Google Photos, by Takeout) gave three photos for a set of their own, Google Photos 2015 (November 2026), written into D1 and R2 as before: the Hamilton stage from the balcony (which show), the butter course at Momofuku Ko (which restaurant), and the view straight down from One World Observatory (where from). Their wrong answers are shows and places from his own 2015 check-ins. A curtain call and a harbor view were left out: one photo per place, and each would have answered another.
The thumbs down of October 29¶
Thomas gave three on Build 55 (1.316.0), October 29, 2026:
- "Which cathedral's columns are these?" (St. Isaac's): he chose Helsinki Cathedral, where he had checked in on the same trip. "I want for questions that name specific monuments if it doesn't say should same name of city it was in in the response." Thomas chose the city in each answer over the city in the question, which would also have given away the Finnair question ("Flying from?" St. Petersburg). It went into 32 questions whose answers were in more than one city and did not already name it (Milan Cathedral, Tokyo Tower), as answer labels only, so each answer kept its id and the right one stayed right. Left as they were: questions whose answers are all in one city, and the Neuschwanstein castles, which are in no city.
- "August 2016, a silent film at United Palace. Which?": "I don't think I saw that thought it was singing in the rain." Both are in the export: the August 20 check-in is tied to Steamboat Bill, Jr., and an April 24 check-in says "Watching Singing in the Rain." The question now asks the one he remembers, "April 2016 at United Palace. Which film did you watch?", against other film musicals, with its when moved to April 24.
- "Which Paris square's statue is this?": "We need to have a way to see more of the image can we make tap the image to see full screen view." Not a fault in the question; it is in the Backlog and stays on Questions to fix until that is built.
The first two were marked fixed, as Fixed on the web does.