[Bug]: Preview automation stays pinned to the first desktop client and is never re-ranked when the user moves to another machine
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
apps/serverディレクトリから始め、PreviewAutomationBrokerファイルを開いて、そのinvokeメソッドを見つけます。接続が有効な場合、environmentId + providerSessionIdをキーとするセッション割り当ては、現在、再ランキングされずに再利用されています。表示中の対象タブがあり、フォーカスがアクティブなホストを優先する既存のランキングロジックを見つけ、リクエストに別のホストが所有する明示的なtabIdがある場合、または割り当て先のホストには対象タブが表示されておらずフォーカスもない一方で、別のホストには対象タブが表示されフォーカスされている場合に、この再ランキングを実行するようinvokeを変更します。ユーザーがデスクトップクライアント間を切り替えたときにセッションが正しく再割り当てされることを確認するため、プレビュー自動化のテストスイートを実行します。
索引モデルが issue の本文から書いたものです。
説明
Area
apps/server (PreviewAutomationBroker)
Steps to reproduce
- Connect T3 Code Desktop on Machine A and Machine B to one environment that runs on Machine A.
- While working from Machine B, have an agent in a thread call any preview tool. The broker assigns the session to Machine B's browser host.
- Move to Machine A, open the same thread's Browser panel, and keep a tab visible and focused there. Leave Machine B's app running.
- Have the agent call
preview_snapshotorpreview_navigatewith an explicittabIdfor the tab that is visible on Machine A.
Expected behavior
The call runs in Machine A's browser, which owns the visible target tab and is focused.
Actual behavior
Every call still goes to Machine B (Preview automation <op> failed on client preview-…). localhost URLs fail with ERR_CONNECTION_REFUSED because Machine B can't reach Machine A's localhost. preview_status reports the tab as visible: false. Focusing Machine A, opening new tabs, and passing an explicit tabId have no effect.
Cause
In invoke, the assignment keyed by environmentId + providerSessionId is reused whenever its connection is still live. The ranking that prefers a host owning the visible target tab, then focus, only runs when there is no live assignment. Nothing re-ranks an existing assignment, so the session is pinned to the first host until that host disconnects. The only ways out are reloading or quitting the stale client, restarting the provider session, or triggering the eviction in #12898.
Suggested fix
Re-rank when the request has an explicit tabId that only another host owns, or when another host owns the target tab as visible and focused while the assigned host doesn't have it visible.
Related
#12898, #15335
Version
0.0.46-nightly.20261003.2638, macOS, Claude provider, local environment with a second desktop client over Tailscale.
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 7時間 58分
- マージ済み PR(30日)
- 258
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pingdotgg/t3code#16413 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pingdotgg/t3code#16401 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
platformatic/mcp#208 ·
メンテナーはふだん 1 日以内に返信
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
margelo/react-native-vision-camera#4211 ·
メンテナーはふだん 4 日以内に返信
-
bot:ai-assisted status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
midnightntwrk/midnight-js#1424 ·
メンテナーはふだん 1 日以内に返信