Fix strict-CSP screenshots and editor activation - #23
Conversation
|
@greptileai Please review the strict-CSP screenshot and covered-editor fix. The PR includes real Zen regression results and an actual Codex computer-use test; live-firefox CI installs Firefox explicitly and exercises the same flow, including read-only rejection and background-tab preservation. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe extension adds CSP-safe operations for page metrics, device-pixel ratio, accessibility scrolling, and activation. Live Firefox tests verify screenshot capture and covered-editor behavior under strict CSP. ChangesStrict-CSP browser operations
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change swaps internal page-script evaluation for static extension operations to fix strict-CSP failures in screenshot capture and editor activation, without altering permissions or CSP policy. Verification (automated tests, live Firefox tests, and a manual Codex computer-use session) exercised the new paths directly, and no functional or safety regressions were found during review. The change looks safe to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
@greptileai Please re-review using the existing real-browser evidence. The current head is 42fa8e5. Your summary reports no remaining dispatcher defect; its blocker is the missing browser on the T-Rex worker. The actual Firefox CI job for this exact head is green: https://github.com/SunkenInTime/codex-computer-use-firefox-zen/actions/runs/34540897898/job/103083085416 Its log at 23:10:26Z reports: This executes a real Firefox process installed by browser-actions/setup-firefox. The test dispatches the recorded scroll and activation callbacks for a covered textarea below the viewport, selects its text, inserts multiline YAML, and checks that the AX value equals the replacement. It also verifies that activation of a read-only textarea returns the expected exception. These are actual browser assertions, not mocks. Separately, Codex computer use connected to the full patched extension in a disposable Zen profile and successfully captured a screenshot, clicked that covered textarea, selected all, and entered multiline YAML. The same live regression against the released v1.4.12 adapter fails with CSP blocking eval. Please distinguish missing T-Rex tooling from a code defect and assess the supplied browser verification when determining merge readiness. |
Problem and fix
On strict-CSP pages such as Devin, computer-use screenshots fail while reading layout metrics, and clicks on covered editor textareas fail during the AX scroll/activation fallback. These operations still compiled page scripts even after ordinary AX hit tests were fixed.
Route layout metrics, viewport size, device-pixel ratio, and the recorded Browser Use scrolling/activation callbacks through static extension operations. Preserve disabled/read-only checks and CDP exception responses.
Verification
npm testpassed.npm run test:livepassed with strict CSP, PNG capture, layout measurements, multiline replacement in a covered textarea below the viewport, read-only rejection, and background-tab preservation.call to eval() blocked by CSP.No permission or CSP changes. General arbitrary page evaluation remains outside this fix.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation