[Bug]: preview_click reports generic execution errors for missing targets
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
-
Start T3 Code Desktop.
-
Open a Codex-backed thread with the T3 preview MCP tools available.
-
Open any page in the browser preview.
-
Confirm a selector matches zero elements:
document.querySelectorAll(".definitely-no-such-t3-target").length -
Pass that selector to
preview_click:{ "selector": ".definitely-no-such-t3-target", "timeoutMs": 15000 }
Expected behavior
preview_click should return an actionable locator-not-found or no-target error that includes the selector or locator that failed.
This matters because agents need to distinguish "my selector is wrong" from "the click infrastructure failed".
Actual behavior
The preflight check returned 0, but preview_click returned only a generic execution error:
PreviewAutomationExecutionError: Preview automation click failed on client preview-...
No target-specific error details were included.
Impact
Minor bug or occasional failure
Version or commit
T3 Code desktop 0.0.28-1 via t3code-bin AUR package.
Environment
Arch Linux x86_64, kernel 7.0.13-arch1-1, T3 Code desktop AppImage package via t3code-bin, Codex provider.
Logs or stack traces
PreviewAutomationExecutionError: Preview automation click failed on client preview-...
Screenshots, recordings, or supporting files
No screenshot included. This is an API diagnostics issue.
Workaround
Preflight complex selectors with preview_evaluate or preview_wait_for before clicking, and verify page state afterward.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/desktop by tracing the preview_click entry point and compare its missing-target behavior with preview_evaluate or preview_wait_for. Reproduce the zero-match selector case, then verify that preview_click reports an actionable locator-not-found or no-target error containing the failed selector rather than only the generic execution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100