Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#22,946 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
electron, typescript

調査の方向性

packages/contracts/src/previewAutomation.ts の returnByValue の仕様と、apps/server/src/preview/ServerBrowserPage.ts の結果マッピングを読みます。false と true の場合の Runtime.evaluate の動作を比較し、既存のプレビュー自動化テストでカバレッジを確認します。false が利用可能なリモートオブジェクト参照を返すか、明示的に拒否され、default と true は引き続きオブジェクトの内容を返す状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
3時間 39分
マージ済み PR(30日)
301

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。