Repository navigation
Conversation
size-limit report 📦
|
8d885e5 to
9849fe3
Compare
9849fe3 to
e483312
Compare
c0cc99e to
fa408e7
Compare
fa408e7 to
7436507
Compare
7436507 to
b0cd816
Compare
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
85274b7 to
5782a9a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
There are 5 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5782a9a. Configure here.
|
|
||
| const pageloadTransaction = await getFirstSentryEnvelopeRequest<Event>(page); | ||
|
|
||
| expect(pageloadTransaction.contexts?.trace?.op).toBe('pageload'); | ||
| expect(pageloadTransaction.contexts?.trace?.status).toBe('cancelled'); | ||
| expect(pageloadTransaction.contexts?.trace?.data?.['sentry.cancellation_reason']).toBe('document.hidden'); | ||
| expect(getSpanOp(pageloadSpan)).toBe('pageload'); | ||
| expect(pageloadSpan.status).toBe('ok'); | ||
| expect(pageloadSpan.attributes['sentry.cancellation_reason']?.value).toBe('document.hidden'); | ||
| }); |
There was a problem hiding this comment.
Bug: The backgroundtab-pageload streaming test incorrectly asserts the pageload span status is 'ok'. It should expect 'cancelled' when the tab is backgrounded.
Severity: LOW
Suggested Fix
In the backgroundtab-pageload test, change the assertion from expect(pageloadSpan.status).toBe('ok') to expect(pageloadSpan.status).toBe('cancelled'). This will align the test with the actual behavior of the registerBackgroundTabDetection function and the corresponding static test.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/test.ts#L14-L18
Potential issue: The streaming `backgroundtab-pageload` test incorrectly expects a
pageload span to have a status of `'ok'` after the page is moved to the background. The
`registerBackgroundTabDetection` function is designed to change the span's status from
`'ok'` to `'cancelled'` in this scenario before the span is ended and streamed. As a
result, the test assertion `expect(pageloadSpan.status).toBe('ok')` will fail because
the actual status will be `'cancelled'`. This is confirmed by an equivalent static test
which correctly asserts the status is `'cancelled'`.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
streamed spans map cancelled to ok
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>

Exercise browserTracingIntegration with default span streaming, including low-cardinality names and children sent across envelopes. Retain the existing transaction counterparts as explicitly pinned
*-staticsuites to preserve compatibility coverage for navigation, pageloads, linked traces, timing, and sampling.Stacked on #24881 for the shared span collector and dynamic sampling context helpers.
Fixes #24142