feat(app)!: no anonymous accounts on the device (ADR 0020, D4, D25)

Every account has a way in, so the apps make no anonymous account any
more. The start screen shows whenever nobody is signed in, a first
start included, and offers SimpleLogin, a password and GitHub for those
who have it, with no start without an account. An instance out of reach
is said so, with Try again, and one offering no way to create an account
too. An anonymous account's session left from before is deleted as the
app starts (D25), falling back to signing out on the device.

What only anonymous accounts needed goes: signing in anonymously, the
signed-out mark, adding GitHub to an account and switching to a GitHub
account from the Profile tab (with its Cancel, the only one), an
anonymous device's own keys, the warning that signing out deletes the
account, and the texts about keeping progress. Settings says on which
instance the account is signed in. Learn's publishing, reports and
suggestions and its learner count no longer ask whether the person has
an identity: everyone signed in has one.

The server still offers anonymous sign-in until the next commit, so
older apps keep working until v0.20.0 raises the minimum build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-24 14:50:55 +02:00
commit 5b9df73756
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -17,12 +17,11 @@ import '../../support/pump_app.dart';
import '../../support/test_dependencies.dart';
void main() {
/// Opens the Profile tab of a person with an identity, whose profile the
/// instance answers through [profiles].
/// Opens the Profile tab of a person whose profile the instance answers
/// through [profiles].
Future<void> showProfile(
WidgetTester tester,
FakeProfileGateway profiles, {
bool identified = true,
FakeFilePicker? files,
}) async {
tester.view.physicalSize = const Size(1000, 1800);
@ -32,9 +31,9 @@ void main() {
tester,
testDependencies(
authGateway: FakeAuthGateway(
status: SignedIn(
status: const SignedIn(
authUserId: 'github-person',
isIdentified: identified,
isIdentified: true,
),
),
profileGateway: profiles,
@ -267,16 +266,6 @@ void main() {
expect(find.text('Choose picture'), findsNothing);
});
testWidgets('an anonymous person is told how to have one', (tester) async {
await showProfile(tester, FakeProfileGateway(), identified: false);
expect(
find.text('Sign in to have a public profile and publish.'),
findsOneWidget,
);
expect(find.text('Public profile'), findsNothing);
});
testWidgets('without the instance, it says so and tries again', (
tester,
) async {