Add Min browser (Electron) interaction skill#481
Open
Gavin-Thomas wants to merge 1 commit into
Open
Conversation
Covers the single-instance/CDP-flag relaunch dance, the hidden 0x0 background webContents trap, and opening visible tabs via 'open -a Min'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Skill review passedReviewed 1 file(s) — no findings. |
Contributor
There was a problem hiding this comment.
1 issue found across 1 file
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="interaction-skills/min-browser.md">
<violation number="1" location="interaction-skills/min-browser.md:29">
P1: The last line of the doc references `click_at_xy` and `capture_screenshot` as available harness functions, but neither name exists in `helpers.py`, `daemon.py`, or `admin.py`. An agent reading this skill will hit a `NameError` at runtime if it tries to call either one. The correct names are `click(x, y, ...)` and `screenshot(path, ...)` — update the line to match what the harness exposes.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| - Then pick the target where `type == "page"`, the URL matches what you opened, and the URL is neither `min://` nor under `/Applications/Min.app/`. `switch_tab()` to it. | ||
| - **Sanity-check `page_info()` shows a non-zero viewport before clicking or screenshotting** — that's the reliable "this is a visible tab" test. | ||
|
|
||
| Everything else (js, click_at_xy, capture_screenshot, wait_for_load) works normally once you're attached to a visible tab. |
Contributor
There was a problem hiding this comment.
P1: The last line of the doc references click_at_xy and capture_screenshot as available harness functions, but neither name exists in helpers.py, daemon.py, or admin.py. An agent reading this skill will hit a NameError at runtime if it tries to call either one. The correct names are click(x, y, ...) and screenshot(path, ...) — update the line to match what the harness exposes.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At interaction-skills/min-browser.md, line 29:
<comment>The last line of the doc references `click_at_xy` and `capture_screenshot` as available harness functions, but neither name exists in `helpers.py`, `daemon.py`, or `admin.py`. An agent reading this skill will hit a `NameError` at runtime if it tries to call either one. The correct names are `click(x, y, ...)` and `screenshot(path, ...)` — update the line to match what the harness exposes.</comment>
<file context>
@@ -0,0 +1,29 @@
+- Then pick the target where `type == "page"`, the URL matches what you opened, and the URL is neither `min://` nor under `/Applications/Min.app/`. `switch_tab()` to it.
+- **Sanity-check `page_info()` shows a non-zero viewport before clicking or screenshotting** — that's the reliable "this is a visible tab" test.
+
+Everything else (js, click_at_xy, capture_screenshot, wait_for_load) works normally once you're attached to a visible tab.
</file context>
Suggested change
| Everything else (js, click_at_xy, capture_screenshot, wait_for_load) works normally once you're attached to a visible tab. | |
| Everything else (js, click, screenshot, wait_for_load) works normally once you're attached to a visible tab. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
interaction-skills/min-browser.md— field-tested notes for driving Min (and Electron-shell browsers generally) over CDP:--remote-debugging-port(AppleScript quit is ignored)pagetarget trap: JS eval works but viewport is 0×0, screenshots time out, clicks are meaninglessopen -a Min "<url>"and select the target by URL match + non-zeropage_info()viewportTarget.createTarget/new_tab()unreliability in Electron shells🤖 Generated with Claude Code
Summary by cubic
Adds
interaction-skills/min-browser.md, a field-tested guide for driving Min (and other Electron-shell browsers) over CDP. Covers reliable CDP enablement (kill and relaunch with--remote-debugging-port), the hidden 0×0pagetarget trap that breaks screenshots/clicks, and opening/selecting real visible tabs viaopen -a Min "<url>"with a non-zero viewport check.Written for commit ef0391f. Summary will update on new commits.