Restore the focus a thread had (chat or terminal) when switching back to it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
apps/web/src/lib/terminalFocus.tsと、スレッドに入る際のChatView.tsx内の呼び出し(2655行目付近)を読み、getTerminalFocusOwner()とfocusTerminalOnThreadEnterが返すクリーンアップ関数がフォーカスをどう扱うかを追ってください。サイドバーから明示的にターミナルを表示する動作を維持し、再現手順を確認してください。スレッドに戻ったとき、離れる際にフォーカスがあった場所に応じて、チャット入力欄またはターミナルにフォーカスが復元されます。
索引モデルが issue の本文から書いたものです。
説明
What happened
When I switch to a thread that has its terminal drawer open by clicking it in the sidebar, the terminal always takes focus. That happens even if I was typing in the chat input the last time I was in that thread. I have to click back into the chat input every time.
Request: when entering a thread, restore the focus it had when I left. If the terminal had focus, focus the terminal. If the chat input had focus, focus the chat input.
Diagnosis
ChatView.tsx (~L2655 at v0.1.7) calls focusTerminalOnThreadEnter (apps/web/src/lib/terminalFocus.ts ~L121) whenever a thread is entered. If the thread's drawer is open with an active terminal, that terminal is focused unconditionally. #25009 made this happen on every visit (before, it was officially limited to the first visit). The code is the same on main.
terminalFocus.ts already has getTerminalFocusOwner(), and focusTerminalOnThreadEnter returns a cleanup function that runs on thread leave. That cleanup could record per thread whether a terminal owned focus. On the next entry, the drawer terminal would be focused only if it did; otherwise the existing composer focus behaviour would apply. Explicit requests such as the sidebar terminal reveal (focusTerminalOnNavigation) would keep their current behaviour.
Steps to reproduce
- Open thread A and open its terminal drawer.
- Click into the chat input in thread A.
- Click thread B in the sidebar.
- Click thread A in the sidebar.
- Expected: the chat input has focus, as when I left. Actual: the terminal has focus.
Version
0.1.7 (desktop app)
Environment
Windows 10 Pro (10.0.19045) x64, T3 Code desktop app with its local server (0.1.7). Triage CLI 0.1.7.
Evidence
The behaviour comes from the code paths above; nothing relevant appears in the logs. The #25009 description says: "Entering a thread whose drawer is open focuses the drawer terminal on every visit."
Related issues
- #25009: introduced the current every-visit behaviour.
- #26407: thread shortcuts get swallowed when the terminal takes focus on entry. Same function; restoring the previous focus would also help there.
Fix applied or workaround
Close the terminal drawer before leaving the thread, or click into the chat input after switching.
Filed by
Claude Code (Claude Opus 5.5), via t3 triage
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 8時間 26分
- マージ済み PR(30日)
- 133
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
pingdotgg/t3code#33044 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
prime-radiant-inc/evener#5901 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Batcher binds the texture that opens a new batch twice (one draw call per element with maxBatchableTextures = 1)対応中かも @darzarzycki が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
area:study-data p2-high ready-for-agent type:chore
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fderuiter/deruiter.dev#3706 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nicobailon/pi-subagents#3242 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
awslabs/visual-asset-management-system#1234 ·
メンテナーはふだん 1 日以内に返信