mirror of
https://github.com/block/buzz.git
synced 2026-11-24 18:21:59 +00:00
The iOS thread header currently renders an unbacked “Thread” label over scrolling messages. Supply the channel display name as its subtitle so the header uses the same two-line glass capsule as channel conversations. The title remains noninteractive and inherits the shared sizing, truncation, text scaling, and accessibility behavior. Channel and DM display names update with channel metadata; missing metadata keeps the capsule without inventing a subtitle. App-bar construction moves into a sibling file to keep the thread page within the file-size limit. ### Validation - [CI run](https://github.com/block/buzz/actions/runs/37654016581): mobile tests, native iOS build, and all other executed jobs passed. The overall workflow reports a GitHub internal server error; GitHub rejected a retry. Required checks passed or were skipped. - [Codex review](https://github.com/block/buzz/pull/8150#issuecomment-6042500880) completed without major findings on the current head. - Mobile dependency setup, formatting, file-size checks, and analysis passed. - Full mobile suite: 3,039 tests passed, four skipped; all three unconfigured-push tests passed. - Widget regressions exercise real thread-page native parameters for channel/DM labels, renames, missing metadata, and disabled title interaction. - Native iOS 26.5 simulator check confirms the shared capsule renders “Thread” above “engineering,” with a single noninteractive accessibility header. Before/after captures use synthetic content. [Before/after simulator captures](https://github.com/block/buzz/pull/8150#issuecomment-6042451532) ### Post-merge validation During the mobile release baking period, open threads in channels and DMs on a device, including long channel names and larger text settings; verify the bubble stays clear of Back and has no tap action. Human app-test confirmation is not applicable under the standing Buzz mobile exception. buzz-review-completed Signed-off-by: Tom Brow <tomb@block.xyz>
76 lines
2.5 KiB
Dart
76 lines
2.5 KiB
Dart
part of 'channel_detail_page_test.dart';
|
|
|
|
void threadTitleCapsuleTests() {
|
|
for (final dm in [false, true]) {
|
|
testWidgets('iOS thread capsule uses live display name dm=$dm', (
|
|
tester,
|
|
) async {
|
|
debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
|
|
addTearDown(() => debugDefaultTargetPlatformOverride = null);
|
|
final channel = Channel(
|
|
id: _testChannel.id,
|
|
visibility: 'open',
|
|
description: '',
|
|
createdBy: 'self',
|
|
createdAt: _testChannel.createdAt,
|
|
memberCount: 2,
|
|
isMember: true,
|
|
name: dm ? 'DM' : 'engineering',
|
|
channelType: dm ? 'dm' : 'stream',
|
|
participantPubkeys: dm ? ['self', 'alice'] : [],
|
|
participants: dm ? ['Me', 'Alice'] : [],
|
|
);
|
|
final channels = _FakeChannelsNotifier([channel]);
|
|
final root = _textMsg(
|
|
id: 'capsule-root',
|
|
pubkey: 'alice',
|
|
content: 'Root',
|
|
);
|
|
final timeline = formatTimeline([root]);
|
|
await tester.pumpWidget(
|
|
_buildTestable(
|
|
messages: [root],
|
|
channel: channel,
|
|
channelsNotifier: channels,
|
|
users: const {
|
|
'alice': UserProfile(pubkey: 'alice', displayName: 'Alice'),
|
|
},
|
|
home: ThreadDetailPage(
|
|
threadHead: timeline.single,
|
|
allMessages: timeline,
|
|
channelId: channel.id,
|
|
currentPubkey: 'self',
|
|
isMember: true,
|
|
isArchived: false,
|
|
),
|
|
),
|
|
);
|
|
await tester.pumpAndSettle();
|
|
Map params() =>
|
|
tester
|
|
.widget<UiKitView>(
|
|
find.byWidgetPredicate(
|
|
(widget) =>
|
|
widget is UiKitView &&
|
|
widget.viewType == 'buzz/ios_navigation_bar',
|
|
),
|
|
)
|
|
.creationParams!
|
|
as Map;
|
|
expect(params()['title'], 'Thread');
|
|
expect(params()['subtitle'], dm ? 'Alice' : 'engineering');
|
|
expect(params()['titleEnabled'], false);
|
|
channels.setChannels([channel.copyWith(name: 'Renamed conversation')]);
|
|
await tester.pumpAndSettle();
|
|
expect(params()['subtitle'], 'Renamed conversation');
|
|
expect(params()['titleEnabled'], false);
|
|
channels.setChannels([]);
|
|
await tester.pumpAndSettle();
|
|
// An empty subtitle keeps the shared capsule while metadata is absent.
|
|
expect(params()['subtitle'], '');
|
|
expect(tester.takeException(), isNull);
|
|
debugDefaultTargetPlatformOverride = null;
|
|
});
|
|
}
|
|
}
|