fix(app): a sign-out or deletion that failed says so, its tile showing it under way

The account's tiles show a spinner on Sign out or Delete account while it
runs, start neither again meanwhile, and say once, in a snack bar, why one
failed ("Couldn't delete your account: the instance wasn't reached. Try
again."; "Couldn't sign out on this device. Try again."), in English and
German. The session gate no longer builds the person's app anew for that:
only the tiles follow it.

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-21 19:49:18 +02:00
commit f5d8a3ca1f
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -225,4 +225,36 @@ void main() {
await tester.pumpAndSettle();
expect(find.text('Signed out'), findsOneWidget);
});
testWidgets("a sign-out under way or failed leaves the person's app as it "
'is, built once', (tester) async {
gateway = FakeAuthGateway(
status: const SignedIn(authUserId: 'ada', isIdentified: true),
)..signOutError = Exception('The keyring is locked');
dependencies = TestAppDependencies(gateway: gateway);
var builds = 0;
await tester.pumpWidget(
AppFrameScope(
frame: testFrame(),
child: AppScope(
dependencies: dependencies,
child: SessionGate(
look: (context) => (themeMode: ThemeMode.light, locale: null),
app: (person) {
builds++;
return _PersonApp(person);
},
),
),
),
);
await tester.pumpAndSettle();
expect(builds, 1);
await tester.tap(find.text('Sign out'));
await tester.pumpAndSettle();
expect(find.text('App of ada'), findsOneWidget);
expect(builds, 1, reason: "busy and its problem are the account tiles'");
});
}