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