In-app browser does not relay Visual Truth handoff and selection is omitted

Open 💬 0 comments Opened Aug 1, 2026 by moisenar

Reporter

Reported by a Visual Truth user through the Codex desktop app.

Environment

  • Codex desktop app on Windows
  • Codex in-app browser
  • Visual Truth 1.3.0
  • Local React/Vite-compatible app served from localhost

Bug

The Visual Truth Send to Codex button does not create or populate a message in the active Codex task when used inside the Codex in-app browser.

The emitted handoff also omits the currently selected DOM element when an element is selected but there is no recorded style/structure change or completed responsive review.

The copied brief contained only the route, viewport, and user's note. It did not contain the selected element's selector, label, text, parent, or current geometry.

Reproduction

  1. Open a local React site in the Codex in-app browser.
  2. Open Visual Truth 1.3.0.
  3. Select a DOM element.
  4. Add a note in Changes.
  5. Click Send to Codex.

Observed behavior

  • No message appears in the active Codex task.
  • Repeated clicks do not deliver a message.
  • The clipboard fallback works, but a selection-only handoff lacks the selected element.
  • The browser event visual-truth:send-to-codex originally includes only prompt, changes, previewContext, and clipboardCopied; there is no structured selectedElement.

Expected behavior

  • The Codex in-app browser should consume the supported handoff event and place the prompt into the active task, or visibly report that host handoff is unavailable.
  • The handoff should always identify the currently selected element, even with zero recorded edits.
  • The prompt should lead with the user's requested action.

Local fix/workaround implemented

The Visual Truth send handler was patched locally to:

  1. Prefix the prompt with Requested action: <user note>.
  2. Add a human-readable selected-element block to the prompt.
  3. Add a structured selectedElement object with selector, tag name, id, class name, visible text, parent selector, and viewport-relative geometry.
  4. Add the selected element to callback dependencies.
  5. Reapply the patch through a project postinstall script.

The patched project builds successfully. This fixes the payload and clipboard brief. It cannot fix Codex host transport from inside the webpage; the Codex app still needs to consume the browser event.

No private project source, screenshots, credentials, personal name, or company information are attached.

View original on GitHub ↗