react-native-inapp-inspector 2.3.14 → 2.3.15

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 (65) hide show
  1. package/dist/commonjs/components/AnimatedEntrance.js +3 -3
  2. package/dist/commonjs/components/ConsoleLogCard.js +174 -100
  3. package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -16
  4. package/dist/commonjs/components/Inspector/CrashTab.js +19 -5
  5. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
  6. package/dist/commonjs/components/Inspector/InspectorHeader.js +2 -2
  7. package/dist/commonjs/components/Inspector/MainScreen.js +56 -56
  8. package/dist/commonjs/components/Inspector/NetworkTab.js +1 -335
  9. package/dist/commonjs/components/Inspector/PerformanceTab.js +32 -6
  10. package/dist/commonjs/components/Inspector/ReduxTab.js +3 -1
  11. package/dist/commonjs/components/Inspector/StorageTab.js +23 -5
  12. package/dist/commonjs/components/JsonViewer.js +14 -2
  13. package/dist/commonjs/components/LogCard.js +428 -227
  14. package/dist/commonjs/constants/version.d.ts +1 -1
  15. package/dist/commonjs/constants/version.js +1 -1
  16. package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
  17. package/dist/commonjs/customHooks/consoleLogger.js +34 -2
  18. package/dist/commonjs/customHooks/crashHandler.js +1 -1
  19. package/dist/commonjs/customHooks/networkLogger.js +184 -26
  20. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
  21. package/dist/commonjs/helpers/searchQueryParser.js +37 -291
  22. package/dist/commonjs/index.js +141 -27
  23. package/dist/esm/components/AnimatedEntrance.js +3 -3
  24. package/dist/esm/components/ConsoleLogCard.js +141 -100
  25. package/dist/esm/components/Inspector/ConsoleTab.js +25 -16
  26. package/dist/esm/components/Inspector/CrashTab.js +19 -5
  27. package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
  28. package/dist/esm/components/Inspector/InspectorHeader.js +3 -3
  29. package/dist/esm/components/Inspector/MainScreen.js +56 -56
  30. package/dist/esm/components/Inspector/NetworkTab.js +2 -336
  31. package/dist/esm/components/Inspector/PerformanceTab.js +32 -6
  32. package/dist/esm/components/Inspector/ReduxTab.js +3 -1
  33. package/dist/esm/components/Inspector/StorageTab.js +23 -5
  34. package/dist/esm/components/JsonViewer.js +14 -2
  35. package/dist/esm/components/LogCard.js +422 -221
  36. package/dist/esm/constants/version.d.ts +1 -1
  37. package/dist/esm/constants/version.js +1 -1
  38. package/dist/esm/customHooks/analyticsLogger.js +1 -1
  39. package/dist/esm/customHooks/consoleLogger.js +34 -2
  40. package/dist/esm/customHooks/crashHandler.js +1 -1
  41. package/dist/esm/customHooks/networkLogger.js +184 -26
  42. package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
  43. package/dist/esm/helpers/searchQueryParser.js +37 -291
  44. package/dist/esm/index.js +141 -27
  45. package/package.json +1 -1
  46. package/src/components/AnimatedEntrance.tsx +3 -3
  47. package/src/components/ConsoleLogCard.tsx +154 -103
  48. package/src/components/Inspector/ConsoleTab.tsx +27 -18
  49. package/src/components/Inspector/CrashTab.tsx +19 -5
  50. package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
  51. package/src/components/Inspector/InspectorHeader.tsx +5 -3
  52. package/src/components/Inspector/MainScreen.tsx +2 -3
  53. package/src/components/Inspector/NetworkTab.tsx +1 -402
  54. package/src/components/Inspector/PerformanceTab.tsx +36 -7
  55. package/src/components/Inspector/ReduxTab.tsx +9 -1
  56. package/src/components/Inspector/StorageTab.tsx +27 -7
  57. package/src/components/JsonViewer.tsx +15 -2
  58. package/src/components/LogCard.tsx +528 -339
  59. package/src/constants/version.ts +1 -1
  60. package/src/customHooks/analyticsLogger.ts +1 -1
  61. package/src/customHooks/consoleLogger.ts +36 -3
  62. package/src/customHooks/crashHandler.ts +1 -1
  63. package/src/customHooks/networkLogger.ts +214 -26
  64. package/src/helpers/searchQueryParser.ts +40 -285
  65. package/src/index.tsx +332 -211
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import { useTranslation } from '../i18n';
3
3
  import { Pressable, StyleSheet, Text, View, } from 'react-native';
