root-cause T-122 + restore 95% coverage; fix recents-row overflow
T-122: WelcomeView "hangs when recents are non-empty" was not a render/marquee bug — SettingsStore.set does real file I/O, and awaiting settings.set + loadRecents inside a testWidgets body runs it in fake-async, trapping the completion so the await never returns. Fix: seed via tester.runAsync. Un-skip the welcome recents test; add render/sticky/open-recent coverage. Coverage: new test/app_test.dart covers the app shell (RootLayout, slots, rails, spines, editor split, hat bar, intents, keymap, project switcher + dialogs); welcome recents + events/types fill the rest. Total 92.04% -> 95.13%. Also fixes a real bug found en route: the recent-project row (welcome + switcher) overflowed instead of ellipsizing a long path (T-122). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,57 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('Team events', () {
|
||||
test('TeamMemberJoined includes only the set optional fields in payload', () {
|
||||
const minimal = TeamMemberJoined(
|
||||
team: 'alpha',
|
||||
agentId: 'bob@alpha',
|
||||
name: 'bob',
|
||||
agentType: 'reviewer',
|
||||
paneId: '%3',
|
||||
);
|
||||
expect(minimal.subsystem, 'team');
|
||||
expect(minimal.kind, 'member-joined');
|
||||
expect(minimal.payload(), {
|
||||
'team': 'alpha',
|
||||
'agentId': 'bob@alpha',
|
||||
'name': 'bob',
|
||||
'agentType': 'reviewer',
|
||||
'paneId': '%3',
|
||||
});
|
||||
|
||||
const full = TeamMemberJoined(
|
||||
team: 'alpha',
|
||||
agentId: 'bob@alpha',
|
||||
name: 'bob',
|
||||
agentType: 'reviewer',
|
||||
paneId: '%3',
|
||||
model: 'opus',
|
||||
color: '#ff0000',
|
||||
cwd: '/tmp/work',
|
||||
transcriptPath: '/tmp/t.jsonl',
|
||||
);
|
||||
expect(full.payload(), {
|
||||
'team': 'alpha',
|
||||
'agentId': 'bob@alpha',
|
||||
'name': 'bob',
|
||||
'agentType': 'reviewer',
|
||||
'paneId': '%3',
|
||||
'model': 'opus',
|
||||
'color': '#ff0000',
|
||||
'cwd': '/tmp/work',
|
||||
'transcriptPath': '/tmp/t.jsonl',
|
||||
});
|
||||
});
|
||||
|
||||
test('TeamMemberLeft', () {
|
||||
const e = TeamMemberLeft(team: 'alpha', agentId: 'bob@alpha', paneId: '%3');
|
||||
expect(e.subsystem, 'team');
|
||||
expect(e.kind, 'member-left');
|
||||
expect(e.payload(), {'team': 'alpha', 'agentId': 'bob@alpha', 'paneId': '%3'});
|
||||
});
|
||||
});
|
||||
|
||||
group('ClideEventEnvelope', () {
|
||||
test('toJson builds a v1 envelope around the event', () {
|
||||
final ts = DateTime.utc(2026, 5, 11, 9, 30);
|
||||
|
||||
Reference in New Issue
Block a user