Skip to content

feat(shot): enter text before the capture - #9

Merged
koji-1009 merged 2 commits into
feat/shot-capture-screenfrom
feat/shot-enter
Sep 23, 2026
Merged

koji-1009 merged 2 commits into
feat/shot-capture-screenfrom
feat/shot-enter

Conversation

@koji-1009

@koji-1009 koji-1009 commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

A form that validates, counts, or suggests as it is typed into could not be shot in that state when it keeps its own controller. shot now takes --enter =: the text field the target is or holds takes focus and its text is replaced, as the platform's keyboard does. The target ends at the first '='.

Shooting example/'s LoginForm found that its fields could not be named: they have no keys, both are TextFields, and text:Email matches the label's Text, which holds no field. A label: target now names a widget by its semantics label, as a text field publishes its labelText or hintText:

no action --enter 'label:Email=example@example.com' --enter 'label:Password=secret'
LoginForm, empty LoginForm with email and password entered

Part of the v0.2.0 stack: #7 → #8 → #9 → #10.

🤖 Generated with Claude Code

A form that validates, counts, or suggests as it is typed into could
not be shot in that state when it keeps its own controller. shot now
takes --enter <target>=<text>: the text field the target is or holds
takes focus and its text is replaced, as the platform's keyboard does.
The target ends at the first '='.

Taps and entries run in the order given on the command line, so an
entry can precede the tap that submits it; the parser keeps each
option's values in order but not the order between options, which is
read back from the arguments. A target with no text field, or more
than one, makes the shot an error. The on-screen keyboard is not drawn.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@koji-1009
koji-1009 added this pull request to stack #11 September 22, 2026 23:54
Shooting the example's LoginForm with --enter found no way to name its
fields: they have no keys, both are TextFields, and text:Email matches
the label's Text, which holds no field. A label: target finds the
widget whose semantics label is exactly the string, which is how a
text field publishes its labelText or hintText, so label:Email names
that field and not a heading or a button beside it. It names buttons
by their text too. Semantics are turned on for the shot only when a
target uses them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@koji-1009
koji-1009 merged commit e453d29 into main Sep 23, 2026
5 checks passed
@koji-1009
koji-1009 deleted the feat/shot-enter branch September 23, 2026 03:22
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.

2 participants