Skip to content

Document self-modifying Browser Harness workflow#334

Open
MagMueller wants to merge 2 commits into
mainfrom
codex/self-modifying-harness-docs
Open

Document self-modifying Browser Harness workflow#334
MagMueller wants to merge 2 commits into
mainfrom
codex/self-modifying-harness-docs

Conversation

@MagMueller
Copy link
Copy Markdown
Contributor

@MagMueller MagMueller commented May 10, 2026

Summary

  • Add docs/self-modifying-harness.md explaining the self-modifying Browser Harness workflow for edge cases.
  • Add four concrete edge-case examples: signature/canvas fields, coordinate-only controls, drag-and-drop, and file upload.
  • Add docs/edge-case-benchmark.html, a local benchmark page covering file upload, drag/drop, signature canvas, and coordinate-only canvas targets.
  • Link the docs from README.md and SKILL.md.

Validation

  • git diff --check
  • Ran the benchmark in a remote Browser Use Cloud browser by injecting the page into about:blank; all four checks passed:
    • file upload: pass
    • drag/drop: pass
    • signature canvas: pass
    • coordinate canvas: pass

Run notes

  • Remote Browser Use Cloud cannot read a local file:// page directly, so the practical remote path is Page.setDocumentContent / injecting the HTML into about:blank.
  • A long data: navigation failed in remote Chrome with chrome-error://chromewebdata/; use document injection for this benchmark.
  • The installed CLI in this box did not expose wait_for_element, so the run used JS polling.
  • Signature drawing needed scrollIntoView() before measuring coordinates; viewport scroll state matters for canvas tests.
  • Repeated page-context snippets should be wrapped in IIFEs to avoid global const redeclaration errors.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@browser-harness-review
Copy link
Copy Markdown

✅ Skill review passed

Reviewed 1 file(s) — no findings.

@MagMueller
Copy link
Copy Markdown
Contributor Author

Worker verification pass (post-bench-docs):

  • Local worktree HEAD matches origin/codex/self-modifying-harness-docs at 2101f01.
  • Files in place: docs/self-modifying-harness.md (8.2 KB), docs/edge-case-benchmark.html (8.7 KB), README.md link at L41, SKILL.md pointer at L84.
  • git diff --check: clean.
  • HTML sanity: well-formed <!doctype html></html>, no stray markers.
  • Checks: CodeQL ✅, GitGuardian ✅, skill-review ✅ (cubic still running at comment time).

Ready for review/merge from the docs side. Edge-case benchmark notes are owned by another worker.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/edge-case-benchmark.html">

<violation number="1" location="docs/edge-case-benchmark.html:261">
P2: The signature task listens to both pointer and mouse events unconditionally, which double-handles mouse input on Pointer Event browsers and can make stroke thresholds pass too easily.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

drawing = false;
if (pathLength > 120 && pointCount >= 5) mark("signature", "signature captured");
}
signature.addEventListener("pointerdown", startSignature);
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The signature task listens to both pointer and mouse events unconditionally, which double-handles mouse input on Pointer Event browsers and can make stroke thresholds pass too easily.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/edge-case-benchmark.html, line 261:

<comment>The signature task listens to both pointer and mouse events unconditionally, which double-handles mouse input on Pointer Event browsers and can make stroke thresholds pass too easily.</comment>

<file context>
@@ -0,0 +1,294 @@
+      drawing = false;
+      if (pathLength > 120 && pointCount >= 5) mark("signature", "signature captured");
+    }
+    signature.addEventListener("pointerdown", startSignature);
+    signature.addEventListener("pointermove", moveSignature);
+    signature.addEventListener("pointerup", endSignature);
</file context>
Fix with Cubic

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