react-native-debug-toolkit 2.2.0 → 3.0.0
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/README.md +5 -8
- package/README.zh-CN.md +5 -8
- package/bin/debug-toolkit.js +114 -0
- package/lib/commonjs/features/network/index.js +32 -12
- package/lib/commonjs/features/network/index.js.map +1 -1
- package/lib/commonjs/features/network/networkInterceptor.js +164 -201
- package/lib/commonjs/features/network/networkInterceptor.js.map +1 -1
- package/lib/commonjs/index.js +59 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/panel/DebugPanel.js +25 -0
- package/lib/commonjs/ui/panel/DebugPanel.js.map +1 -1
- package/lib/commonjs/ui/panel/FloatPanelView.js +15 -62
- package/lib/commonjs/ui/panel/FloatPanelView.js.map +1 -1
- package/lib/commonjs/ui/panel/StreamingSettingsModal.js +529 -0
- package/lib/commonjs/ui/panel/StreamingSettingsModal.js.map +1 -0
- package/lib/commonjs/ui/panel/useTabAnimation.js +71 -0
- package/lib/commonjs/ui/panel/useTabAnimation.js.map +1 -0
- package/lib/commonjs/utils/autoDetectDaemon.js +141 -0
- package/lib/commonjs/utils/autoDetectDaemon.js.map +1 -0
- package/lib/commonjs/utils/createPersistedObservableStore.js +23 -3
- package/lib/commonjs/utils/createPersistedObservableStore.js.map +1 -1
- package/lib/commonjs/utils/daemonConnection.js +81 -0
- package/lib/commonjs/utils/daemonConnection.js.map +1 -0
- package/lib/commonjs/utils/daemonSettings.js +110 -0
- package/lib/commonjs/utils/daemonSettings.js.map +1 -0
- package/lib/commonjs/utils/reportToDaemon.js +112 -0
- package/lib/commonjs/utils/reportToDaemon.js.map +1 -0
- package/lib/commonjs/utils/sessionReport.js +132 -0
- package/lib/commonjs/utils/sessionReport.js.map +1 -0
- package/lib/commonjs/utils/streamToDaemon.js +334 -0
- package/lib/commonjs/utils/streamToDaemon.js.map +1 -0
- package/lib/module/features/network/index.js +30 -12
- package/lib/module/features/network/index.js.map +1 -1
- package/lib/module/features/network/networkInterceptor.js +163 -200
- package/lib/module/features/network/networkInterceptor.js.map +1 -1
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/panel/DebugPanel.js +26 -1
- package/lib/module/ui/panel/DebugPanel.js.map +1 -1
- package/lib/module/ui/panel/FloatPanelView.js +16 -63
- package/lib/module/ui/panel/FloatPanelView.js.map +1 -1
- package/lib/module/ui/panel/StreamingSettingsModal.js +524 -0
- package/lib/module/ui/panel/StreamingSettingsModal.js.map +1 -0
- package/lib/module/ui/panel/useTabAnimation.js +67 -0
- package/lib/module/ui/panel/useTabAnimation.js.map +1 -0
- package/lib/module/utils/autoDetectDaemon.js +136 -0
- package/lib/module/utils/autoDetectDaemon.js.map +1 -0
- package/lib/module/utils/createPersistedObservableStore.js +23 -3
- package/lib/module/utils/createPersistedObservableStore.js.map +1 -1
- package/lib/module/utils/daemonConnection.js +77 -0
- package/lib/module/utils/daemonConnection.js.map +1 -0
- package/lib/module/utils/daemonSettings.js +102 -0
- package/lib/module/utils/daemonSettings.js.map +1 -0
- package/lib/module/utils/reportToDaemon.js +105 -0
- package/lib/module/utils/reportToDaemon.js.map +1 -0
- package/lib/module/utils/sessionReport.js +128 -0
- package/lib/module/utils/sessionReport.js.map +1 -0
- package/lib/module/utils/streamToDaemon.js +328 -0
- package/lib/module/utils/streamToDaemon.js.map +1 -0
- package/lib/typescript/src/features/network/index.d.ts +2 -4
- package/lib/typescript/src/features/network/index.d.ts.map +1 -1
- package/lib/typescript/src/features/network/networkInterceptor.d.ts +2 -15
- package/lib/typescript/src/features/network/networkInterceptor.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +11 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/ui/panel/DebugPanel.d.ts.map +1 -1
- package/lib/typescript/src/ui/panel/FloatPanelView.d.ts.map +1 -1
- package/lib/typescript/src/ui/panel/StreamingSettingsModal.d.ts +8 -0
- package/lib/typescript/src/ui/panel/StreamingSettingsModal.d.ts.map +1 -0
- package/lib/typescript/src/ui/panel/useTabAnimation.d.ts +14 -0
- package/lib/typescript/src/ui/panel/useTabAnimation.d.ts.map +1 -0
- package/lib/typescript/src/utils/autoDetectDaemon.d.ts +15 -0
- package/lib/typescript/src/utils/autoDetectDaemon.d.ts.map +1 -0
- package/lib/typescript/src/utils/createPersistedObservableStore.d.ts +2 -1
- package/lib/typescript/src/utils/createPersistedObservableStore.d.ts.map +1 -1
- package/lib/typescript/src/utils/daemonConnection.d.ts +18 -0
- package/lib/typescript/src/utils/daemonConnection.d.ts.map +1 -0
- package/lib/typescript/src/utils/daemonSettings.d.ts +19 -0
- package/lib/typescript/src/utils/daemonSettings.d.ts.map +1 -0
- package/lib/typescript/src/utils/reportToDaemon.d.ts +34 -0
- package/lib/typescript/src/utils/reportToDaemon.d.ts.map +1 -0
- package/lib/typescript/src/utils/sessionReport.d.ts +18 -0
- package/lib/typescript/src/utils/sessionReport.d.ts.map +1 -0
- package/lib/typescript/src/utils/streamToDaemon.d.ts +23 -0
- package/lib/typescript/src/utils/streamToDaemon.d.ts.map +1 -0
- package/node/daemon/src/cli.js +75 -0
- package/node/daemon/src/console/console.html +936 -0
- package/node/daemon/src/console/index.js +47 -0
- package/node/daemon/src/constants.js +32 -0
- package/node/daemon/src/index.js +11 -0
- package/node/daemon/src/server.js +365 -0
- package/node/daemon/src/store.js +110 -0
- package/node/mcp/src/cli.js +31 -0
- package/node/mcp/src/constants.js +13 -0
- package/node/mcp/src/daemonClient.js +132 -0
- package/node/mcp/src/httpClient.js +49 -0
- package/node/mcp/src/index.js +15 -0
- package/node/mcp/src/logs.js +95 -0
- package/node/mcp/src/server.js +144 -0
- package/node/mcp/src/tools.js +84 -0
- package/package.json +10 -5
- package/src/features/network/index.ts +35 -19
- package/src/features/network/networkInterceptor.ts +224 -236
- package/src/index.ts +15 -1
- package/src/ui/panel/DebugPanel.tsx +23 -1
- package/src/ui/panel/FloatPanelView.tsx +10 -68
- package/src/ui/panel/StreamingSettingsModal.tsx +566 -0
- package/src/ui/panel/useTabAnimation.ts +77 -0
- package/src/utils/autoDetectDaemon.ts +175 -0
- package/src/utils/createPersistedObservableStore.ts +16 -3
- package/src/utils/daemonConnection.ts +133 -0
- package/src/utils/daemonSettings.ts +134 -0
- package/src/utils/reportToDaemon.ts +172 -0
- package/src/utils/sessionReport.ts +203 -0
- package/src/utils/streamToDaemon.ts +419 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { Component, useCallback, useEffect, useRef, useState } from 'react';
|
|
4
|
-
import { View, Text, StyleSheet, Animated
|
|
4
|
+
import { View, Text, StyleSheet, Animated } from 'react-native';
|
|
5
5
|
import { getPreference, setPreference, KEYS } from '../../utils/debugPreferences';
|
|
6
6
|
import { FloatIcon } from '../floating/FloatIcon';
|
|
7
7
|
import { DebugPanel } from './DebugPanel';
|
|
8
8
|
import { FeatureTabBar } from './FeatureTabBar';
|
|
9
|
+
import { useTabAnimation } from './useTabAnimation';
|
|
9
10
|
|
|
10
11
|
// ─── Error Boundary ────────────────────────────────────
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -52,32 +53,19 @@ export function FloatPanelView({
|
|
|
52
53
|
mounted = false;
|
|
53
54
|
};
|
|
54
55
|
}, []);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// Swipe-to-switch responder
|
|
69
|
-
const swipeResponder = useRef(PanResponder.create({
|
|
70
|
-
onStartShouldSetPanResponder: () => false,
|
|
71
|
-
onMoveShouldSetPanResponder: (_, gs) => {
|
|
72
|
-
if (isSwitchingTab.current) return false;
|
|
73
|
-
return Math.abs(gs.dx) > 25 && Math.abs(gs.dx) > Math.abs(gs.dy) * 2.5;
|
|
74
|
-
},
|
|
75
|
-
onPanResponderRelease: (_, gs) => {
|
|
76
|
-
const tab = activeTabRef.current;
|
|
77
|
-
if (gs.dx < -40 && tab < featuresLengthRef.current - 1) switchTabRef.current(tab + 1);else if (gs.dx > 40 && tab > 0) switchTabRef.current(tab - 1);
|
|
78
|
-
},
|
|
79
|
-
onPanResponderTerminationRequest: () => true
|
|
80
|
-
})).current;
|
|
56
|
+
const {
|
|
57
|
+
contentOpacity,
|
|
58
|
+
contentTranslateX,
|
|
59
|
+
panHandlers,
|
|
60
|
+
switchTab
|
|
61
|
+
} = useTabAnimation({
|
|
62
|
+
activeTab,
|
|
63
|
+
tabCount: features.length,
|
|
64
|
+
onTabChange: useCallback(index => {
|
|
65
|
+
setActiveTab(index);
|
|
66
|
+
setPreference(KEYS.lastTab, String(index));
|
|
67
|
+
}, [])
|
|
68
|
+
});
|
|
81
69
|
|
|
82
70
|
// Feature subscription → re-render on data changes
|
|
83
71
|
const [, setTick] = useState(0);
|
|
@@ -103,41 +91,6 @@ export function FloatPanelView({
|
|
|
103
91
|
}
|
|
104
92
|
}, [features.length, activeTab]);
|
|
105
93
|
|
|
106
|
-
// Tab switching with content animation
|
|
107
|
-
const switchTab = useCallback(index => {
|
|
108
|
-
if (isSwitchingTab.current || index === activeTabRef.current) return;
|
|
109
|
-
isSwitchingTab.current = true;
|
|
110
|
-
const direction = index > activeTabRef.current ? 1 : -1;
|
|
111
|
-
Animated.parallel([Animated.timing(contentOpacity, {
|
|
112
|
-
toValue: 0,
|
|
113
|
-
duration: 80,
|
|
114
|
-
useNativeDriver: true
|
|
115
|
-
}), Animated.timing(contentTranslateX, {
|
|
116
|
-
toValue: -direction * 40,
|
|
117
|
-
duration: 80,
|
|
118
|
-
useNativeDriver: true
|
|
119
|
-
})]).start(() => {
|
|
120
|
-
setActiveTab(index);
|
|
121
|
-
setPreference(KEYS.lastTab, String(index));
|
|
122
|
-
contentTranslateX.setValue(direction * 40);
|
|
123
|
-
Animated.parallel([Animated.timing(contentOpacity, {
|
|
124
|
-
toValue: 1,
|
|
125
|
-
duration: 150,
|
|
126
|
-
useNativeDriver: true
|
|
127
|
-
}), Animated.timing(contentTranslateX, {
|
|
128
|
-
toValue: 0,
|
|
129
|
-
duration: 200,
|
|
130
|
-
easing: Easing.out(Easing.cubic),
|
|
131
|
-
useNativeDriver: true
|
|
132
|
-
})]).start(() => {
|
|
133
|
-
isSwitchingTab.current = false;
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}, [contentOpacity, contentTranslateX]);
|
|
137
|
-
|
|
138
|
-
// Keep ref in sync
|
|
139
|
-
switchTabRef.current = switchTab;
|
|
140
|
-
|
|
141
94
|
// Badge (first feature that returns one)
|
|
142
95
|
const envBadge = features.map(f => f.badge?.()).find(b => b != null) ?? null;
|
|
143
96
|
const tabs = features.map(f => ({
|
|
@@ -195,7 +148,7 @@ export function FloatPanelView({
|
|
|
195
148
|
translateX: contentTranslateX
|
|
196
149
|
}]
|
|
197
150
|
}],
|
|
198
|
-
...
|
|
151
|
+
...panHandlers,
|
|
199
152
|
children: renderFeatureContent()
|
|
200
153
|
})]
|
|
201
154
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","useCallback","useEffect","useRef","useState","View","Text","StyleSheet","Animated","
|
|
1
|
+
{"version":3,"names":["React","Component","useCallback","useEffect","useRef","useState","View","Text","StyleSheet","Animated","getPreference","setPreference","KEYS","FloatIcon","DebugPanel","FeatureTabBar","useTabAnimation","jsx","_jsx","jsxs","_jsxs","DebugErrorBoundary","state","hasError","getDerivedStateFromError","componentDidCatch","error","info","console","componentStack","props","onError","render","children","FloatPanelView","features","panelOpen","onOpenPanel","onClosePanel","onClearAll","activeTab","setActiveTab","tabLoaded","mounted","lastTab","then","val","idx","parseInt","isNaN","current","contentOpacity","contentTranslateX","panHandlers","switchTab","tabCount","length","onTabChange","index","String","setTick","refreshQueued","scheduleRefresh","requestAnimationFrame","t","unsubs","map","f","subscribe","filter","u","forEach","envBadge","badge","find","b","tabs","label","id","name","renderFeatureContent","style","styles","emptyText","feature","snapshot","getSnapshot","TabComponent","renderContent","genericContent","jsonContent","JSON","stringify","container","pointerEvents","visible","onPress","onClose","activeIndex","onSelectTab","contentContainer","opacity","transform","translateX","create","position","top","left","right","bottom","zIndex","flex","padding","textAlign","color","fontSize","fontFamily"],"sourceRoot":"../../../../src","sources":["ui/panel/FloatPanelView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAClF,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,QAAQ,QACH,cAAc;AAErB,SAASC,aAAa,EAAEC,aAAa,EAAEC,IAAI,QAAQ,8BAA8B;AACjF,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAE/C,SAASC,eAAe,QAAQ,mBAAmB;;AAEnD;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAKA,MAAMC,kBAAkB,SAASpB,SAAS,CAGxC;EACAqB,KAAK,GAAuB;IAAEC,QAAQ,EAAE;EAAM,CAAC;EAE/C,OAAOC,wBAAwBA,CAAA,EAAuB;IACpD,OAAO;MAAED,QAAQ,EAAE;IAAK,CAAC;EAC3B;EAEAE,iBAAiBA,CAACC,KAAY,EAAEC,IAAqB,EAAE;IACrDC,OAAO,CAACF,KAAK,CAAC,+BAA+B,EAAEA,KAAK,EAAEC,IAAI,CAACE,cAAc,CAAC;IAC1E,IAAI,CAACC,KAAK,CAACC,OAAO,CAAC,CAAC;EACtB;EAEAC,MAAMA,CAAA,EAAG;IACP,IAAI,IAAI,CAACV,KAAK,CAACC,QAAQ,EAAE,OAAO,IAAI;IACpC,OAAO,IAAI,CAACO,KAAK,CAACG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|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { KeyboardAvoidingView, Modal, Platform, ScrollView, View, Text, TextInput, TouchableOpacity, StyleSheet, Pressable } from 'react-native';
|
|
5
|
+
import { Colors } from '../theme/colors';
|
|
6
|
+
import { buildDeviceDaemonEndpoint, loadDaemonSettings, normalizeDaemonSettings, saveDaemonSettings } from '../../utils/daemonSettings';
|
|
7
|
+
import { checkDaemonConnection } from '../../utils/daemonConnection';
|
|
8
|
+
import { getDefaultDaemonEndpoint, reportDebugSessionToDaemon } from '../../utils/reportToDaemon';
|
|
9
|
+
import { autoDetectDaemonIp, getMetroHost } from '../../utils/autoDetectDaemon';
|
|
10
|
+
import { startStreaming, stopStreaming, isStreaming } from '../../utils/streamToDaemon';
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
const CONNECTION_TIMEOUT_MS = 2000;
|
|
13
|
+
function formatConnectionFailure() {
|
|
14
|
+
return 'Cannot reach desktop. Try /health in phone browser.';
|
|
15
|
+
}
|
|
16
|
+
export function StreamingSettingsModal({
|
|
17
|
+
visible,
|
|
18
|
+
onClose
|
|
19
|
+
}) {
|
|
20
|
+
const inputRef = useRef(null);
|
|
21
|
+
const [mode, setMode] = useState('simulator');
|
|
22
|
+
const [deviceHost, setDeviceHost] = useState('');
|
|
23
|
+
const [streaming, setStreaming] = useState(isStreaming());
|
|
24
|
+
const [syncState, setSyncState] = useState(isStreaming() ? 'running' : 'idle');
|
|
25
|
+
const [message, setMessage] = useState(null);
|
|
26
|
+
const [sending, setSending] = useState(false);
|
|
27
|
+
const [detecting, setDetecting] = useState(false);
|
|
28
|
+
const handleDeviceHostChange = useCallback(value => {
|
|
29
|
+
setDeviceHost(value);
|
|
30
|
+
if (syncState === 'failed') {
|
|
31
|
+
setSyncState('idle');
|
|
32
|
+
}
|
|
33
|
+
setMessage(null);
|
|
34
|
+
}, [syncState]);
|
|
35
|
+
const detectDeviceHost = useCallback(async () => {
|
|
36
|
+
setDetecting(true);
|
|
37
|
+
setMessage('Detecting desktop...');
|
|
38
|
+
const result = await autoDetectDaemonIp({
|
|
39
|
+
timeoutMs: 800,
|
|
40
|
+
scanSubnets: false
|
|
41
|
+
});
|
|
42
|
+
setDetecting(false);
|
|
43
|
+
if (result.ip) {
|
|
44
|
+
setDeviceHost(current => current.trim() ? current : result.ip || current);
|
|
45
|
+
setMessage(`Detected desktop at ${buildDeviceDaemonEndpoint(result.ip)}.`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
setMessage('Enter your Mac IP, or open /health on the phone browser to verify reachability.');
|
|
49
|
+
}, []);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (visible) {
|
|
52
|
+
loadDaemonSettings().then(settings => {
|
|
53
|
+
setMode(settings.mode);
|
|
54
|
+
const savedHost = settings.deviceHost;
|
|
55
|
+
if (settings.mode === 'device' && !savedHost) {
|
|
56
|
+
const metroHost = getMetroHost();
|
|
57
|
+
if (metroHost) {
|
|
58
|
+
setDeviceHost(metroHost);
|
|
59
|
+
} else {
|
|
60
|
+
detectDeviceHost();
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
setDeviceHost(savedHost);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}, [detectDeviceHost, visible]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
const active = isStreaming();
|
|
70
|
+
setStreaming(active);
|
|
71
|
+
setSyncState(active ? 'running' : 'idle');
|
|
72
|
+
}, [visible]);
|
|
73
|
+
const getSettings = useCallback(() => ({
|
|
74
|
+
mode,
|
|
75
|
+
endpoint: '',
|
|
76
|
+
deviceHost,
|
|
77
|
+
token: ''
|
|
78
|
+
}), [deviceHost, mode]);
|
|
79
|
+
const validateSettings = useCallback(() => {
|
|
80
|
+
if (mode === 'device' && !deviceHost.trim()) {
|
|
81
|
+
setMessage('Enter your Mac IP first.');
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}, [deviceHost, mode]);
|
|
86
|
+
const handleModeChange = useCallback(nextMode => {
|
|
87
|
+
setMode(nextMode);
|
|
88
|
+
if (nextMode === 'device' && !deviceHost) {
|
|
89
|
+
const metroHost = getMetroHost();
|
|
90
|
+
if (metroHost) {
|
|
91
|
+
setDeviceHost(metroHost);
|
|
92
|
+
} else {
|
|
93
|
+
detectDeviceHost();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, [detectDeviceHost, deviceHost]);
|
|
97
|
+
const toggleLiveSync = useCallback(async () => {
|
|
98
|
+
if (streaming) {
|
|
99
|
+
stopStreaming();
|
|
100
|
+
setStreaming(false);
|
|
101
|
+
setSyncState('idle');
|
|
102
|
+
setMessage(null);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (!validateSettings()) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const settings = getSettings();
|
|
109
|
+
const daemonOptions = normalizeDaemonSettings(settings);
|
|
110
|
+
setMessage('Checking desktop connection...');
|
|
111
|
+
setSyncState('connecting');
|
|
112
|
+
await saveDaemonSettings(settings);
|
|
113
|
+
const connection = await checkDaemonConnection({
|
|
114
|
+
...daemonOptions,
|
|
115
|
+
timeoutMs: CONNECTION_TIMEOUT_MS
|
|
116
|
+
});
|
|
117
|
+
if (!connection.ok) {
|
|
118
|
+
setStreaming(false);
|
|
119
|
+
setSyncState('failed');
|
|
120
|
+
setMessage(formatConnectionFailure());
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
startStreaming({
|
|
124
|
+
...daemonOptions,
|
|
125
|
+
timeoutMs: 3000,
|
|
126
|
+
onStatus: status => {
|
|
127
|
+
if (status.state === 'connected') {
|
|
128
|
+
setSyncState('connected');
|
|
129
|
+
setMessage(null);
|
|
130
|
+
} else if (status.state === 'retrying') {
|
|
131
|
+
setSyncState('retrying');
|
|
132
|
+
setMessage('Desktop not reachable. Retrying...');
|
|
133
|
+
} else if (status.state === 'failed') {
|
|
134
|
+
setStreaming(false);
|
|
135
|
+
setSyncState('failed');
|
|
136
|
+
setMessage(status.reason === 'auth' ? 'Desktop token rejected.' : 'Desktop not reachable after multiple retries.');
|
|
137
|
+
} else {
|
|
138
|
+
setSyncState('connecting');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
setStreaming(true);
|
|
143
|
+
}, [getSettings, streaming, validateSettings]);
|
|
144
|
+
const sendOnce = useCallback(async () => {
|
|
145
|
+
if (!validateSettings()) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const settings = getSettings();
|
|
149
|
+
const daemonOptions = normalizeDaemonSettings(settings);
|
|
150
|
+
setSending(true);
|
|
151
|
+
setMessage('Checking desktop connection...');
|
|
152
|
+
await saveDaemonSettings(settings);
|
|
153
|
+
try {
|
|
154
|
+
const connection = await checkDaemonConnection({
|
|
155
|
+
...daemonOptions,
|
|
156
|
+
timeoutMs: CONNECTION_TIMEOUT_MS
|
|
157
|
+
});
|
|
158
|
+
if (!connection.ok) {
|
|
159
|
+
setMessage(formatConnectionFailure());
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
setMessage('Sending logs...');
|
|
163
|
+
const result = await reportDebugSessionToDaemon({
|
|
164
|
+
...daemonOptions,
|
|
165
|
+
timeoutMs: 2000
|
|
166
|
+
});
|
|
167
|
+
if (result.ok) {
|
|
168
|
+
const totalLogs = Object.values(result.logCount ?? {}).reduce((total, count) => total + count, 0);
|
|
169
|
+
setMessage(`Sent ${totalLogs} logs.`);
|
|
170
|
+
} else {
|
|
171
|
+
setMessage(result.error ? `Send failed: ${result.error}` : 'Send failed.');
|
|
172
|
+
}
|
|
173
|
+
} finally {
|
|
174
|
+
setSending(false);
|
|
175
|
+
}
|
|
176
|
+
}, [getSettings, validateSettings]);
|
|
177
|
+
const target = mode === 'device' ? buildDeviceDaemonEndpoint(deviceHost) || 'Enter Mac IP' : getDefaultDaemonEndpoint();
|
|
178
|
+
const canConnect = mode === 'simulator' || Boolean(deviceHost.trim());
|
|
179
|
+
const connecting = !streaming && syncState === 'connecting';
|
|
180
|
+
const busy = detecting || sending || connecting;
|
|
181
|
+
const statusTitle = detecting ? 'Checking' : sending ? 'Checking' : connecting ? 'Checking' : streaming && syncState === 'connected' ? 'Live sync connected' : streaming && syncState === 'retrying' ? 'Retrying desktop sync' : syncState === 'failed' ? 'Failed' : streaming ? 'Live sync running' : mode === 'device' && !deviceHost.trim() ? 'Enter Mac IP' : 'Ready';
|
|
182
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
183
|
+
visible: visible,
|
|
184
|
+
transparent: true,
|
|
185
|
+
animationType: "fade",
|
|
186
|
+
onRequestClose: onClose,
|
|
187
|
+
children: /*#__PURE__*/_jsx(KeyboardAvoidingView, {
|
|
188
|
+
style: styles.keyboardAvoiding,
|
|
189
|
+
behavior: Platform.OS === 'ios' ? 'padding' : undefined,
|
|
190
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
191
|
+
style: styles.backdrop,
|
|
192
|
+
onPress: onClose,
|
|
193
|
+
children: /*#__PURE__*/_jsxs(Pressable, {
|
|
194
|
+
style: styles.sheet,
|
|
195
|
+
onPress: e => e.stopPropagation(),
|
|
196
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
197
|
+
style: styles.handle
|
|
198
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
199
|
+
style: styles.header,
|
|
200
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
201
|
+
style: styles.title,
|
|
202
|
+
children: "Desktop Logs"
|
|
203
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
204
|
+
onPress: onClose,
|
|
205
|
+
style: styles.closeButton,
|
|
206
|
+
activeOpacity: 0.7,
|
|
207
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
208
|
+
style: styles.closeButtonText,
|
|
209
|
+
children: "Close"
|
|
210
|
+
})
|
|
211
|
+
})]
|
|
212
|
+
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
213
|
+
keyboardShouldPersistTaps: "handled",
|
|
214
|
+
showsVerticalScrollIndicator: false,
|
|
215
|
+
contentContainerStyle: styles.scrollContent,
|
|
216
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
217
|
+
style: styles.statusCard,
|
|
218
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
219
|
+
style: [styles.statusDot, streaming ? styles.dotActive : styles.dotInactive]
|
|
220
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
221
|
+
style: styles.statusCopy,
|
|
222
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
223
|
+
style: styles.statusTitle,
|
|
224
|
+
children: statusTitle
|
|
225
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
226
|
+
style: styles.statusTarget,
|
|
227
|
+
numberOfLines: 1,
|
|
228
|
+
children: target
|
|
229
|
+
})]
|
|
230
|
+
})]
|
|
231
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
232
|
+
style: styles.section,
|
|
233
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
234
|
+
style: styles.label,
|
|
235
|
+
children: "Connection"
|
|
236
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
237
|
+
style: styles.segment,
|
|
238
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
239
|
+
style: [styles.segmentButton, mode === 'simulator' && styles.segmentButtonActive],
|
|
240
|
+
onPress: () => handleModeChange('simulator'),
|
|
241
|
+
disabled: streaming,
|
|
242
|
+
activeOpacity: 0.7,
|
|
243
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
244
|
+
style: [styles.segmentText, mode === 'simulator' && styles.segmentTextActive],
|
|
245
|
+
children: "Simulator"
|
|
246
|
+
})
|
|
247
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
248
|
+
style: [styles.segmentButton, mode === 'device' && styles.segmentButtonActive],
|
|
249
|
+
onPress: () => handleModeChange('device'),
|
|
250
|
+
disabled: streaming,
|
|
251
|
+
activeOpacity: 0.7,
|
|
252
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
253
|
+
style: [styles.segmentText, mode === 'device' && styles.segmentTextActive],
|
|
254
|
+
children: "Real device"
|
|
255
|
+
})
|
|
256
|
+
})]
|
|
257
|
+
})]
|
|
258
|
+
}), mode === 'device' ? /*#__PURE__*/_jsx(View, {
|
|
259
|
+
style: styles.section,
|
|
260
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
261
|
+
style: styles.inputRow,
|
|
262
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
263
|
+
style: styles.inputLabel,
|
|
264
|
+
children: "Mac IP"
|
|
265
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
266
|
+
ref: inputRef,
|
|
267
|
+
style: styles.input,
|
|
268
|
+
value: deviceHost,
|
|
269
|
+
onChangeText: handleDeviceHostChange,
|
|
270
|
+
placeholder: "192.168.1.10",
|
|
271
|
+
placeholderTextColor: Colors.textLight,
|
|
272
|
+
autoCapitalize: "none",
|
|
273
|
+
autoCorrect: false,
|
|
274
|
+
keyboardType: "numbers-and-punctuation",
|
|
275
|
+
returnKeyType: "done",
|
|
276
|
+
onSubmitEditing: () => inputRef.current?.blur(),
|
|
277
|
+
editable: !streaming
|
|
278
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
279
|
+
style: [styles.detectButton, (streaming || busy) && styles.buttonDisabled],
|
|
280
|
+
onPress: detectDeviceHost,
|
|
281
|
+
disabled: streaming || busy,
|
|
282
|
+
activeOpacity: 0.7,
|
|
283
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
284
|
+
style: styles.detectButtonText,
|
|
285
|
+
children: detecting ? '...' : 'Detect'
|
|
286
|
+
})
|
|
287
|
+
})]
|
|
288
|
+
})
|
|
289
|
+
}) : null, message ? /*#__PURE__*/_jsx(Text, {
|
|
290
|
+
style: styles.message,
|
|
291
|
+
children: message
|
|
292
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
293
|
+
style: styles.actions,
|
|
294
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
295
|
+
style: [styles.primaryButton, (!canConnect || busy) && styles.buttonDisabled],
|
|
296
|
+
onPress: toggleLiveSync,
|
|
297
|
+
disabled: !canConnect || busy,
|
|
298
|
+
activeOpacity: 0.75,
|
|
299
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
300
|
+
style: styles.primaryButtonText,
|
|
301
|
+
children: streaming ? 'Stop Live Sync' : busy ? 'Checking...' : 'Start Live Sync'
|
|
302
|
+
})
|
|
303
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
304
|
+
style: [styles.secondaryButton, (!canConnect || busy) && styles.buttonDisabled],
|
|
305
|
+
onPress: sendOnce,
|
|
306
|
+
disabled: !canConnect || busy,
|
|
307
|
+
activeOpacity: 0.75,
|
|
308
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
309
|
+
style: styles.secondaryButtonText,
|
|
310
|
+
children: sending ? 'Sending...' : 'Send Once'
|
|
311
|
+
})
|
|
312
|
+
})]
|
|
313
|
+
})]
|
|
314
|
+
})]
|
|
315
|
+
})
|
|
316
|
+
})
|
|
317
|
+
})
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
const styles = StyleSheet.create({
|
|
321
|
+
keyboardAvoiding: {
|
|
322
|
+
flex: 1
|
|
323
|
+
},
|
|
324
|
+
backdrop: {
|
|
325
|
+
flex: 1,
|
|
326
|
+
backgroundColor: 'rgba(0,0,0,0.4)',
|
|
327
|
+
justifyContent: 'flex-end'
|
|
328
|
+
},
|
|
329
|
+
sheet: {
|
|
330
|
+
backgroundColor: Colors.surface,
|
|
331
|
+
borderTopLeftRadius: 20,
|
|
332
|
+
borderTopRightRadius: 20,
|
|
333
|
+
paddingHorizontal: 20,
|
|
334
|
+
paddingTop: 12,
|
|
335
|
+
paddingBottom: 20,
|
|
336
|
+
maxHeight: '82%'
|
|
337
|
+
},
|
|
338
|
+
handle: {
|
|
339
|
+
width: 40,
|
|
340
|
+
height: 4,
|
|
341
|
+
borderRadius: 2,
|
|
342
|
+
backgroundColor: Colors.textLight,
|
|
343
|
+
alignSelf: 'center',
|
|
344
|
+
marginBottom: 16
|
|
345
|
+
},
|
|
346
|
+
header: {
|
|
347
|
+
flexDirection: 'row',
|
|
348
|
+
alignItems: 'center',
|
|
349
|
+
justifyContent: 'space-between',
|
|
350
|
+
marginBottom: 14
|
|
351
|
+
},
|
|
352
|
+
title: {
|
|
353
|
+
fontSize: 18,
|
|
354
|
+
fontWeight: '600',
|
|
355
|
+
color: Colors.text
|
|
356
|
+
},
|
|
357
|
+
closeButton: {
|
|
358
|
+
paddingHorizontal: 4,
|
|
359
|
+
paddingVertical: 4
|
|
360
|
+
},
|
|
361
|
+
closeButtonText: {
|
|
362
|
+
fontSize: 14,
|
|
363
|
+
fontWeight: '500',
|
|
364
|
+
color: Colors.primary
|
|
365
|
+
},
|
|
366
|
+
scrollContent: {
|
|
367
|
+
paddingBottom: 4
|
|
368
|
+
},
|
|
369
|
+
statusCard: {
|
|
370
|
+
flexDirection: 'row',
|
|
371
|
+
alignItems: 'center',
|
|
372
|
+
gap: 10,
|
|
373
|
+
padding: 12,
|
|
374
|
+
borderRadius: 8,
|
|
375
|
+
backgroundColor: Colors.background,
|
|
376
|
+
borderWidth: 1,
|
|
377
|
+
borderColor: Colors.border,
|
|
378
|
+
marginBottom: 16
|
|
379
|
+
},
|
|
380
|
+
statusCopy: {
|
|
381
|
+
flex: 1
|
|
382
|
+
},
|
|
383
|
+
statusTitle: {
|
|
384
|
+
fontSize: 14,
|
|
385
|
+
fontWeight: '600',
|
|
386
|
+
color: Colors.text
|
|
387
|
+
},
|
|
388
|
+
statusTarget: {
|
|
389
|
+
marginTop: 2,
|
|
390
|
+
fontSize: 12,
|
|
391
|
+
color: Colors.textLight,
|
|
392
|
+
fontFamily: 'Courier'
|
|
393
|
+
},
|
|
394
|
+
section: {
|
|
395
|
+
marginBottom: 14
|
|
396
|
+
},
|
|
397
|
+
label: {
|
|
398
|
+
fontSize: 13,
|
|
399
|
+
fontWeight: '500',
|
|
400
|
+
color: Colors.textSecondary,
|
|
401
|
+
marginBottom: 6
|
|
402
|
+
},
|
|
403
|
+
segment: {
|
|
404
|
+
flexDirection: 'row',
|
|
405
|
+
padding: 3,
|
|
406
|
+
borderRadius: 10,
|
|
407
|
+
backgroundColor: Colors.background,
|
|
408
|
+
borderWidth: 1,
|
|
409
|
+
borderColor: Colors.border
|
|
410
|
+
},
|
|
411
|
+
segmentButton: {
|
|
412
|
+
flex: 1,
|
|
413
|
+
alignItems: 'center',
|
|
414
|
+
paddingVertical: 9,
|
|
415
|
+
borderRadius: 7
|
|
416
|
+
},
|
|
417
|
+
segmentButtonActive: {
|
|
418
|
+
backgroundColor: Colors.surface,
|
|
419
|
+
borderWidth: 1,
|
|
420
|
+
borderColor: Colors.primary
|
|
421
|
+
},
|
|
422
|
+
segmentText: {
|
|
423
|
+
fontSize: 13,
|
|
424
|
+
fontWeight: '500',
|
|
425
|
+
color: Colors.textSecondary
|
|
426
|
+
},
|
|
427
|
+
segmentTextActive: {
|
|
428
|
+
color: Colors.primary,
|
|
429
|
+
fontWeight: '600'
|
|
430
|
+
},
|
|
431
|
+
inputRow: {
|
|
432
|
+
flexDirection: 'row',
|
|
433
|
+
alignItems: 'center',
|
|
434
|
+
gap: 8
|
|
435
|
+
},
|
|
436
|
+
inputLabel: {
|
|
437
|
+
width: 50,
|
|
438
|
+
fontSize: 13,
|
|
439
|
+
fontWeight: '600',
|
|
440
|
+
color: Colors.textSecondary
|
|
441
|
+
},
|
|
442
|
+
input: {
|
|
443
|
+
flex: 1,
|
|
444
|
+
backgroundColor: Colors.background,
|
|
445
|
+
borderWidth: 1,
|
|
446
|
+
borderColor: Colors.border,
|
|
447
|
+
borderRadius: 8,
|
|
448
|
+
paddingHorizontal: 12,
|
|
449
|
+
paddingVertical: 10,
|
|
450
|
+
fontSize: 14,
|
|
451
|
+
color: Colors.text,
|
|
452
|
+
fontFamily: 'Courier'
|
|
453
|
+
},
|
|
454
|
+
detectButton: {
|
|
455
|
+
minWidth: 68,
|
|
456
|
+
alignItems: 'center',
|
|
457
|
+
justifyContent: 'center',
|
|
458
|
+
paddingHorizontal: 10,
|
|
459
|
+
paddingVertical: 10,
|
|
460
|
+
borderRadius: 8,
|
|
461
|
+
backgroundColor: Colors.surface,
|
|
462
|
+
borderWidth: 1,
|
|
463
|
+
borderColor: Colors.primary
|
|
464
|
+
},
|
|
465
|
+
detectButtonText: {
|
|
466
|
+
color: Colors.primary,
|
|
467
|
+
fontSize: 13,
|
|
468
|
+
fontWeight: '600'
|
|
469
|
+
},
|
|
470
|
+
statusDot: {
|
|
471
|
+
width: 8,
|
|
472
|
+
height: 8,
|
|
473
|
+
borderRadius: 4
|
|
474
|
+
},
|
|
475
|
+
dotActive: {
|
|
476
|
+
backgroundColor: Colors.success
|
|
477
|
+
},
|
|
478
|
+
dotInactive: {
|
|
479
|
+
backgroundColor: Colors.textLight
|
|
480
|
+
},
|
|
481
|
+
message: {
|
|
482
|
+
fontSize: 12,
|
|
483
|
+
lineHeight: 17,
|
|
484
|
+
color: Colors.textSecondary,
|
|
485
|
+
marginBottom: 12
|
|
486
|
+
},
|
|
487
|
+
actions: {
|
|
488
|
+
flexDirection: 'row',
|
|
489
|
+
gap: 10,
|
|
490
|
+
marginTop: 4
|
|
491
|
+
},
|
|
492
|
+
primaryButton: {
|
|
493
|
+
flex: 1,
|
|
494
|
+
alignItems: 'center',
|
|
495
|
+
justifyContent: 'center',
|
|
496
|
+
paddingVertical: 11,
|
|
497
|
+
borderRadius: 10,
|
|
498
|
+
backgroundColor: Colors.primary
|
|
499
|
+
},
|
|
500
|
+
primaryButtonText: {
|
|
501
|
+
color: '#fff',
|
|
502
|
+
fontSize: 14,
|
|
503
|
+
fontWeight: '600'
|
|
504
|
+
},
|
|
505
|
+
secondaryButton: {
|
|
506
|
+
flex: 1,
|
|
507
|
+
alignItems: 'center',
|
|
508
|
+
justifyContent: 'center',
|
|
509
|
+
paddingVertical: 11,
|
|
510
|
+
borderRadius: 10,
|
|
511
|
+
backgroundColor: Colors.background,
|
|
512
|
+
borderWidth: 1,
|
|
513
|
+
borderColor: Colors.border
|
|
514
|
+
},
|
|
515
|
+
secondaryButtonText: {
|
|
516
|
+
color: Colors.primary,
|
|
517
|
+
fontSize: 14,
|
|
518
|
+
fontWeight: '600'
|
|
519
|
+
},
|
|
520
|
+
buttonDisabled: {
|
|
521
|
+
opacity: 0.5
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
//# sourceMappingURL=StreamingSettingsModal.js.map
|