Files
clide/test/builtin/claude/transcript_publisher_test.dart
T
jpmschweitzerandClaude Fable 5 37f3ad0796 remove the tmux-era TranscriptPublisher class (T-385)
No production code constructed it since the stream-json pivot (D-77)
— only its own test did. The ClaudeConversation bus-addressing
constants stay; the meta sidebar and team panel host still consume
them for member-status messages. The companion finding — the team
roster surfaces listening to TeamMemberJoined events nothing emits —
is real rewiring work, split out as T-396 (drive the roster from
TeamBroker membership, then delete the ghost event types).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 02:17:37 +02:00

29 lines
1.3 KiB
Dart

/// Tests for the ClaudeConversation bus-addressing constants. The
/// TranscriptPublisher class this file used to cover was removed in the
/// T-385 dead-code sweep (no production constructor calls since the
/// stream-json pivot, D-77).
library;
import 'package:clide/builtin/claude/src/transcript_publisher.dart';
import 'package:clide/builtin/claude/src/transcript_reader.dart';
import 'package:test/test.dart';
void main() {
group('ClaudeConversation addressing', () {
test('sessionChannel + teammateChannel namespace by id', () {
expect(ClaudeConversation.sessionChannel('abc-123'), 'conversation/abc-123');
expect(ClaudeConversation.teammateChannel('coder@team-x'), 'conversation/coder@team-x');
});
test('memberStatusData encodes agentId + present status fields (T-157)', () {
final full = ClaudeConversation.memberStatusData(
'coder@team-x',
const SessionStatus(model: 'claude-opus-4-7', permissionMode: 'plan', contextTokens: 21000),
);
expect(full, {'agentId': 'coder@team-x', 'model': 'claude-opus-4-7', 'permissionMode': 'plan', 'contextTokens': 21000});
// Absent fields are omitted (only agentId is always present).
expect(ClaudeConversation.memberStatusData('a', const SessionStatus()), {'agentId': 'a'});
});
});
}