feat(feedback): add screenshot upload fallback#22201
Conversation
Co-Authored-By: OpenAI Codex <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5c1d839. Configure here.
| } | ||
|
|
||
| if (captureFailed) { | ||
| return <ScreenshotFallback options={options} onFileSelected={onFileSelected} />; |
There was a problem hiding this comment.
Fallback styles never injected
Low Severity
ScreenshotFallback uses screenshot-fallback classes defined in createScreenshotInputStyles, but that stylesheet is only injected inside the successful ScreenshotEditor path. On capture failure the fallback renders in the shadow DOM without those styles, so padding, layout, and color: var(--foreground) never apply.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 5c1d839. Configure here.
|
|
||
| const feedbackRequestPromise = page.waitForResponse(response => { | ||
| return response.url().includes('/envelope/'); | ||
| }); |
There was a problem hiding this comment.
Flaky envelope wait in test
Medium Severity
This test waits for any /envelope/ response instead of filtering for a feedback envelope. With default browserSessionIntegration, a session can resolve the wait before feedback is submitted, so attachment assertions become flaky. Sibling feedback suites already use getEnvelopeType(req) === 'feedback'. Flagged because of the Testing Conventions flake rule in the review guidelines.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 5c1d839. Configure here.


When screen capture is unavailable or rejected, User Feedback now keeps the dialog open and offers a native image-file upload instead.
The selected image follows the existing screenshot attachment path, preserving its filename and content type. Removing and reopening the screenshot input clears the prior file.
getDisplayMedia()failures were surfaced to the form, which removed the screenshot UI and gave users no way to attach an image. Permission-policy failures and user cancellation are indistinguishable at this boundary, so any capture rejection switches to the manual upload fallback.Fixes #12938