mirror of
https://github.com/block/buzz.git
synced 2026-11-02 15:31:27 +00:00
## Summary - Simplify agent profiles with Message/Bestie actions, relay-authored published instructions (unavailable without a config channel), management details, public-key copying, and a separate final Delete section. - Sort the Agents directory by name and mark the selected Bestie with a muted filled star. - Place Model and Thinking together below Name. Use native iOS Liquid Glass menus and preserve selection callbacks as controls become enabled. Related: #8685. ## Validation Full mobile checks passed. Regression coverage includes relay-author filtering, unavailable instructions, metadata retry, resizing native pickers, accurate deletion state, selection after loading, and Bestie switching. Real iOS simulator taps verified both pickers; the user confirmed the earlier iPhone build works. Review fixes were checked with widget journeys and the native UIKit resize/selection probe. <details> <summary>Previews</summary> Synthetic fixture renders: | Profile | Create agent | Bestie card | | --- | --- | --- | |  |  |  | Native iOS simulator interaction with a synthetic catalog:  </details> --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
41 lines
1.4 KiB
Dart
41 lines
1.4 KiB
Dart
import 'package:buzz/features/agents/agent_card.dart';
|
|
import 'package:buzz/features/agents/agents_page.dart';
|
|
import 'package:buzz/shared/profile/user_cache_provider.dart';
|
|
import 'package:buzz/shared/profile/user_profile.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
|
import 'agents_harness.dart';
|
|
import '../../helpers/remote_agents_fixture.dart';
|
|
|
|
void main() {
|
|
testWidgets('directory sorts names ignoring case and reorders after rename', (
|
|
tester,
|
|
) async {
|
|
final h = await AgentsHarness.create();
|
|
final existing = existingDesktopKeys.public;
|
|
await h.open(tester, directory: [existing, fakeAgent]);
|
|
final container = ProviderScope.containerOf(
|
|
tester.element(find.byType(AgentsPage)),
|
|
);
|
|
final profiles = container.read(userCacheProvider.notifier);
|
|
profiles.put(UserProfile(pubkey: existing, displayName: 'Zulu'));
|
|
profiles.put(UserProfile(pubkey: fakeAgent, displayName: 'alpha'));
|
|
await tester.pumpAndSettle();
|
|
expect(
|
|
tester
|
|
.widgetList<AgentCard>(find.byType(AgentCard))
|
|
.map((card) => card.name),
|
|
['alpha', 'Zulu'],
|
|
);
|
|
profiles.put(UserProfile(pubkey: existing, displayName: 'aardvark'));
|
|
await tester.pumpAndSettle();
|
|
expect(
|
|
tester
|
|
.widgetList<AgentCard>(find.byType(AgentCard))
|
|
.map((card) => card.name),
|
|
['aardvark', 'alpha'],
|
|
);
|
|
});
|
|
}
|