4
4
  import { AppColors } from '../styles/AppColors';
@@ -62,8 +62,8 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
62
62
  return (<View key={i} style={[
63
63
  styles.prefixTag,
64
64
  {
65
- backgroundColor: `${dec.color}15`,
66
- borderColor: `${dec.color}35`,
65
+ backgroundColor: `${dec.color}14`,
66
+ borderColor: `${dec.color}33`,
67
67
  },
68
68
  ]}>
69
69
  <IconComp color={dec.color} size={10}/>
@@ -81,6 +81,7 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
81
81
  export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchStr = '', }) {
82
82
  const { setSelectedLog } = useInspector();
83
83
  const { t } = useTranslation();
84
+ const [isExpanded, setIsExpanded] = useState(false);
84
85
  const jsonContent = getJsonContent(item.message);
85
86
  const isAnalyticsError = item.message
86
87
  .toLowerCase()
@@ -95,61 +96,61 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
95
96
  if (isAnalyticsError || type === 'error' || method === 'error') {
96
97
  return {
97
98
  border: AppColors.errorColor,
98
- badgeBg: AppColors.errorCardBg,
99
- badgeText: AppColors.rose600,
99
+ badgeBg: `${AppColors.errorColor}18`,
100
+ badgeText: AppColors.errorColor,
100
101
  label: 'ERROR',
101
- cardBg: AppColors.errorCardBg,
102
- methodBorder: AppColors.errorBorder,
103
- methodBg: AppColors.errorCardBg,
104
- methodText: AppColors.rose600,
102
+ cardBg: '#FFF8F8',
103
+ methodBorder: `${AppColors.errorColor}30`,
104
+ methodBg: `${AppColors.errorColor}12`,
105
+ methodText: AppColors.errorColor,
105
106
  textColor: AppColors.redErrorText,
106
107
  };
107
108
  }
108
109
  if (type === 'warn' || method === 'warn') {
109
110
  return {
110
111
  border: AppColors.amber600,
111
- badgeBg: AppColors.amberBg,
112
- badgeText: AppColors.amber700,
112
+ badgeBg: `${AppColors.amber600}18`,
113
+ badgeText: AppColors.amber800,
113
114
  label: 'WARN',
114
- cardBg: AppColors.amberWarmBg,
115
- methodBorder: AppColors.amberWarmBorder,
116
- methodBg: AppColors.amberBg,
117
- methodText: AppColors.amber700,
118
- textColor: AppColors.amberWarmText,
115
+ cardBg: '#FFFDF5',
116
+ methodBorder: `${AppColors.amber600}33`,
117
+ methodBg: `${AppColors.amber600}14`,
118
+ methodText: AppColors.amber800,
119
+ textColor: AppColors.amber800,
119
120
  };
120
121
  }
121
122
  if (type === 'debug' || method === 'debug') {
122
123
  return {
123
124
  border: AppColors.purple500,
124
- badgeBg: AppColors.violetSoftBg,
125
- badgeText: AppColors.violetSoftText,
125
+ badgeBg: `${AppColors.purple500}18`,
126
+ badgeText: AppColors.purple,
126
127
  label: 'DEBUG',
127
- cardBg: AppColors.purpleShade50,
128
- methodBorder: AppColors.violetSoftBorder,
129
- methodBg: AppColors.violetSoftBg,
130
- methodText: AppColors.violetSoftText,
128
+ cardBg: '#FAF8FD',
129
+ methodBorder: `${AppColors.purple500}33`,
130
+ methodBg: `${AppColors.purple500}12`,
131
+ methodText: AppColors.purple,
131
132
  textColor: AppColors.purpleText,
132
133
  };
133
134
  }
134
135
  if (type === 'info' || method === 'info') {
135
136
  return {
136
137
  border: AppColors.sky500,
137
- badgeBg: AppColors.skySoftBg,
138
- badgeText: AppColors.skySoftText,
138
+ badgeBg: `${AppColors.sky500}18`,
139
+ badgeText: AppColors.sky600,
139
140
  label: 'INFO',
140
- cardBg: AppColors.blueBg,
141
- methodBorder: AppColors.skySoftBorder,
142
- methodBg: AppColors.skySoftBg,
143
- methodText: AppColors.skySoftText,
141
+ cardBg: '#F8FAFC',
142
+ methodBorder: `${AppColors.sky500}33`,
143
+ methodBg: `${AppColors.sky500}12`,
144
+ methodText: AppColors.sky600,
144
145
  textColor: AppColors.blue800,
145
146
  };
146
147
  }
147
148
  return {
148
149
  border: AppColors.indigo500,
149
- badgeBg: AppColors.indigo50,
150
+ badgeBg: `${AppColors.indigo500}15`,
150
151
  badgeText: AppColors.indigo600Alt,
151
152
  label: 'LOG',
152
- cardBg: AppColors.primaryLight,
153
+ cardBg: AppColors.white,
153
154
  methodBorder: AppColors.dividerColor,
154
155
  methodBg: AppColors.indigo50,
155
156
  methodText: AppColors.indigo600Alt,
@@ -163,6 +164,10 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
163
164
  const openDetail = () => {
164
165
  setSelectedLog(item);
165
166
  };
167
+ const toggleExpand = (e) => {
168
+ e?.stopPropagation?.();
169
+ setIsExpanded(prev => !prev);
170
+ };
166
171
  return (<View style={styles.container}>
167
172
  <Pressable onPress={openDetail} style={({ pressed }) => [
168
173
  styles.card,
@@ -173,6 +178,7 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
173
178
  },
174
179
  pressed && styles.cardPressed,
175
180
  ]}>
181
+
176
182
  <View style={styles.cardHeader}>
177
183
  <View style={styles.headerLeft}>
178
184
  <View style={[styles.typeChip, { backgroundColor: colors.badgeBg }]}>
@@ -198,11 +204,11 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
198
204
  {jsonContent && (<View style={[
199
205
  styles.metaChip,
200
206
  {
201
- backgroundColor: AppColors.mintGreenBg,
202
- borderColor: AppColors.mintGreenBorder,
207
+ backgroundColor: `${AppColors.teal600}14`,
208
+ borderColor: `${AppColors.teal600}33`,
203
209
  },
204
210
  ]}>
205
- <Text style={[styles.metaChipText, { color: AppColors.mintGreenText, fontFamily: AppFonts.interBold }]}>
211
+ <Text style={[styles.metaChipText, { color: AppColors.teal600, fontFamily: AppFonts.interBold }]}>
206
212
  {Array.isArray(jsonContent.data)
207
213
  ? `Array[${jsonContent.data.length}]`
208
214
  : `Object{${Object.keys(jsonContent.data).length}}`}
@@ -229,23 +235,31 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
229
235
  </View>
230
236
  </View>
231
237
 
238
+
232
239
  <View style={styles.cardBody}>
233
240
  {jsonContent ? (<>
234
- {jsonContent.header ? (getLogMessageWithBadges(jsonContent.header, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, 2)) : null}
241
+ {jsonContent.header ? (getLogMessageWithBadges(jsonContent.header, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, isExpanded ? undefined : 2)) : null}
235
242
  {jsonPreview && (<View style={styles.jsonPreviewContainer}>
236
243
  <LogSyntaxHighlighter text={jsonPreview.text} search={searchStr} style={[
237
244
  styles.jsonPreviewText,
238
245
  { color: AppColors.primaryBlack },
239
- ]} detectLinks={false} numberOfLines={5}/>
246
+ ]} detectLinks={false} numberOfLines={isExpanded ? undefined : 4}/>
247
+ {jsonPreview.text.split('\n').length > 4 && (<Pressable onPress={toggleExpand} hitSlop={6} style={styles.expandToggle}>
248
+ <Text style={styles.expandToggleText}>
249
+ {isExpanded ? 'Show less' : 'Show full preview'}
250
+ </Text>
251
+ <ChevronIcon color={AppColors.purple} size={11} direction={isExpanded ? 'up' : 'down'}/>
252
+ </Pressable>)}
240
253
  </View>)}
241
- </>) : (getLogMessageWithBadges(item.message, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, 3))}
254
+ </>) : (getLogMessageWithBadges(item.message, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, isExpanded ? undefined : 4))}
242
255
  </View>
