Skip to content

fix(captcha): follow-ups from #174 review - #177

Merged
senamakel merged 6 commits into
mainfrom
captcha-followups
Nov 14, 2026
Merged

senamakel merged 6 commits into
mainfrom
captcha-followups

Conversation

@senamakel

Copy link
Copy Markdown
Member

Follow-up to #174, which merged with four review threads unanswered.

  • paste_through: when select-all fails on a SetValue field, skip paste, restore the clipboard, and return the select error (previously pasted anyway, appending to old text).
  • scan: scroll to the first unanswered checkbox rather than the first shown one (cb455ce fixed the target pick in Rust but the script still scrolled the first shown).
  • scan: holdsToken treats a response field whose nearest ancestor holds more than one checkbox as not answered (ambiguous ownership).

Regression tests were written first and failed before the fixes. The scan tests run the real script under node against a fake DOM (they return early if node is absent).

Refs #174

senamakel and others added 6 commits November 14, 2026 16:26
Add a test asserting that when select all fails, the paste is never pressed and the pasteboard is still restored, so staged text cannot land appended to the old contents.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The paste step now only runs when the preceding select-all succeeded, so a failed selection is reported instead of pasting beside the old text rather than replacing it. The outcome is computed once and passed through to restoration.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds node-backed tests that run the captcha scan script against a fake DOM to verify it scrolls to the first unanswered widget rather than the first visible one, treats a response field shared by two checkboxes as ambiguous, and marks a lone checkbox beside a filled field as answered.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…d fields as unanswered

The scan now scrolls to the first visible checkbox that is still unanswered rather than the first shown one, and a response field shared by several checkboxes no longer marks any of them as answered. The token lookup moved ahead of the scroll decision so it can be reused, and the doc comment was updated to match.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Joined the wrapped line in the SCAN_SCRIPT doc comment so the sentence reads continuously.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Replace the unchecked `as usize` cast with `usize::try_from` so the test helper cannot silently truncate values on platforms with narrower pointer widths.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

Or wait 16 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cf222bc4-8759-4f0b-949c-580192859ad5
Commits

Reviewing files that changed from the base of the PR and between 9355a36 and de5322c.

Files selected for processing: 4

  • crates/tinycomputer-desktop/src/surface/paste.rs
  • crates/tinycomputer-desktop/src/surface/surface_tests/paste_tests.rs
  • crates/tinycomputer-engine/src/agentic/captcha/captcha_tests/scan_tests.rs
  • crates/tinycomputer-engine/src/agentic/captcha/scan.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T16:31:02.736508Z de5322c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@senamakel
senamakel merged commit c949d92 into main Nov 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant