Files
hermes-agent/apps/desktop/src/lib
Brooklyn Nicholson b3f6218aa5 fix(desktop): a checkbox reports whether it is ticked, not the string "on"
An unset checkbox's `.value` is "on" per the HTML spec, and the inventory read
the value before the state — so a ticked box and an empty one both came back as
`value: "on"`, and the agent had no way to tell them apart. Anything built on
reading a form back ("is the newsletter box already checked?") was answering
from a coin flip.

The state check now runs first, gated on the input's type rather than on
`checked` being defined — it is defined, as false, on every input including
text fields, which is what made the original ordering look reasonable. ARIA
checkboxes and switches built out of divs read `aria-checked`, which the old
branch would have missed anyway since a div has no `.checked`.

Found by putting the extracted helper under a direct test. It was unreachable
before: the only way to observe it was to run a whole action against a whole
document.
2026-08-20 05:26:37 -05:00
..
…
…
2026-07-24 16:36:59 +00:00
…
…