@startsimpli/integrations 0.2.103 → 0.2.105
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 +5 -5
- package/src/native/__tests__/design-screens.test.tsx +97 -0
- package/src/native/__tests__/ux-polish.test.tsx +4 -2
- package/src/native/app/FoundryApp.tsx +2 -2
- package/src/native/app/__tests__/launch.test.ts +4 -1
- package/src/native/app/entity/EntityTab.tsx +13 -18
- package/src/native/app/icon.tsx +6 -1
- package/src/native/app/launch.ts +4 -0
- package/src/native/app/screens/RecordScreen.tsx +37 -30
- package/src/native/app/screens/SignInScreen.tsx +4 -3
- package/src/native/components/FoundryTabsShell.tsx +8 -5
- package/src/native/components/MoreTabList.tsx +20 -25
- package/src/native/components/NoteDetailScreen.tsx +49 -57
- package/src/native/components/NotesListScreen.tsx +13 -19
- package/src/native/components/__tests__/notes-screens.test.tsx +7 -7
- package/src/native/home/HomeScreen.tsx +15 -12
- package/src/native/recording/__tests__/recovery.test.ts +12 -0
- package/src/native/recording/recovery.ts +5 -2
- package/src/native/screens/ask/AskScreen.tsx +20 -22
- package/src/native/screens/connect-claude/ConnectClaudeScreen.tsx +68 -61
- package/src/native/screens/connections/ConnectionsScreens.tsx +46 -42
- package/src/native/screens/library/LibraryDetailScreen.tsx +35 -49
- package/src/native/screens/library/LibraryListScreen.tsx +13 -21
- package/src/native/screens/planning/PlanningScreens.tsx +49 -26
- package/src/native/tracker/TodoGlyph.tsx +11 -0
- package/src/native/tracker/TrackerDetailScreen.tsx +34 -39
- package/src/native/tracker/TrackerListScreen.tsx +28 -19
- package/src/native/tracker/__tests__/format.test.ts +3 -3
- package/src/native/tracker/format.ts +8 -7
- package/src/native/voice/format.ts +0 -3
- package/src/native/screens/shared/PressableCard.tsx +0 -14
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { DataList, Header, ListRow, StatusChip, SwipeRow,
|
|
3
|
+
import { Alert, DataList, Header, ListRow, StatusChip, SwipeRow, useTheme, type FilterGroup } from '@startsimpli/ui-native';
|
|
4
4
|
import { UNFILED_PROJECT } from '../../corpus/filing';
|
|
5
5
|
import type { Commitment } from '../../corpus/types';
|
|
6
6
|
import { useControllerState } from '../components/useControllerState';
|
|
7
7
|
import type { TrackerController, TrackerRow } from './controller';
|
|
8
|
-
import {
|
|
8
|
+
import { TodoGlyph } from './TodoGlyph';
|
|
9
|
+
import { TRACKER_VIEWS, rowParts, type TrackerView } from './format';
|
|
9
10
|
|
|
10
11
|
export interface TrackerListScreenProps {
|
|
11
12
|
controller: TrackerController;
|
|
@@ -41,27 +42,35 @@ export function TrackerListScreen({ controller, onOpen, now = Date.now }: Tracke
|
|
|
41
42
|
];
|
|
42
43
|
const isFiltered = state.filters.focusId !== null || state.filters.search.trim() !== '';
|
|
43
44
|
|
|
44
|
-
const renderRow = ({ item: row }: { item: TrackerRow }) =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
const renderRow = ({ item: row }: { item: TrackerRow }) => {
|
|
46
|
+
const parts = rowParts(row.item, titleOf(row.focusId), now());
|
|
47
|
+
const status = row.item.status;
|
|
48
|
+
return (
|
|
49
|
+
<SwipeRow
|
|
50
|
+
testID={`todo-${row.item.id}`}
|
|
51
|
+
actions={closed
|
|
52
|
+
? [{ key: 'reopen', label: 'Reopen', tone: 'neutral', onPress: () => { void controller.setStatus(row.item, 'open'); } }]
|
|
53
|
+
: [{ key: 'done', label: 'Done', tone: 'success', onPress: () => { void controller.setStatus(row.item, 'done'); } }]}
|
|
54
|
+
>
|
|
55
|
+
<ListRow
|
|
56
|
+
leading={<TodoGlyph status={status} overdue={parts.overdue} />}
|
|
57
|
+
title={row.item.title}
|
|
58
|
+
subtitle={parts.who || undefined}
|
|
59
|
+
meta={parts.due ?? undefined}
|
|
60
|
+
metaTone={parts.overdue ? 'danger' : undefined}
|
|
61
|
+
// Open is the default and needs no badge; blocked and dropped do.
|
|
62
|
+
trailing={status === 'blocked' || status === 'dropped' ? <StatusChip status={status} /> : undefined}
|
|
63
|
+
onPress={() => onOpen(row.item)}
|
|
64
|
+
/>
|
|
65
|
+
</SwipeRow>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
59
68
|
|
|
60
69
|
const subtitle = state.count !== null ? `${state.count} ${closed ? 'closed' : 'to go'}${isFiltered ? ' (filtered)' : ''}` : undefined;
|
|
61
70
|
|
|
62
71
|
return (
|
|
63
72
|
<View style={{ flex: 1 }} testID="todos-screen">
|
|
64
|
-
<Header testID="todos-header" title="To-dos" subtitle={subtitle} />
|
|
73
|
+
<Header large testID="todos-header" title="To-dos" subtitle={subtitle} />
|
|
65
74
|
<DataList<TrackerRow>
|
|
66
75
|
testID="tracker-list"
|
|
67
76
|
data={state.rows}
|
|
@@ -88,7 +97,7 @@ export function TrackerListScreen({ controller, onOpen, now = Date.now }: Tracke
|
|
|
88
97
|
noResultsTitle="No to-dos match"
|
|
89
98
|
ListHeaderComponent={state.ignoredFilters.length ? (
|
|
90
99
|
<View style={{ paddingBottom: theme.spacing.sm }}>
|
|
91
|
-
<
|
|
100
|
+
<Alert variant="notice">{`This workspace did not apply: ${state.ignoredFilters.join(', ')}. The list is not filtered by it.`}</Alert>
|
|
92
101
|
</View>
|
|
93
102
|
) : undefined}
|
|
94
103
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import { UNFILED_PROJECT } from '../../../corpus/filing';
|
|
3
|
-
import { DEFAULT_TRACKER_FILTERS, formatDue, isOverdueAt, leavesView,
|
|
3
|
+
import { DEFAULT_TRACKER_FILTERS, formatDue, isOverdueAt, leavesView, rowParts, trackerQuery } from '../format';
|
|
4
4
|
|
|
5
5
|
const NOW = Date.parse('2026-11-05T00:00:00Z');
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ describe('row text', () => {
|
|
|
40
40
|
});
|
|
41
41
|
it('subtitle joins due, owner and project', () => {
|
|
42
42
|
const item = { dueAt: '2026-11-01T00:00:00Z', status: 'open', ownerName: 'Quinn' } as never;
|
|
43
|
-
expect(
|
|
44
|
-
expect(
|
|
43
|
+
expect(rowParts(item, '287A', NOW)).toEqual({ due: 'Overdue · Nov 1', overdue: true, who: 'Quinn · 287A' });
|
|
44
|
+
expect(rowParts({ status: 'open' } as never, undefined, NOW)).toEqual({ due: null, overdue: false, who: '' });
|
|
45
45
|
});
|
|
46
46
|
});
|
|
@@ -69,12 +69,13 @@ export function statusText(status: CommitmentStatus): string {
|
|
|
69
69
|
return { open: 'Open', blocked: 'Blocked', done: 'Done', dropped: 'Dropped' }[status] ?? status;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
export function
|
|
72
|
+
/** The facts under a to-do's title, apart: when it is due (and whether that has passed) and who / which project. */
|
|
73
|
+
export function rowParts(item: Commitment, projectTitle: string | undefined, now: number): { due: string | null; overdue: boolean; who: string } {
|
|
74
74
|
const due = formatDue(item.dueAt, now);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
const overdue = isOverdueAt(item, now);
|
|
76
|
+
return {
|
|
77
|
+
due: due ? `${overdue ? 'Overdue · ' : 'Due '}${due}` : null,
|
|
78
|
+
overdue,
|
|
79
|
+
who: [item.ownerName || null, projectTitle || null].filter(Boolean).join(' · '),
|
|
80
|
+
};
|
|
80
81
|
}
|
|
@@ -31,6 +31,3 @@ export function deleteNoteMessage(status: VoiceStatus): string {
|
|
|
31
31
|
? 'The recording, transcript and summary are removed for good. To-dos taken from this note stay in your to-do list, under their projects.'
|
|
32
32
|
: 'The recording and this failed attempt are removed for good.';
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
export const statusVariant = (status: VoiceStatus) =>
|
|
36
|
-
status === 'ready' ? 'success' : status === 'failed' ? 'destructive' : 'secondary';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { Pressable } from 'react-native';
|
|
3
|
-
import { Card } from '@startsimpli/ui-native';
|
|
4
|
-
|
|
5
|
-
/** A `Card` that can be tapped. (ui-native has no pressable card yet; this wraps its `Card`.) */
|
|
6
|
-
export function PressableCard({ onPress, testID, children }: { onPress?: () => void; testID?: string; children: ReactNode }) {
|
|
7
|
-
const body = <Card>{children}</Card>;
|
|
8
|
-
if (!onPress) return <Pressable testID={testID} disabled>{body}</Pressable>;
|
|
9
|
-
return (
|
|
10
|
-
<Pressable testID={testID} accessibilityRole="button" onPress={onPress} style={({ pressed }) => ({ opacity: pressed ? 0.7 : 1 })}>
|
|
11
|
-
{body}
|
|
12
|
-
</Pressable>
|
|
13
|
-
);
|
|
14
|
-
}
|