Conversation
同一セッション内に agent ペインを複数作れてしまい、サイドバーのバッジ・ 通知が最初の agent しか追えず、phase 状態も worktree 単位の共有キーで 衝突していた。agent は 1 セッション 1 つに制限する。 - TerminalPool に has_agent_pane / activate_agent を追加。 - 没入の Ctrl-G: 既存 agent があればそのタブへ移動、無ければ追加。 - 在席の agent コマンド(Menu/`a`・Prompt・統括の typed agent)も同様に、 既存 agent があれば新規追加せずそのタブへ移動。 - 既存 agent 再利用時は fresh spawn 扱いにせず、queued prompt を消費しない。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📊 Test Coverage
🎉✨ パーフェクト!全ファイル Lines カバレッジ 100% を達成しました 🏆🐰 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
同一セッション(worktree)内に agent ペインを複数作れてしまっていた。複数 agent があると次の問題が起きる:
refresh_watchedが.find(PaneKind::Agent)で先頭の agent だけを監視)。agent_state_store)に記録されるため、2 つの agent が同じキーに書き込み、互いの状態を上書きする。設計上「1 セッション = agent 1 つ + terminal 複数」が前提なので、agent を 1 セッション 1 つに制限する。
変更内容
TerminalPoolにhas_agent_pane/activate_agentを追加。Ctrl-G: 既存 agent があればそのタブへ移動、無ければ追加。agent(Menu のa・Prompt・統括の typedagent): いずれも既存 agent があれば新規追加せずそのタブへ移動。session_promptのキュー済みプロンプトを消費しない(fresh_agent_spawnを補正)。terminalは従来どおり何枚でも追加可能(制限は agent のみ)。document/design/05-home.md/document/03-commands/02-tui.md)を「agent は 1 セッション 1 つ/Ctrl-G・agentは既存タブへ移動」に更新。テスト・確認方法
cargo fmt --check/cargo clippy --all-targets -- -D warnings/cargo test(1507 passed)すべて通過。tui/home/mod.rs/tui/home/terminal_pool.rs)はカバレッジ除外対象(scripts/coverage.shのCOVERAGE_IGNORE)のため新規テストは不要。🤖 Generated with Claude Code