pingdotgg / pingdotgg/t3code

[Bug]: preview_click reports generic execution errors for missing targets

Open
#3,714 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Start T3 Code Desktop.

  2. Open a Codex-backed thread with the T3 preview MCP tools available.

  3. Open any page in the browser preview.

  4. Confirm a selector matches zero elements:

    document.querySelectorAll(".definitely-no-such-t3-target").length
    
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.