test #14

Merged
brian merged 2 commits from test into main 2026-08-07 23:20:18 +00:00
Owner
No description provided.
The welcome screen listed only journals whose home toggle was on, so a
plain notebook — or a journal someone had switched off — had no route to it
from the first screen. Everything was in the database and none of it was on
screen. The web has never had that problem because its sidebar is always
there, so this is that list rather than a new idea: Family Memory, then
journals, then notebooks, then the account.

Journals don't expand; tapping one opens its calendar, which indexes a
journal better than a list of its pages would, and matches what the web's
sidebar does with a journal's name. Notebooks have no calendar, so they
expand to their pages. The caret is a separate target from the name because
looking inside a notebook and opening it are different intentions.

JournalScaffold decides how it appears. At 840dp and up it is simply there,
as on the web; below that it slides over and the welcome screen grows a
menu button. The writing surface opts out of both — a permanent sheet would
take a quarter of the page, and an edge swipe is indistinguishable from a
stroke, so the drawer would otherwise open under the user's hand mid-word.
Expansion state is held by MainActivity so a notebook stays open after you
visit one of its pages.

NotebookListScreen is gone: it listed the same things, and two lists of the
same thing is how they drift apart. Rename by long-press, the home toggle
and both "+ Add…" rows moved across with it.

Seven UI tests, because this is wiring — no repository test would notice
that every notebook was present and none of them were drawn. Mutation-
verified: filtering journals by showOnHome, or dropping the collapse, each
fails the test written for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The trash on each sidebar row, as on the web. Deleting is the one action in
the app that can't be undone — the pages go with it and a tombstone is
pushed, so there is nothing left to restore from on any device — so the
Delete button stays disabled until the notebook's own name has been written
out. A confirm button that is simply there gets pressed.

A default title isn't specific to anything, since every untouched notebook
shares it, so those fall back to typing "delete". An empty title would
otherwise make the phrase "", which the empty box already matches, and the
dialog would open with Delete already live. The web applies that fallback
to "Untitled notebook" only; both defaults are covered here, because the
reason for the rule doesn't distinguish between them.

Deleting what the screen is showing navigates home: its pages went too, so
staying would draw an empty screen that can't explain itself.

Also fixes an ordering bug NameDialog has carried since it was written.
Both dialogs requested focus from an effect *outside* the AlertDialog, but
an AlertDialog composes its body in a separate composition that doesn't
exist yet at that point, and requestFocus() throws "FocusRequester is not
initialized" there. It happened to survive on a device and fails outright
under test; the effect now sits inside the body with the field it targets.

Ten tests. Mutation-verified: dropping the enabled gate, or the fallback
phrase, each fails the tests written for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
brian merged commit 24f1efd7c3 into main 2026-08-07 23:20:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brian/Journal!14
No description provided.