diff --git a/mobile/lib/prototype/README.md b/mobile/lib/prototype/README.md index 3987af3a26..5e0f462473 100644 --- a/mobile/lib/prototype/README.md +++ b/mobile/lib/prototype/README.md @@ -50,7 +50,7 @@ prototype's 1–64 letter/number/space/dot/hyphen/underscore contract. Both cold-start Camera links and warm external hyperlinks use the existing app-link queue. Dispatch waits for signed-in app/account and current-community hydration. Name and instructions are editable, avatar is read-only, and the -header names the destination community. A community change prevents submission. +form shows the destination community avatar without a community-name heading. A community change prevents submission. Only the default remote provider is used. No QR signing or QR-generator UI is included. Signed-out users must sign in and reopen the link; unfinished agent setup must be resumed before opening a new draft. diff --git a/mobile/lib/prototype/create_agent_sheet.dart b/mobile/lib/prototype/create_agent_sheet.dart index 468b961bba..bba778de1c 100644 --- a/mobile/lib/prototype/create_agent_sheet.dart +++ b/mobile/lib/prototype/create_agent_sheet.dart @@ -4,6 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../shared/community/community.dart'; import '../shared/community/community_provider.dart'; +import '../shared/community/community_avatar.dart'; import '../shared/deeplink/deep_link.dart'; import '../shared/theme/theme.dart'; import '../shared/widgets/buzz_titled_sheet_layout.dart'; @@ -137,9 +138,7 @@ class CreatePrototypeAgentSheet extends HookConsumerWidget { bottom: MediaQuery.viewInsetsOf(context).bottom, ), child: BuzzTitledSheetLayout( - title: avatar == null - ? 'Create agent' - : 'Create in ${community.name}', + title: 'Create agent', leading: IconButton( tooltip: 'Cancel', style: actionStyle, @@ -169,6 +168,18 @@ class CreatePrototypeAgentSheet extends HookConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ if (avatarUrl != null) ...[ + Align( + alignment: Alignment.centerRight, + child: Semantics( + label: 'Current community: ${community.name}', + child: CommunityAvatar( + name: community.name, + relayUrl: community.relayUrl, + size: Grid.md, + ), + ), + ), + const SizedBox(height: Grid.xs), Center( child: AvatarImage( imageUrl: avatarUrl, diff --git a/mobile/test/prototype/agent_link_surface_test.dart b/mobile/test/prototype/agent_link_surface_test.dart index df43639b2d..9dc0e13e47 100644 --- a/mobile/test/prototype/agent_link_surface_test.dart +++ b/mobile/test/prototype/agent_link_surface_test.dart @@ -6,6 +6,7 @@ import 'package:buzz/prototype/create_agent_sheet.dart'; import 'package:buzz/prototype/remote_agent_controller.dart'; import 'package:buzz/shared/agents/agents_surface.dart'; import 'package:buzz/shared/community/community.dart'; +import 'package:buzz/shared/community/community_avatar.dart'; import 'package:buzz/shared/community/community_provider.dart'; import 'package:buzz/shared/deeplink/deep_link.dart'; import 'package:buzz/shared/deeplink/pending_deep_link_provider.dart'; @@ -122,7 +123,13 @@ void main() { ), ); await tester.pumpAndSettle(); - expect(find.text('Create in Test community'), findsOneWidget); + expect(find.text('Create agent'), findsOneWidget); + expect(find.text('Create in Test community'), findsNothing); + final indicator = tester.widget( + find.byType(CommunityAvatar), + ); + expect(indicator.name, 'Test community'); + expect(indicator.relayUrl, 'wss://test.example'); expect(find.byType(AvatarImage), findsOneWidget); expect(controller.submittedName, isNull); await tester.enterText(