@startsimpli/integrations 0.2.175 → 0.2.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/__tests__/classify-team.test.ts +7 -6
- package/src/__tests__/corpus-planning.test.tsx +2 -1
- package/src/__tests__/corpus-tracker.test.tsx +5 -5
- package/src/__tests__/work-groups.test.ts +5 -3
- package/src/components/pages/TrackerPage.tsx +4 -3
- package/src/corpus/classify-team.ts +2 -2
- package/src/corpus/tracker-groups.ts +8 -6
- package/src/native/converse/ConverseScreen.tsx +26 -15
- package/src/native/converse/__tests__/liveScreen.test.tsx +45 -0
- package/src/task-tracker/item-sync.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startsimpli/integrations",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.176",
|
|
4
4
|
"description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://startsimpli.com",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"react-native": ">=0.74.0",
|
|
51
51
|
"@startsimpli/ui-native": ">=0.1.12",
|
|
52
52
|
"react-native-safe-area-context": ">=4.0.0",
|
|
53
|
-
"@startsimpli/ui": "^0.4.
|
|
54
|
-
"@startsimpli/
|
|
55
|
-
"@startsimpli/
|
|
53
|
+
"@startsimpli/ui": "^0.4.185",
|
|
54
|
+
"@startsimpli/utils": "^0.4.20",
|
|
55
|
+
"@startsimpli/auth": "^0.4.53"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"react": {
|
|
@@ -99,10 +99,10 @@
|
|
|
99
99
|
"react-native": "0.85.3",
|
|
100
100
|
"react-native-safe-area-context": "~5.7.0",
|
|
101
101
|
"@startsimpli/llm": "0.4.31",
|
|
102
|
-
"@startsimpli/ui": "0.4.184",
|
|
103
102
|
"@startsimpli/ui-native": "0.1.15",
|
|
104
103
|
"@startsimpli/auth": "0.4.53",
|
|
105
|
-
"@startsimpli/utils": "0.4.20"
|
|
104
|
+
"@startsimpli/utils": "0.4.20",
|
|
105
|
+
"@startsimpli/ui": "0.4.185"
|
|
106
106
|
},
|
|
107
107
|
"scripts": {
|
|
108
108
|
"type-check": "tsc --noEmit && tsc --noEmit -p tsconfig.native.json",
|
|
@@ -134,17 +134,18 @@ describe('which team an item belongs to (startsim-6z7vi.3: there is no default t
|
|
|
134
134
|
describe('the needs_private_space chip', () => {
|
|
135
135
|
it('asks the member to set up their private space', () => {
|
|
136
136
|
const chip = syncChip(readItemSync({ sync_state: 'needs_private_space', sync_error: 'Set up your private Linear space: x' })!, 'Linear');
|
|
137
|
-
expect(chip.badge.text).toBe('
|
|
138
|
-
expect(chip.badge.tone).toBe('
|
|
137
|
+
expect(chip.badge.text).toBe('Tandem only');
|
|
138
|
+
expect(chip.badge.tone).toBe('muted');
|
|
139
|
+
expect(chip.badge.detail).toBeUndefined();
|
|
139
140
|
});
|
|
140
141
|
});
|
|
141
142
|
|
|
142
143
|
describe('the needs_team chip', () => {
|
|
143
|
-
it('
|
|
144
|
+
it('is plain Tandem only with no nag (older rows are released by the engine)', () => {
|
|
144
145
|
const sync = readItemSync({ sync_state: 'needs_team', sync_error: 'Needs a team: not sure.' })!;
|
|
145
146
|
const chip = syncChip(sync, 'Linear');
|
|
146
|
-
expect(chip.badge.text).toBe('
|
|
147
|
-
expect(chip.badge.tone).toBe('
|
|
148
|
-
expect(chip.badge.detail).
|
|
147
|
+
expect(chip.badge.text).toBe('Tandem only');
|
|
148
|
+
expect(chip.badge.tone).toBe('muted');
|
|
149
|
+
expect(chip.badge.detail).toBeUndefined();
|
|
149
150
|
});
|
|
150
151
|
});
|
|
@@ -498,7 +498,8 @@ describe('PlanningPage', () => {
|
|
|
498
498
|
const api = fakeApi({ focuses: [FOCUS], onList: (q) => queries.push(q as { status?: unknown }) });
|
|
499
499
|
api.listCommitments = async (query) => {
|
|
500
500
|
queries.push(query as { status?: unknown });
|
|
501
|
-
const
|
|
501
|
+
const status = (query as { status?: unknown }).status;
|
|
502
|
+
const wanted = Array.isArray(status) ? status : [status];
|
|
502
503
|
const results = wanted.includes('done') ? [done] : [];
|
|
503
504
|
return { count: results.length, next: null, previous: null, results, appliedFilters: ['status'] };
|
|
504
505
|
};
|
|
@@ -197,14 +197,14 @@ describe('TrackerPage — what is outstanding', () => {
|
|
|
197
197
|
expect(screen.queryByText(/did not filter by/i)).not.toBeInTheDocument();
|
|
198
198
|
});
|
|
199
199
|
|
|
200
|
-
it('groups the list: overdue sits in Today, undated work in
|
|
200
|
+
it('groups the list: overdue sits in Today, undated work in No date, each with a count', async () => {
|
|
201
201
|
render(<TrackerPage api={makeApi()} scope={SCOPE} now={NOW} timeZone="UTC" />);
|
|
202
202
|
await screen.findByText('Chase the inventor for comments on 2148');
|
|
203
203
|
const today = screen.getByRole('region', { name: 'Today' });
|
|
204
204
|
expect(within(today).getByText('Send the equity sheet to Harry Holcomb')).toBeInTheDocument();
|
|
205
205
|
expect(within(today).getByText('5d late')).toBeInTheDocument();
|
|
206
|
-
const
|
|
207
|
-
expect(within(
|
|
206
|
+
const noDate = screen.getByRole('region', { name: 'No date' });
|
|
207
|
+
expect(within(noDate).getByText('Chase the inventor for comments on 2148')).toBeInTheDocument();
|
|
208
208
|
expect(screen.getByTestId('tracker-summary')).toHaveTextContent('2 owed · 1 today');
|
|
209
209
|
});
|
|
210
210
|
|
|
@@ -216,7 +216,7 @@ describe('TrackerPage — what is outstanding', () => {
|
|
|
216
216
|
render(<TrackerPage api={makeApi({ rows })} scope={SCOPE} now={NOW} />);
|
|
217
217
|
await screen.findByText('Chase the inventor for comments on 2148');
|
|
218
218
|
expect(screen.getByText(/Decisions and questions \(1\)/)).toBeInTheDocument();
|
|
219
|
-
expect(within(screen.getByRole('region', { name: '
|
|
219
|
+
expect(within(screen.getByRole('region', { name: 'No date' })).queryByText('We decided to move the beta')).toBeNull();
|
|
220
220
|
});
|
|
221
221
|
|
|
222
222
|
it('hides undated items nobody touched in 90 days behind Stale, and archives them in one click', async () => {
|
|
@@ -229,7 +229,7 @@ describe('TrackerPage — what is outstanding', () => {
|
|
|
229
229
|
render(<TrackerPage api={api} scope={SCOPE} now={NOW} />);
|
|
230
230
|
await screen.findByText('Chase the inventor for comments on 2148');
|
|
231
231
|
expect(screen.getByText(/Stale \(1\)/)).toBeInTheDocument();
|
|
232
|
-
expect(within(screen.getByRole('region', { name: '
|
|
232
|
+
expect(within(screen.getByRole('region', { name: 'No date' })).queryByText('An old promise')).toBeNull();
|
|
233
233
|
await userEvent.click(screen.getByRole('button', { name: 'Archive' }));
|
|
234
234
|
expect(patches).toEqual([['commit:stale', 'dropped']]);
|
|
235
235
|
});
|
|
@@ -96,7 +96,8 @@ describe('groupTracker', () => {
|
|
|
96
96
|
expect(g.today.map((e) => e.item.id)).toEqual(['late', 'today']);
|
|
97
97
|
expect(g.inProgress.map((e) => e.item.id)).toEqual(['wip']);
|
|
98
98
|
expect(g.upNext.map((e) => e.item.id)).toEqual(['soon']);
|
|
99
|
-
expect(g.later.map((e) => e.item.id)).toEqual(['far'
|
|
99
|
+
expect(g.later.map((e) => e.item.id)).toEqual(['far']);
|
|
100
|
+
expect(g.noDate.map((e) => e.item.id)).toEqual(['undated']);
|
|
100
101
|
});
|
|
101
102
|
|
|
102
103
|
it('keeps an overdue in-progress item in Today, once', () => {
|
|
@@ -113,7 +114,8 @@ describe('groupTracker', () => {
|
|
|
113
114
|
], opts);
|
|
114
115
|
expect(g.stale.map((e) => e.item.id)).toEqual(['old']);
|
|
115
116
|
expect(g.today.map((e) => e.item.id)).toEqual(['oldDated']);
|
|
116
|
-
expect(g.
|
|
117
|
+
expect(g.noDate.map((e) => e.item.id)).toEqual(['fresh']);
|
|
118
|
+
expect(g.later).toHaveLength(0);
|
|
117
119
|
});
|
|
118
120
|
|
|
119
121
|
it('collects finished items in Done and meeting statements apart from the tasks', () => {
|
|
@@ -124,7 +126,7 @@ describe('groupTracker', () => {
|
|
|
124
126
|
], opts);
|
|
125
127
|
expect(g.done.map((e) => e.item.id).sort()).toEqual(['d', 'x']);
|
|
126
128
|
expect(g.statements.map((e) => e.item.id)).toEqual(['dec']);
|
|
127
|
-
expect(g.counts).toEqual({ today: 0, inProgress: 0, upNext: 0, later: 0, stale: 0, done: 2, statements: 1 });
|
|
129
|
+
expect(g.counts).toEqual({ today: 0, inProgress: 0, upNext: 0, later: 0, noDate: 0, stale: 0, done: 2, statements: 1 });
|
|
128
130
|
});
|
|
129
131
|
});
|
|
130
132
|
|
|
@@ -413,14 +413,15 @@ export function TrackerPage({
|
|
|
413
413
|
// Rendering it as "in progress" is a spinner that never ends.
|
|
414
414
|
const sweepStalled = Boolean(sweep && isStalled(sweep, clock));
|
|
415
415
|
|
|
416
|
-
const sections: Array<{ key: 'today' | 'inProgress' | 'upNext' | 'later'; label: string }> = [
|
|
416
|
+
const sections: Array<{ key: 'today' | 'inProgress' | 'upNext' | 'later' | 'noDate'; label: string }> = [
|
|
417
417
|
{ key: 'today', label: 'Today' },
|
|
418
418
|
{ key: 'inProgress', label: 'In progress' },
|
|
419
419
|
{ key: 'upNext', label: 'Up next' },
|
|
420
420
|
{ key: 'later', label: 'Later' },
|
|
421
|
+
{ key: 'noDate', label: 'No date' },
|
|
421
422
|
];
|
|
422
423
|
const c = groups.counts;
|
|
423
|
-
const owed = c.today + c.inProgress + c.upNext + c.later;
|
|
424
|
+
const owed = c.today + c.inProgress + c.upNext + c.later + c.noDate;
|
|
424
425
|
const rowFor = (entry: TrackerEntry, extra?: { actions?: React.ReactNode; chip?: string }) => (
|
|
425
426
|
<CompactItemRow
|
|
426
427
|
key={entry.item.externalId}
|
|
@@ -552,7 +553,7 @@ export function TrackerPage({
|
|
|
552
553
|
|
|
553
554
|
{view === 'board' ? (
|
|
554
555
|
<TrackerBoard
|
|
555
|
-
entries={[...groups.today, ...groups.inProgress, ...groups.upNext, ...groups.later, ...groups.stale]}
|
|
556
|
+
entries={[...groups.today, ...groups.inProgress, ...groups.upNext, ...groups.later, ...groups.noDate, ...groups.stale]}
|
|
556
557
|
sort={sort}
|
|
557
558
|
headingClassName={cn.heading} mutedClassName={cn.muted}
|
|
558
559
|
renderRow={(entry) => rowFor(entry, canWrite ? {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - a team id the model returns must be one of the offered teams; an invented id
|
|
11
11
|
* is rejected;
|
|
12
12
|
* - below `TEAM_CONFIDENCE` the answer is not used: a wrong team files work in the
|
|
13
|
-
* wrong place, and an unplaced item only waits
|
|
14
|
-
*
|
|
13
|
+
* wrong place, and an unplaced item only waits as a normal Tandem-only
|
|
14
|
+
* item (no error, no question; it syncs once a team is known);
|
|
15
15
|
* - personal items are never offered: they never leave Tandem.
|
|
16
16
|
*/
|
|
17
17
|
import type { TeamCandidate, TeamClassifyDraft, TeamClassifyRequest } from './types';
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Today overdue, or due today (an overdue in-progress item is here, once)
|
|
5
5
|
* In progress started, nothing forcing it today
|
|
6
6
|
* Up next due in the next 7 days
|
|
7
|
-
* Later due after that
|
|
7
|
+
* Later due after that
|
|
8
|
+
* No date owed with no date, recently touched (its own group, never folded into Later)
|
|
8
9
|
* Stale undated and untouched for 90+ days: hidden behind a fold
|
|
9
10
|
* Done finished (done / dropped)
|
|
10
11
|
* Statements meeting statements (decisions, needs, risks, questions) with no
|
|
@@ -39,10 +40,11 @@ export interface TrackerGroups<T = Commitment> {
|
|
|
39
40
|
inProgress: TrackerEntry<T>[];
|
|
40
41
|
upNext: TrackerEntry<T>[];
|
|
41
42
|
later: TrackerEntry<T>[];
|
|
43
|
+
noDate: TrackerEntry<T>[];
|
|
42
44
|
stale: TrackerEntry<T>[];
|
|
43
45
|
done: TrackerEntry<T>[];
|
|
44
46
|
statements: TrackerEntry<T>[];
|
|
45
|
-
counts: Record<'today' | 'inProgress' | 'upNext' | 'later' | 'stale' | 'done' | 'statements', number>;
|
|
47
|
+
counts: Record<'today' | 'inProgress' | 'upNext' | 'later' | 'noDate' | 'stale' | 'done' | 'statements', number>;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
type Row = Pick<Commitment, 'status' | 'dueAt' | 'subtype' | 'ownerName' | 'ownerSub' | 'lastSeenAt' | 'firstSeenAt' | 'resolvedAt'>
|
|
@@ -56,8 +58,8 @@ export function groupTracker<T extends Row>(
|
|
|
56
58
|
const today = localDate(options.now, timeZone);
|
|
57
59
|
const staleDays = options.staleDays ?? STALE_DAYS;
|
|
58
60
|
const out: TrackerGroups<T> = {
|
|
59
|
-
today: [], inProgress: [], upNext: [], later: [], stale: [], done: [], statements: [],
|
|
60
|
-
counts: { today: 0, inProgress: 0, upNext: 0, later: 0, stale: 0, done: 0, statements: 0 },
|
|
61
|
+
today: [], inProgress: [], upNext: [], later: [], noDate: [], stale: [], done: [], statements: [],
|
|
62
|
+
counts: { today: 0, inProgress: 0, upNext: 0, later: 0, noDate: 0, stale: 0, done: 0, statements: 0 },
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
for (const item of items) {
|
|
@@ -71,7 +73,7 @@ export function groupTracker<T extends Row>(
|
|
|
71
73
|
if (days !== null) { (days <= WEEK_DAYS ? out.upNext : out.later).push(entry); continue; }
|
|
72
74
|
const touched = Date.parse(item.lastSeenAt ?? item.firstSeenAt ?? '');
|
|
73
75
|
const idle = Number.isNaN(touched) ? 0 : (options.now - touched) / 86_400_000;
|
|
74
|
-
(idle >= staleDays ? out.stale : out.
|
|
76
|
+
(idle >= staleDays ? out.stale : out.noDate).push(entry);
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
const byKey = compareCommitments(options.sort);
|
|
@@ -81,7 +83,7 @@ export function groupTracker<T extends Row>(
|
|
|
81
83
|
(a.due ?? '9999').localeCompare(b.due ?? '9999') || (a.item.priority ?? 99) - (b.item.priority ?? 99);
|
|
82
84
|
const recent = (a: TrackerEntry<T>, b: TrackerEntry<T>) =>
|
|
83
85
|
(b.item.resolvedAt ?? b.item.lastSeenAt ?? '').localeCompare(a.item.resolvedAt ?? a.item.lastSeenAt ?? '');
|
|
84
|
-
for (const key of ['today', 'inProgress', 'upNext', 'later', 'stale', 'statements'] as const) out[key].sort(dated);
|
|
86
|
+
for (const key of ['today', 'inProgress', 'upNext', 'later', 'noDate', 'stale', 'statements'] as const) out[key].sort(dated);
|
|
85
87
|
out.done.sort(recent);
|
|
86
88
|
for (const key of Object.keys(out.counts) as Array<keyof TrackerGroups['counts']>) out.counts[key] = out[key].length;
|
|
87
89
|
return out;
|
|
@@ -37,7 +37,7 @@ export function ConverseScreen({ controller, speed }: { controller: MeetingContr
|
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
39
|
<View style={{ flex: 1 }} testID="converse-screen">
|
|
40
|
-
<Header large testID="converse-header" title="Converse" subtitle={active ? 'Meeting in progress' : 'Talk it through'} />
|
|
40
|
+
<Header large={!active && !busy} testID="converse-header" title="Converse" subtitle={active ? 'Meeting in progress' : 'Talk it through'} />
|
|
41
41
|
<FlatList
|
|
42
42
|
ref={list}
|
|
43
43
|
testID="converse-transcript"
|
|
@@ -63,19 +63,30 @@ export function ConverseScreen({ controller, speed }: { controller: MeetingContr
|
|
|
63
63
|
</View>
|
|
64
64
|
) : null}
|
|
65
65
|
{s.noAudio && s.phase !== 'speaking' ? <RNText testID="converse-no-audio" style={{ color: theme.colors.mutedForeground, fontSize: theme.fontSizes.sm, textAlign: 'center' }}>{`No sound for that reply: ${s.noAudio}`}</RNText> : null}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
{active || busy ? (
|
|
67
|
+
// The meeting is running: no big button, the transcript above is the screen. One slim status row and a deliberate End.
|
|
68
|
+
<View testID="converse-live" style={{ flexDirection: 'row', alignItems: 'center', gap: theme.spacing.sm, alignSelf: 'stretch' }}>
|
|
69
|
+
{busy || s.phase === 'thinking' ? <Spinner /> : <View style={{ width: 14, height: 14, borderRadius: 7, backgroundColor: color }} />}
|
|
70
|
+
<RNText testID="converse-status" numberOfLines={2} style={{ flex: 1, color: theme.colors.foreground, fontSize: theme.fontSizes.lg, fontWeight: '600' }}>
|
|
71
|
+
{statusLine(s.phase, sec)}
|
|
72
|
+
</RNText>
|
|
73
|
+
</View>
|
|
74
|
+
) : (
|
|
75
|
+
<>
|
|
76
|
+
<Pressable
|
|
77
|
+
testID="converse-talk"
|
|
78
|
+
accessibilityRole="button"
|
|
79
|
+
accessibilityLabel="Start the meeting"
|
|
80
|
+
onPress={() => { haptic('medium', 'converse.start'); controller.start(); }}
|
|
81
|
+
style={{ width: BIG, height: BIG, borderRadius: BIG / 2, backgroundColor: color, alignItems: 'center', justifyContent: 'center' }}
|
|
82
|
+
>
|
|
83
|
+
<RNText style={{ color: theme.colors.primaryForeground, fontSize: 32, fontWeight: '800' }}>{indicatorLabel(s.phase)}</RNText>
|
|
84
|
+
</Pressable>
|
|
85
|
+
<RNText testID="converse-status" style={{ color: theme.colors.foreground, fontSize: theme.fontSizes.lg, fontWeight: '600', textAlign: 'center' }}>
|
|
86
|
+
{statusLine(s.phase, sec)}
|
|
87
|
+
</RNText>
|
|
88
|
+
</>
|
|
89
|
+
)}
|
|
79
90
|
{speed ? (
|
|
80
91
|
<View testID="converse-speed" accessibilityLabel="Reply speed" style={{ flexDirection: 'row', alignItems: 'center', gap: theme.spacing.sm }}>
|
|
81
92
|
<RNText style={{ color: theme.colors.mutedForeground, fontSize: theme.fontSizes.sm }}>Speed</RNText>
|
|
@@ -96,7 +107,7 @@ export function ConverseScreen({ controller, speed }: { controller: MeetingContr
|
|
|
96
107
|
) : null}
|
|
97
108
|
<View style={{ flexDirection: 'row', gap: theme.spacing.md }}>
|
|
98
109
|
<Button testID="converse-repeat" title="Replay" variant="outline" size="lg" disabled={!s.lines.length || busy || s.phase === 'thinking'} onPress={() => { haptic('light', 'converse.replay'); void controller.replay(); }} />
|
|
99
|
-
<Button testID="converse-end" title="End" variant="outline" size="lg" disabled={busy || (!active && s.phase !== 'stopped')} onPress={() => { haptic('warning', 'converse.end'); void controller.end(); }} />
|
|
110
|
+
<Button testID="converse-end" title="End meeting" variant={active ? "destructive" : "outline"} size="lg" disabled={busy || (!active && s.phase !== 'stopped')} onPress={() => { haptic('warning', 'converse.end'); void controller.end(); }} />
|
|
100
111
|
</View>
|
|
101
112
|
</View>
|
|
102
113
|
</View>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
vi.mock('react-native', async () => ({ ...(await import('../../../../../ui-native/test/rn-stub')) }));
|
|
4
|
+
|
|
5
|
+
import { act, hostById, maybeById, render } from '../../../../../ui-native/test/render';
|
|
6
|
+
import type { MeetingController } from '../../../corpus/converse/meeting';
|
|
7
|
+
import { ConverseScreen } from '../ConverseScreen';
|
|
8
|
+
|
|
9
|
+
const base = { retryable: false, lines: [{ role: 'user', text: 'plan my day' }, { role: 'assistant', text: 'Here is a plan' }], error: null, noAudio: null, conversationId: 'c1', saved: null, relayNotice: null };
|
|
10
|
+
const make = (phase: string) => {
|
|
11
|
+
const state = { ...base, phase };
|
|
12
|
+
const calls = { end: 0, start: 0 };
|
|
13
|
+
const controller = {
|
|
14
|
+
start() { calls.start += 1; }, end: async () => { calls.end += 1; return null; }, replay: async () => {}, sendText: async () => {}, dismissNotice() {},
|
|
15
|
+
getState: () => state, state: () => state, subscribe: () => () => undefined,
|
|
16
|
+
} as unknown as MeetingController;
|
|
17
|
+
return { controller, calls };
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
describe('Converse while a meeting runs', () => {
|
|
21
|
+
it('shows no Start button, keeps the chat and the status, and offers a deliberate End', () => {
|
|
22
|
+
const { controller } = make('listening');
|
|
23
|
+
const r = render(<ConverseScreen controller={controller} />);
|
|
24
|
+
expect(maybeById(r, 'converse-talk')).toHaveLength(0);
|
|
25
|
+
expect(hostById(r, 'converse-live')).toBeTruthy();
|
|
26
|
+
expect(hostById(r, 'converse-line-1')).toBeTruthy();
|
|
27
|
+
expect(hostById(r, 'converse-end')).toBeTruthy();
|
|
28
|
+
});
|
|
29
|
+
it('leaving the screen does not end the meeting; only End does', async () => {
|
|
30
|
+
const { controller, calls } = make('speaking');
|
|
31
|
+
const r = render(<ConverseScreen controller={controller} />);
|
|
32
|
+
act(() => { r.unmount(); });
|
|
33
|
+
expect(calls.end).toBe(0);
|
|
34
|
+
const r2 = render(<ConverseScreen controller={controller} />);
|
|
35
|
+
await act(async () => { hostById(r2, 'converse-end').props.onPress(); });
|
|
36
|
+
expect(calls.end).toBe(1);
|
|
37
|
+
});
|
|
38
|
+
it('shows the big Start only when no meeting is running', async () => {
|
|
39
|
+
const { controller, calls } = make('idle');
|
|
40
|
+
const r = render(<ConverseScreen controller={controller} />);
|
|
41
|
+
expect(maybeById(r, 'converse-live')).toHaveLength(0);
|
|
42
|
+
await act(async () => { hostById(r, 'converse-talk').props.onPress(); });
|
|
43
|
+
expect(calls.start).toBe(1);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -74,11 +74,11 @@ export function syncChip(sync: ItemSync, trackerName?: string): SyncChip {
|
|
|
74
74
|
case 'conflict':
|
|
75
75
|
badge = { text: 'Out of sync', tone: 'warn', ...(sync.error ? { detail: sync.error } : {}), a11y: withDetail(`Sync conflict with ${tracker}`) };
|
|
76
76
|
break;
|
|
77
|
+
// Rows an older engine held with a blocking question: plain Tandem-only, no nag (saving never
|
|
78
|
+
// depends on the tracker; the engine rewrites them to `unsynced` on its next drain).
|
|
77
79
|
case 'needs_team':
|
|
78
|
-
badge = { text: 'Needs a team', tone: 'warn', ...(sync.error ? { detail: sync.error } : {}), a11y: withDetail(`Needs a team before it can go to ${tracker}`) };
|
|
79
|
-
break;
|
|
80
80
|
case 'needs_private_space':
|
|
81
|
-
badge = { text: '
|
|
81
|
+
badge = { text: 'Tandem only', tone: 'muted', a11y: `Only in Tandem, not sent to ${tracker}` };
|
|
82
82
|
break;
|
|
83
83
|
case 'remote_deleted': badge = { text: `Removed in ${tracker}`, tone: 'warn', a11y: `Removed in ${tracker}; kept in Tandem` }; break;
|
|
84
84
|
default:
|