react-native-debug-toolkit 3.3.8 → 3.5.1

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.
Files changed (223) hide show
  1. package/README.md +40 -26
  2. package/README.zh-CN.md +52 -38
  3. package/android/src/main/java/com/reactnativedebugtoolkit/DebugToolkitNativeLogsModule.java +146 -0
  4. package/android/src/main/java/com/reactnativedebugtoolkit/ReactNativeDebugToolkitPackage.java +5 -3
  5. package/ios/DebugToolkitNativeLogs.mm +92 -0
  6. package/lib/commonjs/constants/logLevels.js +19 -0
  7. package/lib/commonjs/constants/logLevels.js.map +1 -0
  8. package/lib/commonjs/core/initialize.js +32 -19
  9. package/lib/commonjs/core/initialize.js.map +1 -1
  10. package/lib/commonjs/features/console/ConsoleLogTab.js +4 -15
  11. package/lib/commonjs/features/console/ConsoleLogTab.js.map +1 -1
  12. package/lib/commonjs/features/console/index.js +15 -8
  13. package/lib/commonjs/features/console/index.js.map +1 -1
  14. package/lib/commonjs/features/nativeLogs/NativeLogTab.js +156 -0
  15. package/lib/commonjs/features/nativeLogs/NativeLogTab.js.map +1 -0
  16. package/lib/commonjs/features/nativeLogs/index.js +97 -0
  17. package/lib/commonjs/features/nativeLogs/index.js.map +1 -0
  18. package/lib/commonjs/features/nativeLogs/nativeLogsBridge.js +71 -0
  19. package/lib/commonjs/features/nativeLogs/nativeLogsBridge.js.map +1 -0
  20. package/lib/commonjs/features/network/NetworkLogTab.js +90 -95
  21. package/lib/commonjs/features/network/NetworkLogTab.js.map +1 -1
  22. package/lib/commonjs/features/network/index.js +7 -4
  23. package/lib/commonjs/features/network/index.js.map +1 -1
  24. package/lib/commonjs/features/sessionHistory/SessionHistoryTab.js +1046 -0
  25. package/lib/commonjs/features/sessionHistory/SessionHistoryTab.js.map +1 -0
  26. package/lib/commonjs/features/sessionHistory/index.js +104 -0
  27. package/lib/commonjs/features/sessionHistory/index.js.map +1 -0
  28. package/lib/commonjs/features/track/index.js +4 -3
  29. package/lib/commonjs/features/track/index.js.map +1 -1
  30. package/lib/commonjs/index.js +27 -0
  31. package/lib/commonjs/index.js.map +1 -1
  32. package/lib/commonjs/ui/DebugView.js +2 -0
  33. package/lib/commonjs/ui/DebugView.js.map +1 -1
  34. package/lib/commonjs/ui/panel/DebugPanel.js +67 -34
  35. package/lib/commonjs/ui/panel/DebugPanel.js.map +1 -1
  36. package/lib/commonjs/ui/panel/FeatureIntroCard.js +151 -0
  37. package/lib/commonjs/ui/panel/FeatureIntroCard.js.map +1 -0
  38. package/lib/commonjs/ui/panel/FeatureRail.js +163 -0
  39. package/lib/commonjs/ui/panel/FeatureRail.js.map +1 -0
  40. package/lib/commonjs/ui/panel/FloatPanelView.js +119 -22
  41. package/lib/commonjs/ui/panel/FloatPanelView.js.map +1 -1
  42. package/lib/commonjs/ui/panel/buildFeatureSummary.js +207 -0
  43. package/lib/commonjs/ui/panel/buildFeatureSummary.js.map +1 -0
  44. package/lib/commonjs/ui/panel/filterFeatureSnapshot.js +43 -0
  45. package/lib/commonjs/ui/panel/filterFeatureSnapshot.js.map +1 -0
  46. package/lib/commonjs/ui/theme/colors.js +6 -0
  47. package/lib/commonjs/ui/theme/colors.js.map +1 -1
  48. package/lib/commonjs/utils/DaemonClient.js +30 -8
  49. package/lib/commonjs/utils/DaemonClient.js.map +1 -1
  50. package/lib/commonjs/utils/SessionManager.js +132 -0
  51. package/lib/commonjs/utils/SessionManager.js.map +1 -0
  52. package/lib/commonjs/utils/StorageAdapter.js +104 -0
  53. package/lib/commonjs/utils/StorageAdapter.js.map +1 -0
  54. package/lib/commonjs/utils/createChannelFeature.js +22 -5
  55. package/lib/commonjs/utils/createChannelFeature.js.map +1 -1
  56. package/lib/commonjs/utils/createPersistedObservableStore.js +14 -8
  57. package/lib/commonjs/utils/createPersistedObservableStore.js.map +1 -1
  58. package/lib/commonjs/utils/debugPreferences.js +28 -5
  59. package/lib/commonjs/utils/debugPreferences.js.map +1 -1
  60. package/lib/commonjs/utils/deviceReport.js +5 -1
  61. package/lib/commonjs/utils/deviceReport.js.map +1 -1
  62. package/lib/commonjs/utils/logRuntime.js +32 -0
  63. package/lib/commonjs/utils/logRuntime.js.map +1 -0
  64. package/lib/module/constants/logLevels.js +15 -0
  65. package/lib/module/constants/logLevels.js.map +1 -0
  66. package/lib/module/core/initialize.js +32 -19
  67. package/lib/module/core/initialize.js.map +1 -1
  68. package/lib/module/features/console/ConsoleLogTab.js +1 -12
  69. package/lib/module/features/console/ConsoleLogTab.js.map +1 -1
  70. package/lib/module/features/console/index.js +15 -8
  71. package/lib/module/features/console/index.js.map +1 -1
  72. package/lib/module/features/nativeLogs/NativeLogTab.js +151 -0
  73. package/lib/module/features/nativeLogs/NativeLogTab.js.map +1 -0
  74. package/lib/module/features/nativeLogs/index.js +91 -0
  75. package/lib/module/features/nativeLogs/index.js.map +1 -0
  76. package/lib/module/features/nativeLogs/nativeLogsBridge.js +63 -0
  77. package/lib/module/features/nativeLogs/nativeLogsBridge.js.map +1 -0
  78. package/lib/module/features/network/NetworkLogTab.js +90 -95
  79. package/lib/module/features/network/NetworkLogTab.js.map +1 -1
  80. package/lib/module/features/network/index.js +7 -4
  81. package/lib/module/features/network/index.js.map +1 -1
  82. package/lib/module/features/sessionHistory/SessionHistoryTab.js +1041 -0
  83. package/lib/module/features/sessionHistory/SessionHistoryTab.js.map +1 -0
  84. package/lib/module/features/sessionHistory/index.js +100 -0
  85. package/lib/module/features/sessionHistory/index.js.map +1 -0
  86. package/lib/module/features/track/index.js +4 -3
  87. package/lib/module/features/track/index.js.map +1 -1
  88. package/lib/module/index.js +3 -0
  89. package/lib/module/index.js.map +1 -1
  90. package/lib/module/ui/DebugView.js +2 -0
  91. package/lib/module/ui/DebugView.js.map +1 -1
  92. package/lib/module/ui/panel/DebugPanel.js +67 -34
  93. package/lib/module/ui/panel/DebugPanel.js.map +1 -1
  94. package/lib/module/ui/panel/FeatureIntroCard.js +146 -0
  95. package/lib/module/ui/panel/FeatureIntroCard.js.map +1 -0
  96. package/lib/module/ui/panel/FeatureRail.js +158 -0
  97. package/lib/module/ui/panel/FeatureRail.js.map +1 -0
  98. package/lib/module/ui/panel/FloatPanelView.js +119 -22
  99. package/lib/module/ui/panel/FloatPanelView.js.map +1 -1
  100. package/lib/module/ui/panel/buildFeatureSummary.js +203 -0
  101. package/lib/module/ui/panel/buildFeatureSummary.js.map +1 -0
  102. package/lib/module/ui/panel/filterFeatureSnapshot.js +39 -0
  103. package/lib/module/ui/panel/filterFeatureSnapshot.js.map +1 -0
  104. package/lib/module/ui/theme/colors.js +6 -0
  105. package/lib/module/ui/theme/colors.js.map +1 -1
  106. package/lib/module/utils/DaemonClient.js +30 -8
  107. package/lib/module/utils/DaemonClient.js.map +1 -1
  108. package/lib/module/utils/SessionManager.js +127 -0
  109. package/lib/module/utils/SessionManager.js.map +1 -0
  110. package/lib/module/utils/StorageAdapter.js +96 -0
  111. package/lib/module/utils/StorageAdapter.js.map +1 -0
  112. package/lib/module/utils/createChannelFeature.js +22 -5
  113. package/lib/module/utils/createChannelFeature.js.map +1 -1
  114. package/lib/module/utils/createPersistedObservableStore.js +14 -8
  115. package/lib/module/utils/createPersistedObservableStore.js.map +1 -1
  116. package/lib/module/utils/debugPreferences.js +27 -5
  117. package/lib/module/utils/debugPreferences.js.map +1 -1
  118. package/lib/module/utils/deviceReport.js +4 -1
  119. package/lib/module/utils/deviceReport.js.map +1 -1
  120. package/lib/module/utils/logRuntime.js +26 -0
  121. package/lib/module/utils/logRuntime.js.map +1 -0
  122. package/lib/typescript/src/constants/logLevels.d.ts +3 -0
  123. package/lib/typescript/src/constants/logLevels.d.ts.map +1 -0
  124. package/lib/typescript/src/core/initialize.d.ts +6 -0
  125. package/lib/typescript/src/core/initialize.d.ts.map +1 -1
  126. package/lib/typescript/src/features/console/ConsoleLogTab.d.ts.map +1 -1
  127. package/lib/typescript/src/features/console/index.d.ts +2 -1
  128. package/lib/typescript/src/features/console/index.d.ts.map +1 -1
  129. package/lib/typescript/src/features/nativeLogs/NativeLogTab.d.ts +4 -0
  130. package/lib/typescript/src/features/nativeLogs/NativeLogTab.d.ts.map +1 -0
  131. package/lib/typescript/src/features/nativeLogs/index.d.ts +12 -0
  132. package/lib/typescript/src/features/nativeLogs/index.d.ts.map +1 -0
  133. package/lib/typescript/src/features/nativeLogs/nativeLogsBridge.d.ts +11 -0
  134. package/lib/typescript/src/features/nativeLogs/nativeLogsBridge.d.ts.map +1 -0
  135. package/lib/typescript/src/features/network/NetworkLogTab.d.ts.map +1 -1
  136. package/lib/typescript/src/features/network/index.d.ts +2 -1
  137. package/lib/typescript/src/features/network/index.d.ts.map +1 -1
  138. package/lib/typescript/src/features/sessionHistory/SessionHistoryTab.d.ts +20 -0
  139. package/lib/typescript/src/features/sessionHistory/SessionHistoryTab.d.ts.map +1 -0
  140. package/lib/typescript/src/features/sessionHistory/index.d.ts +4 -0
  141. package/lib/typescript/src/features/sessionHistory/index.d.ts.map +1 -0
  142. package/lib/typescript/src/features/track/index.d.ts +2 -1
  143. package/lib/typescript/src/features/track/index.d.ts.map +1 -1
  144. package/lib/typescript/src/index.d.ts +7 -1
  145. package/lib/typescript/src/index.d.ts.map +1 -1
  146. package/lib/typescript/src/types/feature.d.ts +1 -1
  147. package/lib/typescript/src/types/feature.d.ts.map +1 -1
  148. package/lib/typescript/src/types/index.d.ts +3 -1
  149. package/lib/typescript/src/types/index.d.ts.map +1 -1
  150. package/lib/typescript/src/types/logs.d.ts +15 -0
  151. package/lib/typescript/src/types/logs.d.ts.map +1 -1
  152. package/lib/typescript/src/ui/DebugView.d.ts.map +1 -1
  153. package/lib/typescript/src/ui/panel/DebugPanel.d.ts +3 -1
  154. package/lib/typescript/src/ui/panel/DebugPanel.d.ts.map +1 -1
  155. package/lib/typescript/src/ui/panel/FeatureIntroCard.d.ts +14 -0
  156. package/lib/typescript/src/ui/panel/FeatureIntroCard.d.ts.map +1 -0
  157. package/lib/typescript/src/ui/panel/FeatureRail.d.ts +16 -0
  158. package/lib/typescript/src/ui/panel/FeatureRail.d.ts.map +1 -0
  159. package/lib/typescript/src/ui/panel/FloatPanelView.d.ts.map +1 -1
  160. package/lib/typescript/src/ui/panel/buildFeatureSummary.d.ts +13 -0
  161. package/lib/typescript/src/ui/panel/buildFeatureSummary.d.ts.map +1 -0
  162. package/lib/typescript/src/ui/panel/filterFeatureSnapshot.d.ts +3 -0
  163. package/lib/typescript/src/ui/panel/filterFeatureSnapshot.d.ts.map +1 -0
  164. package/lib/typescript/src/ui/theme/colors.d.ts +5 -0
  165. package/lib/typescript/src/ui/theme/colors.d.ts.map +1 -1
  166. package/lib/typescript/src/utils/DaemonClient.d.ts +7 -1
  167. package/lib/typescript/src/utils/DaemonClient.d.ts.map +1 -1
  168. package/lib/typescript/src/utils/SessionManager.d.ts +30 -0
  169. package/lib/typescript/src/utils/SessionManager.d.ts.map +1 -0
  170. package/lib/typescript/src/utils/StorageAdapter.d.ts +38 -0
  171. package/lib/typescript/src/utils/StorageAdapter.d.ts.map +1 -0
  172. package/lib/typescript/src/utils/createChannelFeature.d.ts +2 -0
  173. package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -1
  174. package/lib/typescript/src/utils/createPersistedObservableStore.d.ts +4 -1
  175. package/lib/typescript/src/utils/createPersistedObservableStore.d.ts.map +1 -1
  176. package/lib/typescript/src/utils/debugPreferences.d.ts +1 -3
  177. package/lib/typescript/src/utils/debugPreferences.d.ts.map +1 -1
  178. package/lib/typescript/src/utils/deviceReport.d.ts +1 -0
  179. package/lib/typescript/src/utils/deviceReport.d.ts.map +1 -1
  180. package/lib/typescript/src/utils/logRuntime.d.ts +13 -0
  181. package/lib/typescript/src/utils/logRuntime.d.ts.map +1 -0
  182. package/node/daemon/src/console/console.html +18 -0
  183. package/node/mcp/src/logs.js +1 -1
  184. package/package.json +9 -1
  185. package/src/constants/logLevels.ts +13 -0
  186. package/src/core/initialize.ts +54 -25
  187. package/src/features/console/ConsoleLogTab.tsx +1 -14
  188. package/src/features/console/index.ts +18 -8
  189. package/src/features/nativeLogs/NativeLogTab.tsx +66 -0
  190. package/src/features/nativeLogs/index.ts +94 -0
  191. package/src/features/nativeLogs/nativeLogsBridge.ts +51 -0
  192. package/src/features/network/NetworkLogTab.tsx +60 -71
  193. package/src/features/network/index.ts +12 -3
  194. package/src/features/sessionHistory/SessionHistoryTab.tsx +693 -0
  195. package/src/features/sessionHistory/index.ts +102 -0
  196. package/src/features/track/index.ts +10 -3
  197. package/src/index.ts +16 -0
  198. package/src/types/feature.ts +3 -1
  199. package/src/types/index.ts +13 -0
  200. package/src/types/logs.ts +17 -0
  201. package/src/ui/DebugView.tsx +2 -0
  202. package/src/ui/panel/DebugPanel.tsx +60 -30
  203. package/src/ui/panel/FeatureIntroCard.tsx +147 -0
  204. package/src/ui/panel/FeatureRail.tsx +165 -0
  205. package/src/ui/panel/FloatPanelView.tsx +123 -15
  206. package/src/ui/panel/buildFeatureSummary.ts +288 -0
  207. package/src/ui/panel/filterFeatureSnapshot.ts +51 -0
  208. package/src/ui/theme/colors.ts +7 -0
  209. package/src/utils/DaemonClient.ts +33 -5
  210. package/src/utils/SessionManager.ts +174 -0
  211. package/src/utils/StorageAdapter.ts +135 -0
  212. package/src/utils/createChannelFeature.ts +28 -6
  213. package/src/utils/createPersistedObservableStore.ts +18 -10
  214. package/src/utils/debugPreferences.ts +38 -7
  215. package/src/utils/deviceReport.ts +5 -1
  216. package/src/utils/logRuntime.ts +39 -0
  217. package/lib/commonjs/ui/panel/FeatureTabBar.js +0 -182
  218. package/lib/commonjs/ui/panel/FeatureTabBar.js.map +0 -1
  219. package/lib/module/ui/panel/FeatureTabBar.js +0 -177
  220. package/lib/module/ui/panel/FeatureTabBar.js.map +0 -1
  221. package/lib/typescript/src/ui/panel/FeatureTabBar.d.ts +0 -13
  222. package/lib/typescript/src/ui/panel/FeatureTabBar.d.ts.map +0 -1
  223. package/src/ui/panel/FeatureTabBar.tsx +0 -204
