Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: preview_evaluate accepts returnByValue:false but returns no usable object reference

Abierto Apto para principiantes
#22,946 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@juliusmarminge ya está trabajando en esto.

Desde el 21/10/2026.

  • #22948 de @juliusmarminge — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
electron, typescript

Línea de trabajo

Lee el contrato de returnByValue en packages/contracts/src/previewAutomation.ts y el mapeo de resultados en apps/server/src/preview/ServerBrowserPage.ts. Compara el comportamiento de Runtime.evaluate con false y true, y luego comprueba la cobertura en las pruebas existentes de automatización de vista previa. Se considera terminado cuando false devuelve una referencia utilizable a un objeto remoto o se rechaza explícitamente, mientras que default y true siguen devolviendo el contenido del objeto.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug needs-triage

Written by human: this is possibly the lowest-priority issue I've ever opened. I seriously doubt anybody has ever actually encountered this problem naturally, but because it was mentioned once, my clankers keep bugging me to get this one fixed. IMO, the right solution is just to reject returnByValue:false altogether and close this out.


Written by AI:

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

packages/contracts or packages/shared

Steps to reproduce
  1. Open a fresh blank preview tab in T3 Code Desktop:

    preview_open({
      profileId: "incognito",
      reuseExistingTab: false,
      open: true,
      show: true
    })
    
  2. Retain its tab ID and evaluate an object with non-by-value mode:

    preview_evaluate({
      tabId,
      expression: "({ alpha: 1, href: location.href })",
      returnByValue: false
    })
    
  3. Repeat with returnByValue:true.

  4. Repeat with returnByValue omitted.

Expected behavior

Either return a usable remote-object reference, as the contract describes, or explicitly reject the unsupported false option.

Default and explicit by-value evaluation should continue returning object contents.

Actual behavior

returnByValue:false succeeds but returns only:

{"value":"Object"}

There is no object handle or content in the result.

The same expression with returnByValue:true returns:

{"value":{"alpha":1,"href":"about:blank"}}

Default by-value evaluation also works. The behavior reproduced repeatedly, on both a blank page and a locally served static page.

The original generic execution error from #3716 did not reproduce. This report concerns the remaining contract mismatch.

Impact

Minor bug or occasional failure

Version or commit

main @ 680152e27b2a961686389ca69a1557cbb2c55f08

Environment

Linux x86_64; Electron 44.9.3; Chromium 152.0.7977.167; Codex provider through T3 Code.

Logs or stack traces
No exception is returned.

The contract describes `returnByValue` as:

> Serialize and return the value instead of a remote object reference. Defaults to true.

https://github.com/pingdotgg/t3code/blob/680152e27b2a961686389ca69a1557cbb2c55f08/packages/contracts/src/previewAutomation.ts#L622

The server forwards the option to `Runtime.evaluate`, then maps the result to its value or description. The remote object ID is not returned:

https://github.com/pingdotgg/t3code/blob/680152e27b2a961686389ca69a1557cbb2c55f08/apps/server/src/preview/ServerBrowserPage.ts#L851
Screenshots, recordings, or supporting files

No response

Workaround

Omit returnByValue or set it to true when inspecting serializable values.

Related issues

Focused follow-up requested in the closing comment on #3716:
https://github.com/pingdotgg/t3code/issues/3716#issuecomment-6314979496

Explicitly rejecting false would resolve this report without requiring a new remote-object manipulation feature.

Investigated and drafted by GPT-6.1-Sol through the Codex harness in T3 Code.

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
4 h 35 min
PR fusionados (30 d)
174

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.