243
256
 
257
+
244
258
  <View style={styles.cardFooter}>
245
259
  <View style={styles.footerLeft}>
246
- <Text style={styles.footerText}>#{item.id + 1}</Text>
260
+ <Text style={styles.footerId}>#{item.id + 1}</Text>
247
261
  <View style={styles.footerDot}/>
248
- <Text style={styles.footerText}>{formatTime(item.timestamp)}</Text>
262
+ <Text style={styles.footerTime}>{formatTime(item.timestamp)}</Text>
249
263
  {parsedCaller && (<>
250
264
  <View style={styles.footerDot}/>
251
265
  <Pressable onPress={e => {
@@ -253,44 +267,27 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
253
267
  openInVSCode(parsedCaller.rawFilePath ||
254
268
  parsedCaller.fullPath ||
255
269
  parsedCaller.fileName, parsedCaller.lineNumber, parsedCaller.columnNumber);
256
- }} hitSlop={8} style={{
257
- flexDirection: 'row',
258
- alignItems: 'center',
259
- gap: 4,
260
- maxWidth: 185,
261
- backgroundColor: `${AppColors.sky600}10`,
262
- borderColor: `${AppColors.sky600}2B`,
263
- borderWidth: 1,
264
- borderRadius: 5,
265
- paddingHorizontal: 5,
266
- paddingVertical: 1.5,
267
- }}>
268
- {parsedCaller.fileExt && parsedCaller.fileExt !== 'other' && (<View style={{
269
- backgroundColor: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
270
- ? `${AppColors.brandPurple}22`
271
- : `${AppColors.teal600}22`,
272
- borderRadius: 3,
273
- paddingHorizontal: 3.5,
274
- paddingVertical: 0.5,
275
- }}>
276
- <Text style={{
277
- fontFamily: AppFonts.interBold,
278
- fontSize: 8,
279
- color: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
280
- ? AppColors.brandPurple
281
- : AppColors.teal600,
282
- }}>
270
+ }} hitSlop={8} style={styles.callerPill}>
271
+ {parsedCaller.fileExt && parsedCaller.fileExt !== 'other' && (<View style={[
272
+ styles.extBadge,
273
+ {
274
+ backgroundColor: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
275
+ ? `${AppColors.brandPurple}22`
276
+ : `${AppColors.teal600}22`,
277
+ },
278
+ ]}>
279
+ <Text style={[
280
+ styles.extBadgeText,
281
+ {
282
+ color: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
283
+ ? AppColors.brandPurple
284
+ : AppColors.teal600,
285
+ },
286
+ ]}>
283
287
  {parsedCaller.fileExt.toUpperCase()}
284
288
  </Text>
285
289
  </View>)}
286
- <Text style={[
287
- styles.footerText,
288
- {
289
- fontFamily: AppFonts.interBold,
290
- color: AppColors.sky600,
291
- fontSize: 9.5,
292
- },
293
- ]} numberOfLines={1} ellipsizeMode="middle">
290
+ <Text style={styles.callerFileName} numberOfLines={1} ellipsizeMode="middle">
294
291
  {parsedCaller.fileName}
295
292
  {parsedCaller.lineNumber ? `:${parsedCaller.lineNumber}` : ''}
296
293
  </Text>
@@ -329,32 +326,34 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
329
326
  });