@@ -0,0 +1,1046 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SessionHistoryTab = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _colors = require("../../ui/theme/colors");
10
+ var _CollapsibleSection = require("../../ui/shared/CollapsibleSection");
11
+ var _JsonView = require("../../ui/shared/JsonView");
12
+ var _CopyButton = require("../../ui/shared/CopyButton");
13
+ var _LogListScreen = require("../../ui/shared/LogListScreen");
14
+ var _safeStringify = require("../../utils/safeStringify");
15
+ var _copyToComputer = require("../../utils/copyToComputer");
16
+ var _logLevels = require("../../constants/logLevels");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
+ // ── Types ──────────────────────────────────────────────────────────────
20
+
21
+ // ── Constants ──────────────────────────────────────────────────────────
22
+
23
+ const FEATURE_LABELS = {
24
+ console_logs: 'Console',
25
+ network_logs: 'Network',
26
+ native_logs: 'Native',
27
+ track_logs: 'Track'
28
+ };
29
+ const FEATURE_COLORS = {
30
+ console_logs: _colors.Colors.info,
31
+ network_logs: _colors.Colors.success,
32
+ native_logs: '#FF9500',
33
+ track_logs: _colors.Colors.purple
34
+ };
35
+ const FEATURE_KEYS = Object.keys(FEATURE_LABELS);
36
+
37
+ // ── Helpers ────────────────────────────────────────────────────────────
38
+
39
+ function relativeTime(ts) {
40
+ const diff = Date.now() - ts;
41
+ const mins = Math.floor(diff / 60000);
42
+ if (mins < 1) return 'Just now';
43
+ if (mins < 60) return `${mins}m ago`;
44
+ const hours = Math.floor(mins / 60);
45
+ if (hours < 24) return `${hours}h ago`;
46
+ const days = Math.floor(hours / 24);
47
+ if (days === 1) return 'Yesterday';
48
+ if (days < 7) return `${days}d ago`;
49
+ return new Date(ts).toLocaleDateString(undefined, {
50
+ month: 'short',
51
+ day: 'numeric'
52
+ });
53
+ }
54
+ function formatTime(ts) {
55
+ return new Date(ts).toLocaleTimeString(undefined, {
56
+ hour: '2-digit',
57
+ minute: '2-digit'
58
+ });
59
+ }
60
+ function formatFullDate(ts) {
61
+ const d = new Date(ts);
62
+ const now = new Date();
63
+ const isToday = d.toDateString() === now.toDateString();
64
+ const time = d.toLocaleTimeString(undefined, {
65
+ hour: '2-digit',
66
+ minute: '2-digit',
67
+ second: '2-digit'
68
+ });
69
+ if (isToday) return `Today ${time}`;
70
+ return d.toLocaleDateString(undefined, {
71
+ month: 'short',
72
+ day: 'numeric'
73
+ }) + ' ' + time;
74
+ }
75
+ function totalCounts(counts) {
76
+ return (counts.console_logs ?? 0) + (counts.network_logs ?? 0) + (counts.track_logs ?? 0);
77
+ }
78
+ function totalLogs(logs) {
79
+ return Object.values(logs).reduce((sum, arr) => sum + arr.length, 0);
80
+ }
81
+ function shortId(id) {
82
+ return id.slice(-6).toUpperCase();
83
+ }
84
+ function flattenLogs(logs, filter) {
85
+ const keys = filter === 'all' ? ['console_logs', 'network_logs', 'track_logs'] : [filter];
86
+ const entries = [];
87
+ for (const key of keys) {
88
+ const items = logs[key] ?? [];
89
+ items.forEach((raw, i) => {
90
+ const e = raw;
91
+ entries.push({
92
+ id: `${key}-${i}`,
93
+ type: key,
94
+ timestamp: e.timestamp ?? 0,
95
+ raw
96
+ });
97
+ });
98
+ }
99
+ entries.sort((a, b) => b.timestamp - a.timestamp);
100
+ return entries;
101
+ }
102
+ function toRecord(entry) {
103
+ return entry.raw;
104
+ }
105
+ function shortenUrl(url) {
106
+ try {
107
+ const u = new URL(url);
108
+ return u.pathname + u.search;
109
+ } catch {
110
+ return url;
111
+ }
112
+ }
113
+
114
+ // ── Main Tab ───────────────────────────────────────────────────────────
115
+
116
+ const SessionHistoryTab = exports.SessionHistoryTab = /*#__PURE__*/_react.default.memo(({
117
+ snapshot,
118
+ feature
119
+ }) => {
120
+ const {
121
+ sessions,
122
+ currentSessionId,
123
+ loading,
124
+ selectedSession,
125
+ logCounts
126
+ } = snapshot;
127
+ const handleSelectSession = (0, _react.useCallback)(session => {
128
+ if (session.id === currentSessionId) return;
129
+ feature.loadSession(session.id);
130
+ }, [feature, currentSessionId]);
131
+ const handleBack = (0, _react.useCallback)(() => {
132
+ feature.loadSession(null);
133
+ }, [feature]);
134
+ if (loading) {
135
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
136
+ style: s.center,
137
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
138
+ color: _colors.Colors.primary
139
+ })
140
+ });
141
+ }
142
+ if (selectedSession) {
143
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SessionDetail, {
144
+ logs: selectedSession.logs,
145
+ sessionId: selectedSession.sessionId,
146
+ onBack: handleBack
147
+ });
148
+ }
149
+ const previousSessions = sessions.filter(s => s.id !== currentSessionId);
150
+ const currentSession = sessions.find(s => s.id === currentSessionId);
151
+ if (previousSessions.length === 0) {
152
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
153
+ style: s.center,
154
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
155
+ style: s.emptyClock,
156
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
157
+ style: s.emptyClockText,
158
+ children: "\u23F1"
159
+ })
160
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
161
+ style: s.emptyTitle,
162
+ children: "No session history"
163
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
164
+ style: s.emptySub,
165
+ children: "Previous sessions will appear here after you restart the app."
166
+ })]
167
+ });
168
+ }
169
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
170
+ style: s.container,
171
+ contentContainerStyle: s.scrollContent,
172
+ children: [currentSession && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
173
+ style: s.currentCard,
174
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
175
+ style: s.currentRow,
176
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
177
+ style: s.pulseDot
178
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
179
+ style: s.currentLabel,
180
+ children: "CURRENT"
181
+ })]
182
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
183
+ style: s.currentTime,
184
+ children: formatFullDate(currentSession.startedAt)
185
+ })]
186
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
187
+ style: s.timelineSection,
188
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
189
+ style: s.timelineHeader,
190
+ children: "PREVIOUS SESSIONS"
191
+ }), previousSessions.map((session, idx) => {
192
+ const counts = logCounts[session.id];
193
+ const total = counts ? totalCounts(counts) : 0;
194
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
195
+ style: s.timelineRow,
196
+ onPress: () => handleSelectSession(session),
197
+ android_ripple: {
198
+ color: 'rgba(0,0,0,0.04)'
199
+ },
200
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
201
+ style: s.railCol,
202
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
203
+ style: s.railDot
204
+ }), idx < previousSessions.length - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
205
+ style: s.railLine
206
+ })]
207
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
208
+ style: s.historyCard,
209
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
210
+ style: s.cardTop,
211
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
212
+ style: s.cardTime,
213
+ children: formatTime(session.startedAt)
214
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
215
+ style: s.cardRelative,
216
+ children: relativeTime(session.startedAt)
217
+ })]
218
+ }), counts && total > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
219
+ style: s.pillRow,
220
+ children: FEATURE_KEYS.map(key => {
221
+ const c = counts[key] ?? 0;
222
+ if (c === 0) return null;
223
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
224
+ style: [s.pill, {
225
+ backgroundColor: FEATURE_COLORS[key] + '18'
226
+ }],
227
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
228
+ style: [s.pillDot, {
229
+ backgroundColor: FEATURE_COLORS[key]
230
+ }]
231
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
232
+ style: [s.pillText, {
233
+ color: FEATURE_COLORS[key]
234
+ }],
235
+ children: [c, " ", FEATURE_LABELS[key]]
236
+ })]
237
+ }, key);
238
+ })
239
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
240
+ style: s.cardEmpty,
241
+ children: "No logs recorded"
242
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
243
+ style: s.cardFooter,
244
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
245
+ style: s.cardId,
246
+ children: ["#", shortId(session.id)]
247
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
248
+ style: s.cardChevron,
249
+ children: "\u203A"
250
+ })]
251
+ })]
252
+ })]
253
+ }, session.id);
254
+ })]
255
+ })]
256
+ });
257
+ });
258
+
259
+ // ── Session Detail (uses LogListScreen for tap-to-detail) ──────────────
260
+
261
+ const SessionDetail = /*#__PURE__*/_react.default.memo(({
262
+ logs,
263
+ sessionId,
264
+ onBack
265
+ }) => {
266
+ const [filter, setFilter] = (0, _react.useState)('all');
267
+ const total = totalLogs(logs);
268
+ const flatEntries = (0, _react.useMemo)(() => flattenLogs(logs, filter), [logs, filter]);
269
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
270
+ style: s.container,
271
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
272
+ style: s.sessionHeader,
273
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
274
+ onPress: onBack,
275
+ hitSlop: 12,
276
+ style: s.headerBackBtn,
277
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
278
+ style: s.headerArrow,
279
+ children: "\u2039"
280
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
281
+ style: s.headerBackLabel,
282
+ children: "Sessions"
283
+ })]
284
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
285
+ style: s.headerMeta,
286
+ children: ["#", shortId(sessionId)]
287
+ })]
288
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LogListScreen.LogListScreen, {
289
+ data: flatEntries,
290
+ reversed: false,
291
+ emptyText: filter === 'all' ? 'No logs in this session' : `No ${FEATURE_LABELS[filter]} logs`,
292
+ renderListHeader: () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
293
+ style: s.filterBar,
294
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterChip, {
295
+ label: "All",
296
+ count: total,
297
+ active: filter === 'all',
298
+ onPress: () => setFilter('all'),
299
+ color: _colors.Colors.text
300
+ }), FEATURE_KEYS.map(key => {
301
+ const c = (logs[key] ?? []).length;
302
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterChip, {
303
+ label: FEATURE_LABELS[key],
304
+ count: c,
305
+ active: filter === key,
306
+ onPress: () => setFilter(key),
307
+ color: FEATURE_COLORS[key]
308
+ }, key);
309
+ })]
310
+ }),
311
+ renderRow: item => /*#__PURE__*/(0, _jsxRuntime.jsx)(LogRow, {
312
+ entry: item
313
+ }),
314
+ renderDetailHeader: item => /*#__PURE__*/(0, _jsxRuntime.jsx)(LogDetailHeader, {
315
+ entry: item
316
+ }),
317
+ renderDetailBody: item => /*#__PURE__*/(0, _jsxRuntime.jsx)(LogDetailBody, {
318
+ entry: item
319
+ })
320
+ })]
321
+ });
322
+ });
323
+
324
+ // ── Filter Chips ───────────────────────────────────────────────────────
325
+
326
+ const FilterChip = /*#__PURE__*/_react.default.memo(({
327
+ label,
328
+ count,
329
+ active,
330
+ onPress,
331
+ color
332
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
333
+ onPress: onPress,
334
+ style: [s.chip, active && {
335
+ backgroundColor: color
336
+ }],
337
+ hitSlop: 4,
338
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
339
+ style: [s.chipLabel, active && s.chipLabelActive],
340
+ children: [label, " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
341
+ style: [s.chipCount, active && s.chipCountActive],
342
+ children: count
343
+ })]
344
+ })
345
+ }));
346
+
347
+ // ── Log List Row ───────────────────────────────────────────────────────
348
+
349
+ const LogRow = /*#__PURE__*/_react.default.memo(({
350
+ entry
351
+ }) => {
352
+ const e = toRecord(entry);
353
+ if (entry.type === 'console_logs') {
354
+ const level = e.level ?? 'log';
355
+ const msg = Array.isArray(e.data) ? e.data.map(d => typeof d === 'string' ? d : (0, _safeStringify.safeStringify)(d)).join(' ') : (0, _safeStringify.safeStringify)(e.data);
356
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
357
+ style: s.rowContent,
358
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
359
+ style: [s.levelDot, {
360
+ backgroundColor: _logLevels.LEVEL_COLORS[level] ?? '#8E8E93'
361
+ }],
362
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
363
+ style: s.levelIcon,
364
+ children: _logLevels.LEVEL_ICONS[level] ?? '●'
365
+ })
366
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
367
+ style: s.rowBody,
368
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
369
+ style: s.rowMsg,
370
+ numberOfLines: 2,
371
+ children: msg
372
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
373
+ style: s.rowTime,
374
+ children: new Date(e.timestamp).toLocaleTimeString()
375
+ })]
376
+ })]
377
+ });
378
+ }
379
+ if (entry.type === 'network_logs') {
380
+ const method = e.request?.method ?? '?';
381
+ const url = e.request?.url ?? '';
382
+ const status = e.response?.status;
383
+ const ok = !e.error && (!status || status < 400);
384
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
385
+ style: s.rowContent,
386
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
387
+ style: [s.statusBar, {
388
+ backgroundColor: ok ? _colors.Colors.success : _colors.Colors.error
389
+ }]
390
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
391
+ style: s.rowBody,
392
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
393
+ style: s.rowMeta,
394
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
395
+ style: [s.methodText, {
396
+ color: (0, _colors.getMethodColor)(method)
397
+ }],
398
+ children: method
399
+ }), status != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
400
+ style: [s.miniPill, {
401
+ backgroundColor: ok ? _colors.Colors.success : _colors.Colors.error
402
+ }],
403
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
404
+ style: s.miniPillText,
405
+ children: status
406
+ })
407
+ })]
408
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
409
+ style: [s.rowMsg, !ok && {
410
+ color: _colors.Colors.error
411
+ }],
412
+ numberOfLines: 1,
413
+ children: shortenUrl(url)
414
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
415
+ style: s.rowTime,
416
+ children: new Date(e.timestamp).toLocaleTimeString()
417
+ })]
418
+ })]
419
+ });
420
+ }
421
+
422
+ // track_logs
423
+ const name = e.eventName ?? e.action ?? 'Event';
424
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
425
+ style: s.rowContent,
426
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
427
+ style: s.trackDot
428
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
429
+ style: s.rowBody,
430
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
431
+ style: s.rowMsg,
432
+ numberOfLines: 1,
433
+ children: name
434
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
435
+ style: s.rowTime,
436
+ children: e.timestamp ? new Date(e.timestamp).toLocaleTimeString() : ''
437
+ })]
438
+ })]
439
+ });
440
+ });
441
+
442
+ // ── Log Detail Header ──────────────────────────────────────────────────
443
+
444
+ const LogDetailHeader = /*#__PURE__*/_react.default.memo(({
445
+ entry
446
+ }) => {
447
+ const e = toRecord(entry);
448
+ if (entry.type === 'console_logs') {
449
+ const level = e.level ?? 'log';
450
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
451
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
452
+ style: [s.levelBadge, {
453
+ backgroundColor: _logLevels.LEVEL_COLORS[level] ?? '#8E8E93'
454
+ }],
455
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
456
+ style: s.levelBadgeText,
457
+ children: level.toUpperCase()
458
+ })
459
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
460
+ style: s.detailTimestamp,
461
+ children: new Date(e.timestamp).toLocaleString()
462
+ })]
463
+ });
464
+ }
465
+ if (entry.type === 'network_logs') {
466
+ const method = e.request?.method ?? '?';
467
+ const status = e.response?.status;
468
+ const ok = !e.error && (!status || status < 400);
469
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
470
+ style: s.networkHeaderBadges,
471
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
472
+ style: [s.methodBadge, {
473
+ backgroundColor: (0, _colors.getMethodColor)(method)
474
+ }],
475
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
476
+ style: s.methodBadgeText,
477
+ children: method
478
+ })
479
+ }), status != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
480
+ style: [s.statusPill, {
481
+ backgroundColor: ok ? _colors.Colors.success : _colors.Colors.error
482
+ }],
483
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
484
+ style: s.statusPillText,
485
+ children: status
486
+ })
487
+ }), e.duration != null && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
488
+ style: s.durationText,
489
+ children: [e.duration, "ms"]
490
+ })]
491
+ });
492
+ }
493
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
494
+ style: s.detailTimestamp,
495
+ children: new Date(e.timestamp).toLocaleString()
496
+ });
497
+ });
498
+
499
+ // ── Log Detail Body ────────────────────────────────────────────────────
500
+
501
+ const LogDetailBody = /*#__PURE__*/_react.default.memo(({
502
+ entry
503
+ }) => {
504
+ const e = toRecord(entry);
505
+ if (entry.type === 'console_logs') {
506
+ const data = Array.isArray(e.data) ? e.data : [e.data];
507
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
508
+ style: s.detailBody,
509
+ contentContainerStyle: s.detailBodyContent,
510
+ children: data.map((d, i) => {
511
+ const formatted = typeof d === 'object' && d !== null ? (0, _copyToComputer.fmt)(d) : String(d);
512
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
513
+ title: typeof d === 'object' && d !== null ? `Arg ${i + 1} (object)` : `Arg ${i + 1}`,
514
+ initiallyExpanded: i === 0,
515
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
516
+ style: s.sectionWithCopy,
517
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
518
+ text: formatted,
519
+ label: `Arg ${i + 1}`
520
+ }), typeof d === 'object' && d !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
521
+ data: d,
522
+ maxHeight: 250
523
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
524
+ style: s.plainText,
525
+ selectable: true,
526
+ children: String(d)
527
+ })]
528
+ })
529
+ }, i);
530
+ })
531
+ });
532
+ }
533
+ if (entry.type === 'network_logs') {
534
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
535
+ style: s.detailBody,
536
+ contentContainerStyle: s.detailBodyContent,
537
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
538
+ style: s.urlCard,
539
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
540
+ style: s.urlText,
541
+ selectable: true,
542
+ numberOfLines: 3,
543
+ children: e.request?.url
544
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
545
+ text: e.request?.url ?? '',
546
+ label: "URL"
547
+ })]
548
+ }), e.error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
549
+ style: s.errorBox,
550
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
551
+ style: s.errorIcon,
552
+ children: "\u26A0"
553
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
554
+ style: s.errorText,
555
+ children: e.error
556
+ })]
557
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
558
+ title: "Request Body",
559
+ initiallyExpanded: true,
560
+ children: e.request?.body != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
561
+ style: s.sectionWithCopy,
562
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
563
+ text: (0, _copyToComputer.fmt)(e.request.body),
564
+ label: "Request Body"
565
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
566
+ data: e.request.body,
567
+ maxHeight: 250
568
+ })]
569
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
570
+ style: s.emptySection,
571
+ children: "No request body"
572
+ })
573
+ }), e.request?.headers && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
574
+ title: "Request Headers",
575
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
576
+ style: s.sectionWithCopy,
577
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
578
+ text: (0, _copyToComputer.fmt)(e.request.headers),
579
+ label: "Request Headers"
580
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
581
+ data: e.request.headers,
582
+ maxHeight: 200
583
+ })]
584
+ })
585
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
586
+ title: "Response Body",
587
+ initiallyExpanded: true,
588
+ children: e.response?.data != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
589
+ style: s.sectionWithCopy,
590
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
591
+ text: (0, _copyToComputer.fmt)(e.response.data),
592
+ label: "Response Body"
593
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
594
+ data: e.response.data,
595
+ maxHeight: 300
596
+ })]
597
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
598
+ style: s.emptySection,
599
+ children: "No response body"
600
+ })
601
+ }), e.response?.headers && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
602
+ title: "Response Headers",
603
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
604
+ style: s.sectionWithCopy,
605
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
606
+ text: (0, _copyToComputer.fmt)(e.response.headers),
607
+ label: "Response Headers"
608
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
609
+ data: e.response.headers,
610
+ maxHeight: 200
611
+ })]
612
+ })
613
+ })]
614
+ });
615
+ }
616
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
617
+ style: s.detailBody,
618
+ contentContainerStyle: s.detailBodyContent,
619
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
620
+ style: s.sectionWithCopy,
621
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
622
+ text: (0, _copyToComputer.fmt)(entry.raw),
623
+ label: "Event"
624
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
625
+ data: entry.raw,
626
+ maxHeight: 400
627
+ })]
628
+ })
629
+ });
630
+ });
631
+
632
+ // ── Styles ─────────────────────────────────────────────────────────────
633
+
634
+ const s = _reactNative.StyleSheet.create({
635
+ container: {
636
+ flex: 1,
637
+ backgroundColor: _colors.Colors.background
638
+ },
639
+ scrollContent: {
640
+ paddingTop: 12,
641
+ paddingBottom: 60
642
+ },
643
+ // Center (loading / empty)
644
+ center: {
645
+ flex: 1,
646
+ justifyContent: 'center',
647
+ alignItems: 'center',
648
+ backgroundColor: _colors.Colors.background,
649
+ padding: 32
650
+ },
651
+ emptyClock: {
652
+ width: 64,
653
+ height: 64,
654
+ borderRadius: 32,
655
+ backgroundColor: _colors.Colors.surface,
656
+ alignItems: 'center',
657
+ justifyContent: 'center',
658
+ borderWidth: 1,
659
+ borderColor: _colors.Colors.border,
660
+ marginBottom: 16
661
+ },
662
+ emptyClockText: {
663
+ fontSize: 28
664
+ },
665
+ emptyTitle: {
666
+ fontSize: 17,
667
+ fontWeight: '600',
668
+ color: _colors.Colors.text,
669
+ marginBottom: 6
670
+ },
671
+ emptySub: {
672
+ fontSize: 14,
673
+ color: _colors.Colors.textSecondary,
674
+ textAlign: 'center',
675
+ lineHeight: 20
676
+ },
677
+ // Current session
678
+ currentCard: {
679
+ backgroundColor: _colors.Colors.primary,
680
+ marginHorizontal: 16,
681
+ borderRadius: 14,
682
+ padding: 16,
683
+ marginBottom: 20
684
+ },
685
+ currentRow: {
686
+ flexDirection: 'row',
687
+ alignItems: 'center',
688
+ marginBottom: 6
689
+ },
690
+ pulseDot: {
691
+ width: 8,
692
+ height: 8,
693
+ borderRadius: 4,
694
+ backgroundColor: '#4CD964',
695
+ marginRight: 8
696
+ },
697
+ currentLabel: {
698
+ fontSize: 11,
699
+ fontWeight: '700',
700
+ color: 'rgba(255,255,255,0.7)',
701
+ letterSpacing: 0.8
702
+ },
703
+ currentTime: {
704
+ fontSize: 15,
705
+ color: '#FFFFFF',
706
+ fontWeight: '500'
707
+ },
708
+ // Timeline
709
+ timelineSection: {
710
+ paddingHorizontal: 16
711
+ },
712
+ timelineHeader: {
713
+ fontSize: 11,
714
+ fontWeight: '700',
715
+ color: _colors.Colors.textLight,
716
+ letterSpacing: 0.8,
717
+ marginBottom: 12
718
+ },
719
+ timelineRow: {
720
+ flexDirection: 'row'
721
+ },
722
+ railCol: {
723
+ width: 24,
724
+ alignItems: 'center',
725
+ paddingTop: 14
726
+ },
727
+ railDot: {
728
+ width: 10,
729
+ height: 10,
730
+ borderRadius: 5,
731
+ backgroundColor: _colors.Colors.surface,
732
+ borderWidth: 2,
733
+ borderColor: _colors.Colors.textLight,
734
+ zIndex: 1
735
+ },
736
+ railLine: {
737
+ width: 2,
738
+ flex: 1,
739
+ backgroundColor: _colors.Colors.border,
740
+ marginTop: -1
741
+ },
742
+ historyCard: {
743
+ flex: 1,
744
+ backgroundColor: _colors.Colors.surface,
745
+ borderRadius: 12,
746
+ padding: 14,
747
+ marginBottom: 10,
748
+ marginLeft: 8
749
+ },
750
+ cardTop: {
751
+ flexDirection: 'row',
752
+ alignItems: 'baseline',
753
+ justifyContent: 'space-between',
754
+ marginBottom: 8
755
+ },
756
+ cardTime: {
757
+ fontSize: 15,
758
+ fontWeight: '600',
759
+ color: _colors.Colors.text
760
+ },
761
+ cardRelative: {
762
+ fontSize: 13,
763
+ color: _colors.Colors.textSecondary
764
+ },
765
+ cardEmpty: {
766
+ fontSize: 13,
767
+ color: _colors.Colors.textLight,
768
+ marginBottom: 4
769
+ },
770
+ pillRow: {
771
+ flexDirection: 'row',
772
+ flexWrap: 'wrap',
773
+ gap: 6,
774
+ marginBottom: 8
775
+ },
776
+ pill: {
777
+ flexDirection: 'row',
778
+ alignItems: 'center',
779
+ paddingHorizontal: 8,
780
+ paddingVertical: 3,
781
+ borderRadius: 6
782
+ },
783
+ pillDot: {
784
+ width: 6,
785
+ height: 6,
786
+ borderRadius: 3,
787
+ marginRight: 5
788
+ },
789
+ pillText: {
790
+ fontSize: 12,
791
+ fontWeight: '600'
792
+ },
793
+ cardFooter: {
794
+ flexDirection: 'row',
795
+ justifyContent: 'space-between',
796
+ alignItems: 'center',
797
+ marginTop: 4
798
+ },
799
+ cardId: {
800
+ fontSize: 11,
801
+ color: _colors.Colors.textLight,
802
+ fontFamily: 'Courier',
803
+ fontWeight: '500'
804
+ },
805
+ cardChevron: {
806
+ fontSize: 20,
807
+ color: _colors.Colors.textLight,
808
+ fontWeight: '400'
809
+ },
810
+ // ── Session detail header ──
811
+ sessionHeader: {
812
+ flexDirection: 'row',
813
+ alignItems: 'center',
814
+ justifyContent: 'space-between',
815
+ paddingHorizontal: 16,
816
+ paddingVertical: 10,
817
+ backgroundColor: _colors.Colors.surface,
818
+ borderBottomWidth: _reactNative.StyleSheet.hairlineWidth,
819
+ borderBottomColor: _colors.Colors.border
820
+ },
821
+ headerBackBtn: {
822
+ flexDirection: 'row',
823
+ alignItems: 'center',
824
+ paddingVertical: 4
825
+ },
826
+ headerArrow: {
827
+ fontSize: 22,
828
+ color: _colors.Colors.primary,
829
+ fontWeight: '400',
830
+ marginRight: 2
831
+ },
832
+ headerBackLabel: {
833
+ fontSize: 15,
834
+ color: _colors.Colors.primary,
835
+ fontWeight: '600'
836
+ },
837
+ headerMeta: {
838
+ fontSize: 12,
839
+ color: _colors.Colors.textSecondary,
840
+ fontFamily: 'Courier'
841
+ },
842
+ // ── Filter bar ──
843
+ filterBar: {
844
+ flexDirection: 'row',
845
+ paddingHorizontal: 12,
846
+ paddingVertical: 8,
847
+ backgroundColor: _colors.Colors.background,
848
+ gap: 6
849
+ },
850
+ chip: {
851
+ paddingHorizontal: 12,
852
+ paddingVertical: 6,
853
+ borderRadius: 8,
854
+ backgroundColor: _colors.Colors.surface
855
+ },
856
+ chipLabel: {
857
+ fontSize: 13,
858
+ fontWeight: '500',
859
+ color: _colors.Colors.textSecondary
860
+ },
861
+ chipLabelActive: {
862
+ color: '#FFFFFF'
863
+ },
864
+ chipCount: {
865
+ fontSize: 12,
866
+ fontWeight: '600',
867
+ color: _colors.Colors.textLight
868
+ },
869
+ chipCountActive: {
870
+ color: 'rgba(255,255,255,0.8)'
871
+ },
872
+ // ── Log rows (inside LogListScreen cards) ──
873
+ rowContent: {
874
+ flexDirection: 'row',
875
+ padding: 14,
876
+ alignItems: 'flex-start'
877
+ },
878
+ levelDot: {
879
+ width: 24,
880
+ height: 24,
881
+ borderRadius: 12,
882
+ alignItems: 'center',
883
+ justifyContent: 'center',
884
+ marginRight: 12,
885
+ marginTop: 1
886
+ },
887
+ levelIcon: {
888
+ color: '#FFF',
889
+ fontSize: 11,
890
+ fontWeight: '700'
891
+ },
892
+ statusBar: {
893
+ width: 3,
894
+ borderRadius: 2,
895
+ marginRight: 12,
896
+ minHeight: 36
897
+ },
898
+ rowBody: {
899
+ flex: 1
900
+ },
901
+ rowMsg: {
902
+ fontSize: 14,
903
+ color: _colors.Colors.text,
904
+ lineHeight: 20
905
+ },
906
+ rowTime: {
907
+ fontSize: 12,
908
+ color: _colors.Colors.textSecondary,
909
+ marginTop: 4
910
+ },
911
+ rowMeta: {
912
+ flexDirection: 'row',
913
+ alignItems: 'center',
914
+ marginBottom: 4,
915
+ gap: 6
916
+ },
917
+ methodText: {
918
+ fontSize: 13,
919
+ fontWeight: '700'
920
+ },
921
+ miniPill: {
922
+ paddingHorizontal: 7,
923
+ paddingVertical: 2,
924
+ borderRadius: 4
925
+ },
926
+ miniPillText: {
927
+ color: '#FFF',
928
+ fontSize: 10,
929
+ fontWeight: '700'
930
+ },
931
+ trackDot: {
932
+ width: 10,
933
+ height: 10,
934
+ borderRadius: 5,
935
+ backgroundColor: _colors.Colors.purple,
936
+ marginRight: 10,
937
+ marginTop: 5
938
+ },
939
+ // ── Log detail header ──
940
+ levelBadge: {
941
+ paddingHorizontal: 10,
942
+ paddingVertical: 4,
943
+ borderRadius: 6
944
+ },
945
+ levelBadgeText: {
946
+ color: '#FFF',
947
+ fontSize: 12,
948
+ fontWeight: '700'
949
+ },
950
+ detailTimestamp: {
951
+ flex: 1,
952
+ fontSize: 13,
953
+ color: _colors.Colors.textSecondary,
954
+ textAlign: 'right'
955
+ },
956
+ networkHeaderBadges: {
957
+ flexDirection: 'row',
958
+ alignItems: 'center',
959
+ gap: 8,
960
+ flex: 1
961
+ },
962
+ methodBadge: {
963
+ paddingHorizontal: 10,
964
+ paddingVertical: 4,
965
+ borderRadius: 6
966
+ },
967
+ methodBadgeText: {
968
+ color: '#FFF',
969
+ fontSize: 12,
970
+ fontWeight: '700'
971
+ },
972
+ statusPill: {
973
+ paddingHorizontal: 9,
974
+ paddingVertical: 3,
975
+ borderRadius: 6
976
+ },
977
+ statusPillText: {
978
+ color: '#FFF',
979
+ fontSize: 11,
980
+ fontWeight: '700'
981
+ },
982
+ durationText: {
983
+ fontSize: 12,
984
+ color: _colors.Colors.textSecondary,
985
+ fontWeight: '500'
986
+ },
987
+ // ── Log detail body ──
988
+ detailBody: {
989
+ flex: 1
990
+ },
991
+ detailBodyContent: {
992
+ padding: 12,
993
+ paddingBottom: 40
994
+ },
995
+ sectionWithCopy: {
996
+ gap: 8
997
+ },
998
+ plainText: {
999
+ fontFamily: 'Courier',
1000
+ fontSize: 13,
1001
+ color: _colors.Colors.text,
1002
+ lineHeight: 20
1003
+ },
1004
+ urlCard: {
1005
+ flexDirection: 'row',
1006
+ alignItems: 'center',
1007
+ backgroundColor: _colors.Colors.surface,
1008
+ borderRadius: 12,
1009
+ padding: 14,
1010
+ marginBottom: 8,
1011
+ gap: 8
1012
+ },
1013
+ urlText: {
1014
+ flex: 1,
1015
+ fontSize: 13,
1016
+ color: _colors.Colors.textSecondary,
1017
+ lineHeight: 18
1018
+ },
1019
+ emptySection: {
1020
+ fontSize: 13,
1021
+ color: _colors.Colors.textLight,
1022
+ paddingVertical: 4
1023
+ },
1024
+ errorBox: {
1025
+ backgroundColor: 'rgba(255,59,48,0.06)',
1026
+ borderWidth: 1,
1027
+ borderColor: 'rgba(255,59,48,0.15)',
1028
+ borderRadius: 10,
1029
+ padding: 12,
1030
+ marginBottom: 10,
1031
+ flexDirection: 'row',
1032
+ alignItems: 'flex-start',
1033
+ gap: 8
1034
+ },
1035
+ errorIcon: {
1036
+ fontSize: 14,
1037
+ color: _colors.Colors.error
1038
+ },
1039
+ errorText: {
1040
+ flex: 1,
1041
+ fontSize: 13,
1042
+ color: _colors.Colors.error,
1043
+ lineHeight: 18
1044
+ }
1045
+ });
1046
+ //# sourceMappingURL=SessionHistoryTab.js.map