Commit bb7375b
committed
fix(core): Fix standalone mode and runApplication reset for appLoaded()
Fix two bugs identified in the Cursor Bugbot review:
1. Standalone mode: appLoaded() loses manual timestamp (High)
When auto-capture from ReactNativeProfiler runs first in standalone
mode, it sends the transaction and sets appStartDataFlushed = true.
A subsequent appLoaded() call would find the flag set and silently
skip re-sending. Fix: add resetAppStartDataFlushed() method on the
AppStartIntegration type, called by _appLoaded() before invoking
captureStandaloneAppStart(). This allows the standalone transaction
to be re-sent with the correct manual timestamp.
2. isAppLoadedManuallyInvoked not reset on runApplication (Medium)
The onRunApplication callback resets appStartDataFlushed and span
tracking state for subsequent app starts (e.g. Android activity
recreation), but did not reset isAppLoadedManuallyInvoked. After
the first appLoaded() call, all subsequent app starts would have
auto-capture permanently blocked. Fix: reset the flag alongside
the other state in the onRunApplication callback.
Adds two tests: standalone override after auto-capture, and flag
reset allowing auto-capture on subsequent app starts.1 parent 5ecc173 commit bb7375b
File tree
2 files changed
+105
-1
lines changed- packages/core
- src/js/tracing/integrations
- test/tracing/integrations
2 files changed
+105
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
294 | 302 | | |
295 | 303 | | |
296 | 304 | | |
| 305 | + | |
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
| |||
604 | 613 | | |
605 | 614 | | |
606 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
607 | 620 | | |
608 | 621 | | |
609 | 622 | | |
610 | 623 | | |
611 | 624 | | |
612 | 625 | | |
| 626 | + | |
613 | 627 | | |
614 | 628 | | |
615 | 629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1246 | 1336 | | |
1247 | 1337 | | |
1248 | 1338 | | |
| |||
0 commit comments