330
327
  const styles = StyleSheet.create({
331
328
  container: {
332
- paddingHorizontal: 12,
333
- paddingVertical: 4,
329
+ paddingHorizontal: 10,
330
+ paddingVertical: 3.5,
334
331
  },
335
332
  card: {
336
333
  alignSelf: 'stretch',
337
- borderRadius: 12,
334
+ borderRadius: 11,
338
335
  borderWidth: 1,
339
336
  borderColor: AppColors.grayBorderSecondary,
340
337
  borderLeftWidth: 3.5,
341
- padding: 12,
342
- backgroundColor: AppColors.primaryLight,
338
+ paddingHorizontal: 12,
339
+ paddingTop: 10,
340
+ paddingBottom: 9,
341
+ backgroundColor: AppColors.white,
343
342
  shadowColor: AppColors.black,
344
- shadowOpacity: 0.05,
345
- shadowRadius: 4,
346
- shadowOffset: { width: 0, height: 2 },
347
- elevation: 2,
343
+ shadowOpacity: 0.04,
344
+ shadowRadius: 3,
345
+ shadowOffset: { width: 0, height: 1.5 },
346
+ elevation: 1.5,
348
347
  },
349
348
  cardPressed: {
350
- opacity: 0.85,
351
- transform: [{ scale: 0.99 }],
349
+ opacity: 0.88,
350
+ transform: [{ scale: 0.995 }],
352
351
  },
353
352
  cardHeader: {
354
353
  flexDirection: 'row',
355
354
  justifyContent: 'space-between',
356
355
  alignItems: 'center',
357
- marginBottom: 8,
356
+ marginBottom: 6,
358
357
  gap: 8,
359
358
  },
360
359
  headerLeft: {
@@ -367,7 +366,7 @@ const styles = StyleSheet.create({
367
366
  headerRight: {
368
367
  flexDirection: 'row',
369
368
  alignItems: 'center',
370
- gap: 4,
369
+ gap: 6,
371
370
  },
372
371
  typeChip: {
373
372
  flexDirection: 'row',
@@ -389,7 +388,7 @@ const styles = StyleSheet.create({
389
388
  },
390
389
  metaChip: {
391
390
  paddingHorizontal: 6,
392
- paddingVertical: 2.5,
391
+ paddingVertical: 2,
393
392
  borderRadius: 6,
394
393
  borderWidth: 1,
395
394
  },
@@ -399,12 +398,7 @@ const styles = StyleSheet.create({
399
398
  letterSpacing: 0.2,
400
399
  },
401
400
  cardBody: {
402
- backgroundColor: AppColors.primaryLight,
403
- paddingHorizontal: 10,
404
- paddingVertical: 8,
405
- borderRadius: 9,
406
- borderWidth: 1,
407
- borderColor: AppColors.grayBorderSecondary,
401
+ paddingVertical: 2,
408
402
  },
409
403
  messageText: {
410
404
  fontFamily: AppFonts.interMedium,
@@ -420,10 +414,11 @@ const styles = StyleSheet.create({
420
414
  jsonPreviewContainer: {
421
415
  marginTop: 6,
422
416
  backgroundColor: AppColors.grayBackground,
423
- borderRadius: 7,
417
+ borderRadius: 8,
424
418
  borderWidth: 1,
425
419
  borderColor: AppColors.grayBorderSecondary,
426
- padding: 8,
420
+ paddingHorizontal: 9,
421
+ paddingVertical: 7,
427
422
  },
428
423
  jsonPreviewText: {
429
424
  fontFamily: AppFonts.interRegular,
@@ -431,11 +426,29 @@ const styles = StyleSheet.create({
431
426
  color: AppColors.primaryBlack,
432
427
  lineHeight: 16,
433
428
  },
429
+ expandToggle: {
430
+ flexDirection: 'row',
431
+ alignItems: 'center',
432
+ justifyContent: 'center',
433
+ gap: 4,
434
+ marginTop: 5,
435
+ paddingVertical: 2,
436
+ borderTopWidth: 1,
437
+ borderTopColor: AppColors.dividerColor,
438
+ },
439
+ expandToggleText: {
440
+ fontFamily: AppFonts.interBold,
441
+ fontSize: 10,
442
+ color: AppColors.purple,
443
+ },
434
444
  cardFooter: {
435
445
  flexDirection: 'row',
436
446
  alignItems: 'center',
437
447
  justifyContent: 'space-between',
438
- marginTop: 8,
448
+ marginTop: 7,
449
+ paddingTop: 6,
450
+ borderTopWidth: 1,
451
+ borderTopColor: `${AppColors.dividerColor}88`,
439
452
  gap: 6,
440
453
  },
441
454
  footerLeft: {
@@ -457,14 +470,42 @@ const styles = StyleSheet.create({
457
470
  backgroundColor: AppColors.grayTextWeak,
458
471
  opacity: 0.6,
459
472
  },
460
- footerText: {
461
- fontFamily: AppFonts.interRegular,
473
+ footerId: {
474
+ fontFamily: AppFonts.interBold,
475
+ fontSize: 10,
476
+ color: AppColors.grayTextWeak,
477
+ },
478
+ footerTime: {
479
+ fontFamily: AppFonts.interMedium,
462
480
  fontSize: 10,
463
481
  color: AppColors.grayTextWeak,
464
482
  letterSpacing: 0.1,
465
483
  },
466
- footerCaller: {
467
- flexShrink: 1,
484
+ callerPill: {
485
+ flexDirection: 'row',
486
+ alignItems: 'center',
487
+ gap: 4,
488
+ maxWidth: 185,
489
+ backgroundColor: `${AppColors.sky600}10`,
490
+ borderColor: `${AppColors.sky600}2B`,
491
+ borderWidth: 1,
492
+ borderRadius: 5,
493
+ paddingHorizontal: 5,
494
+ paddingVertical: 1.5,
495
+ },
496
+ extBadge: {
497
+ borderRadius: 3,
498
+ paddingHorizontal: 3.5,
499
+ paddingVertical: 0.5,
500
+ },
501
+ extBadgeText: {
502
+ fontFamily: AppFonts.interBold,
503
+ fontSize: 8,
504
+ },
505
+ callerFileName: {
506
+ fontFamily: AppFonts.interBold,
507
+ color: AppColors.sky600,
508
+ fontSize: 9.5,
468
509
  },
469
510
  footerBadge: {
470
511
  paddingHorizontal: 6,
@@ -25,31 +25,40 @@ const ConsoleTab = React.memo(() => {
25
25
  const isAllSelected = logFilters.has('all') ||
26
26
  !Array.from(logFilters).some(f => f !== 'all');
27
27
  if (isAllSelected) {
28
- return (<Text style={[
29
- styles.resultCount,
30
- { marginBottom: 4, marginTop: 12 },
31
- ]}>
32
- Showing ({filtered}/{total}) logs showing
33
- </Text>);
28
+ return (<View style={{ paddingHorizontal: 12, paddingTop: 8, paddingBottom: 3 }}>
29
+ <Text style={{
30
+ fontFamily: AppFonts.interMedium,
31
+ fontSize: 11,
32
+ color: AppColors.grayTextWeak,
33
+ letterSpacing: 0.2,
34
+ }}>
35
+ {filtered === total
36
+ ? `Showing ${total} logs`
37
+ : `Showing ${filtered} of ${total} logs`}
38
+ </Text>
39
+ </View>);
34
40
  }
35
41
  else {
36
42
  const activeFilterNames = Array.from(logFilters)
37
43
  .filter(f => f !== 'all')
38
44
  .map(f => {
39
45
  if (f === 'user-log')
40
- return 'User Log';
46
+ return 'Log';
41
47
  if (f === 'analytics')
42
48
  return 'Analytics';
43
49
  return (f.charAt(0).toUpperCase() +
44
50
  f.slice(1));
45
51
  });
46
- return (<Text style={[
47
- styles.resultCount,
48
- { marginBottom: 4, marginTop: 12 },
49
- ]}>
50
- Filtering with {activeFilterNames.join(', ')} (
51
- {filtered}/{total}) logs is showing
52
- </Text>);
52
+ return (<View style={{ paddingHorizontal: 12, paddingTop: 8, paddingBottom: 3 }}>
53
+ <Text style={{
54
+ fontFamily: AppFonts.interMedium,
55
+ fontSize: 11,
56
+ color: AppColors.grayTextWeak,
57
+ letterSpacing: 0.2,
58
+ }}>
59
+ Filtered by {activeFilterNames.join(', ')} ({filtered} of {total} logs)
60
+ </Text>
61
+ </View>);
53
62
  }
54
63
  }, [visibleConsoleLogs.length, filteredConsoleLogs.length, logFilters]);
55
64
  const [isSearchFocused, setIsSearchFocused] = React.useState(false);
@@ -481,11 +490,11 @@ const ConsoleTab = React.memo(() => {
481
490
  </ScrollView>
482
491
  </View>
483
492
 
484
- <FlatList ref={listRef} data={filteredConsoleLogs} keyExtractor={keyExtractor} ListHeaderComponent={listHeader} renderItem={renderItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState isSearch={logSearch.length > 0 || logFilters.size > 0} searchQuery={logSearch} customTitle={logSearch.length > 0
493
+ <FlatList ref={listRef} data={filteredConsoleLogs} keyExtractor={keyExtractor} ListHeaderComponent={listHeader} renderItem={renderItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState isSearch={logSearch.length > 0 || !logFilters.has('all')} searchQuery={logSearch} customTitle={logSearch.length > 0
485
494
  ? 'No matching console logs'
486
495
  : 'No console logs'} onClearSearch={() => {
487
496
  setLogSearch('');
488
- setLogFilters(new Set());
497
+ setLogFilters(new Set(['all']));
489
498
  }}/>} ListFooterComponent={filteredConsoleLogs.length > 0 ? (<EndOfListFooter count={filteredConsoleLogs.length} label="logs"/>) : null} contentContainerStyle={[
490
499
  styles.listContent,
491
500
  filteredConsoleLogs.length === 0 && { flexGrow: 1 },
@@ -387,13 +387,27 @@ const CrashTab = React.memo(() => {
387
387
  <View style={localStyles.emptyIconCircle}>
388
388
  <ShieldAlertIcon size={38} color={AppColors.greenColor}/>
389
389
  </View>
390
- <Text style={localStyles.emptyTitle}>{t('crash.emptyTitle')}</Text>
390
+ <Text style={localStyles.emptyTitle}>
391
+ {searchQuery.length > 0
392
+ ? 'No matching crash entries'
393
+ : filterType !== 'all' || !isCrashFiltersDefault(crashFilters)
394
+ ? 'No crashes match filters'
395
+ : t('crash.emptyTitle')}
396
+ </Text>
391
397
  <Text style={localStyles.emptySub}>
392
398
  {searchQuery
393
- ? t('crash.emptySearchSubtitle')
394
- : t('crash.emptySubtitle')}
399
+ ? `No crash entries matched "${searchQuery}"`
400
+ : filterType !== 'all' || !isCrashFiltersDefault(crashFilters)
401
+ ? 'Try adjusting your filters or search keywords.'
402
+ : t('crash.emptySubtitle')}
395
403
  </Text>
396
- {searchQuery.length > 0 && (<TouchableScale onPress={() => setSearchQuery('')} style={{
404
+ {(searchQuery.length > 0 ||
405
+ filterType !== 'all' ||
406
+ !isCrashFiltersDefault(crashFilters)) && (<TouchableScale onPress={() => {
407
+ setSearchQuery('');
408
+ setFilterType('all');
409
+ setCrashFilters(DEFAULT_CRASH_FILTERS);
410
+ }} style={{
397
411
  marginTop: 10,
398
412
  paddingHorizontal: 14,
399
413
  paddingVertical: 7,
@@ -405,7 +419,7 @@ const CrashTab = React.memo(() => {
405
419
  fontSize: 11.5,
406
420
  color: AppColors.white,
407
421
  }}>
408
- Clear Search
422
+ Clear Search & Filters
409
423
  </Text>
410
424
  </TouchableScale>)}
411
425
  </ScrollView>) : (<>