fix(mobile): keep sign-in recovery on the current screen

Co-authored-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
Wes
2026-10-15 18:07:46 -07:00
parent ae166127d6
commit de44b43d8e
2 changed files with 29 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'features/channels/deep_link_dispatcher.dart';
import 'features/onboarding/hosted_connect_page.dart';
import 'shared/auth/auth.dart';
import 'shared/theme/grid.dart';
import 'shared/deeplink/deep_link.dart';
import 'shared/hosted/account_identity_store.dart';
import 'shared/hosted/browser_auth.dart';
@@ -184,6 +185,30 @@ class HostedAppGate extends HookConsumerWidget {
fit: StackFit.expand,
children: [
child,
if (flow.stage == HostedFlowStage.signIn)
Positioned(
left: Grid.sm,
right: Grid.sm,
bottom: 0,
child: SafeArea(
child: Material(
color: Colors.transparent,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextButton(
onPressed: flow.retry,
child: const Text('Start login again'),
),
TextButton(
onPressed: flow.leave,
child: const Text('Leave setup'),
),
],
),
),
),
),
if (visible &&
!openingSignIn &&
(!inlineEntry ||

View File

@@ -50,8 +50,11 @@ void main() {
expect(find.byType(HostedConnectPage), findsNothing);
expect(find.text('Signing in…').hitTestable(), findsOneWidget);
expect(find.text('Enter a community link'), findsOneWidget);
await f.flow.leave();
expect(find.text('Start login again').hitTestable(), findsOneWidget);
f.expired = false;
await tester.tap(find.text('Leave setup').hitTestable());
await tester.pumpAndSettle();
expect(f.flow.stage, HostedFlowStage.idle);
await tester.pumpAndSettle();
expect(find.text('Continue with Builderlab'), findsOneWidget);
expect(find.byType(HostedConnectPage), findsNothing);