docs(desktop): fix the README example and the physicalInput and placeholder lines (ENG-1533)

Merged
KD
3d ago
+13-7

What

Three desktop docs fixes, each one a place where following the docs on main fails or misleads:

  • The packages/desktop README's sign-in example declares the ada credential it fills. On main, the example failed with AUTH_CREDENTIAL_UNAVAILABLE at the password fill.
  • The reference says what physicalInput turns on: app.open() brings the app forward, keys and typing go through the real keyboard, and doubleTap, hover, and taps at a point become available. It used to say the option sends real input only when the accessibility API cannot perform an action.
  • The guide says macOS names a field with no label by its placeholder, so getByRole('textbox', 'Username') or getByLabel('Username') finds it, and getByPlaceholder is not supported. It used to say such a field is found "by its placeholder", which reads as if getByPlaceholder works.

Why

The README example is what a new user copies first, and it could not pass. The other two lines described behavior the engine does not have.

How it works

  1. packages/desktop/README.md: the config gains credentials.ada, read from ADA_PASSWORD as in docs/desktop.mdx, and the test fills both fields from credentials.user('ada').
  2. docs/reference/desktop.mdx, physicalInput: the summary matches the option's JSDoc and the guide.
  3. docs/desktop.mdx: the locator paragraph names getByRole and getByLabel for a field with no label. The engine refuses getByPlaceholder with UNSUPPORTED_CAPABILITY.

Verified

Ran it locally: no - docs only.

  • pnpm docs:check passes.
  • Each claim was checked against the code on main:
    • physicalInput: app.open() brings the app forward, and keys go through the real keyboard (packages/desktop/src/surface.ts).
    • getByPlaceholder is refused, and getByLabel matches the field's name.
    • The README's credentials block matches docs/desktop.mdx.
  • No screenshot of the rendered pages: the changes are single paragraphs and a code block.

šŸ¤– Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified how to locate static text and unlabeled fields, including macOS placeholder naming and unsupported placeholder queries.
    • Updated the physicalInput description to explain its effects on app focus, keyboard input, and pointer interactions.
    • Revised the sign-in example to show retrieving and using credentials, with the password read from an environment variable.