Notification settings, which Android never had #112

Merged
paulhitt merged 1 commits from feat/android-notification-settings into main 2026-09-07 01:14:44 +00:00
paulhitt commented 2026-09-07 01:06:15 +00:00 (Migrated from gitlab.com)

The parity scrub found eight preferences on iOS with no Android
counterpart. This is the notification group, and it is the one worth
doing first, because "show who it is from" is a privacy control rather
than a preference: it decides whether a name reaches a lock screen.

MessengerService had already written down what was missing, at the only
place it could —

// Count only, until there is a setting for it.

— so notifications said "New message" or "New messages in 3 chats" and
nothing else. That is still the DEFAULT. Nobody acquires a name on their
lock screen by installing an update; somebody who wants one asks.

Four switches: notify at all, new messages, show who it is from, and
sound while the app is open. Same defaults as iOS, which is the part that
must not drift — the storage differs because the platforms differ, but a
person carrying both phones should not find them behaving differently.

Several waiting threads are counted and never named, even with the
setting on. Naming one of three is arbitrary and naming all three turns a
notification into a contact list on a lock screen. A thread that cannot
be resolved to a person — a group, a cross-relay peer — falls back to the
count, because a wrong name is worse than no name.

The first version of the test was worthless and passed. It
reimplemented the rules against a fake and asserted nothing about the
code that ships — two identically-wrong ends agreeing, the same shape
that made the protocol vector tests necessary. The decision now lives in
pure functions on the companion object, taking the preference as an
argument, because a Context is not available in a JVM unit test and the
logic had to leave the class that needs one. The test calls those.

Checked by breaking it: make the text ignore the preference and exactly
one test reddens — the one asserting no name reaches the lock screen.

1179 tests, 0 failures.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

The parity scrub found eight preferences on iOS with no Android counterpart. This is the notification group, and it is the one worth doing first, because "show who it is from" is a privacy control rather than a preference: it decides whether a name reaches a lock screen. `MessengerService` had already written down what was missing, at the only place it could — // Count only, until there is a setting for it. — so notifications said "New message" or "New messages in 3 chats" and nothing else. That is still the DEFAULT. Nobody acquires a name on their lock screen by installing an update; somebody who wants one asks. Four switches: notify at all, new messages, show who it is from, and sound while the app is open. Same defaults as iOS, which is the part that must not drift — the storage differs because the platforms differ, but a person carrying both phones should not find them behaving differently. Several waiting threads are counted and never named, even with the setting on. Naming one of three is arbitrary and naming all three turns a notification into a contact list on a lock screen. A thread that cannot be resolved to a person — a group, a cross-relay peer — falls back to the count, because a wrong name is worse than no name. **The first version of the test was worthless and passed.** It reimplemented the rules against a fake and asserted nothing about the code that ships — two identically-wrong ends agreeing, the same shape that made the protocol vector tests necessary. The decision now lives in pure functions on the companion object, taking the preference as an argument, because a `Context` is not available in a JVM unit test and the logic had to leave the class that needs one. The test calls those. Checked by breaking it: make the text ignore the preference and exactly one test reddens — the one asserting no name reaches the lock screen. 1179 tests, 0 failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paulhitt commented 2026-09-07 01:06:15 +00:00 (Migrated from gitlab.com)

assigned to @paulhitt

assigned to @paulhitt
paulhitt commented 2026-09-07 01:14:44 +00:00 (Migrated from gitlab.com)

mentioned in commit 20d19e0de3

mentioned in commit 20d19e0de35f392f89d968692e5371c86d2c11af
paulhitt (Migrated from gitlab.com) merged commit 20d19e0de3 into main 2026-09-07 01:14:44 +00:00
paulhitt commented 2026-09-09 19:01:10 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
Sign in to join this conversation.