Skip to content

feat(room): tell a busy seat what the other seats are doing (mcp-config, src-tauri, screen, sidecar, docs) - #413

Merged
liplus-lin-lay merged 1 commit into
mainfrom
feat/412-seat-status-line
Oct 13, 2026
Merged

liplus-lin-lay merged 1 commit into
mainfrom
feat/412-seat-status-line

Conversation

@liplus-lin-lay

Copy link
Copy Markdown
Member

Closes #412

変えたこと

動いている席の端末へ、ほかの席の今の様子を一行だけ打つようにした。

[pullcept] {"role":"status","seats":{"Lay":"writing","Lin":"delegating"}}
  • 一行の形: 一行目の札の形のまま role が status。message_id・from は付けない。部屋の記録(床・ログ・room-message)には残さず、画面にも投稿として出ない。自分の席は載せない。
  • 言葉: 参加者パネルの札を英語の七つへ対応させる(mcp_config::seat_status::Word::from_badge)。待機→idle、考え中…→thinking、出力中→writing、ツール(と Codex の 実行中・編集中・検索中・要約中・画像生成・画像参照)→tool、委任中→delegating、許可待ち(と Codex の 答え待ち)→permission、制限中→limited。言葉の無い札(様子不明など)の席は載せない。
  • いつ・誰に(Ledger::due、テストあり): 札が thinking/writing/tool/delegating の席にだけ。受け取る席ごとに最後に打った内容を覚え、ほかの席の様子が変わったときだけ打つ。自分の様子が変わっただけでは打たない。ほかに言葉のある席が無ければ打たない。起動し直した席は新しい端末として最初から。
  • 届け方: Claude Code の席にも app-server 方式の Codex の席にも、投稿と同じく端末(PTY)の一本の打ち込み列で打つ(PtyState::type_status)。thread/inject_items は使わない——Codex の席でも部屋の投稿は TUI の端末へ打ち込まれており、同じ経路にそろえた。
  • 打てないときは捨てる: 許可待ちの Claude Code の席・投稿を預かっている席(prompt_hold::Queue::would_keep、hook_activity::type_status)、人が入力欄に打ちかけている席には打たず、預からない。打てなかった一行は次の変わりでもう一度対象になる。
  • 作法: sidecar/src/index.ts の Reading に一行足した(role "status" の札は投稿ではなく、message_id が無く、last_seen に使わず、返事不要)。1792 字の上限に収まる。
  • docs/1-room.md に節を足し、docs/4-status.md に実装状況を書いた。

判断して決めたこと(issue の見込みから外れた点)

  • 様子は画面から受け取る。 issue の対象ファイルの見込みは src-tauri/src/hook_activity.rs・codex_app_server.rs で様子の変化を受けて打つ形だったが、thinking(考え中…)と writing(出力中)は端末に文字が出ているかと部屋がその名前の返事を待っているかで決まり、それを持つのは画面(src/seat-status.ts の activityNote)だけである。バックエンドの hook / app-server の知らせだけでは七つのうち二つが作れず、受け取る席が「動いている」かの判定も Claude Code の席では作れない(中断したターンは Stop を送らない)。そこで画面が参加者パネルと同じ読み方で全トピックの席の札を読み、変わったときだけ Tauri コマンド seat_words で渡す形にした(src/main.ts の reportSeatWords、新しい src-tauri/src/seat_status.rs)。このため src/main.ts・src-tauri/src/lib.rs・src-tauri/src/pty.rs も変えた。codex_app_server.rs は変えていない。
  • sidecar/test/nickname-ui.test.mjs は trackAddress を単独で評価しているため、reportSeatWords の空の差し替えを足した。

確かめた範囲

  • crates/mcp-config: cargo test 全件通過(新しい seat_status のテスト 12 件、prompt_hold の would_keep のテスト 1 件を含む)。
  • npm run build(画面の型検査とビルド)、npm run sidecar:check、npm run sidecar:test(79 件通過。作法の字数上限を含む)。
  • src-tauri: cargo check・cargo clippy で、変えたファイルに警告は無い。

未確認(実機では確かめていない)

  • 動いている Claude Code の席と Codex の席に一行が実際に届き、投稿として扱わず返事もしないこと。許可待ち・打ちかけのある席で捨てられること。
  • 試すときに見ること(issue より):
    • ほぼ同時に動き始めた二席が、お互いに「相手が動いている」を見て、二人とも黙ることがあるか。起きたら、動き始めの時刻を足す。
    • 席が動いている間に打った一行が、ターンの終わりまで読まれずに残り、次のターンを始めてしまうことがあるか。

🤖 Generated with Claude Code

https://claude.ai/code/session_01NYQn8NK3atdbSGNYFKDEjx

— Claude Lin

… (mcp-config, src-tauri, screen, sidecar, docs)

A seat that is working now gets one line typed into its terminal when the
other seats' words change:
[pullcept] {"role":"status","seats":{"Lay":"writing","Lin":"delegating"}}
It is a label, not a post: no message_id, no from, never logged, never shown
as a post. The words are the participant panel's badges mapped to idle /
thinking / writing / tool / delegating / permission / limited. The screen
reads every topic's seats with activityNote and hands them over through the
new seat_words command only when the reading changes (reportSeatWords).
mcp_config::seat_status decides who gets what: only busy seats (thinking /
writing / tool / delegating), never their own word, only when the others'
words differ from what that seat was last typed. The line travels the post
path for both Claude Code and Codex app-server seats (the PTY typing queue),
and is dropped, never kept, for a Claude Code seat waiting on a prompt or with
posts kept (prompt_hold::Queue::would_keep) and for a box the person is typing
in (PtyState::type_status). The room instructions gain one line saying a
status label is not a post, has no message_id, is never last_seen and needs
no reply.

同じ投稿に二つの席が同時に動き始めて同じ調べ物をする無駄を減らすため、動いている席にだけ、ほかの席の今の様子を一行で知らせる。docs/1-room.md と docs/4-status.md も同じ変更で更新した。

#412

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NYQn8NK3atdbSGNYFKDEjx
@liplus-lin-lay liplus-lin-lay linked an issue Oct 13, 2026 that may be closed by this pull request

@liplus-lin-lay liplus-lin-lay left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

セルフレビュー(auto モード)

  • 受け入れ条件:#412 の「決めたこと」と「制約」を満たしている。一行の形は [pullcept] {"role":"status","seats":{…}} で message_id を持たず、部屋の記録に残さない。動いている席にだけ、ほかの席の言葉が変わったときだけ打ち、自分の席は載せない。許可待ち・預かり中・打ちかけの席では捨てて預からない。言葉は英語の七つ。判定と組み立ては crates/mcp-config/src/seat_status.rs にテスト付きで置かれ、CI(run 38448672841)は通っている。
  • 範囲の外れ:様子を画面から受け取る形にしたため、issue の見込みに無かった src/main.ts・src-tauri/src/lib.rs・src-tauri/src/pty.rs・src-tauri/src/seat_status.rs を変えている。「考え中…」と「出力中」、中断したターンの扱いは画面しか持っていないので、妥当と判断した。codex_app_server.rs は変えていない(Codex の席も投稿は端末へ打たれているため)。
  • Lay のレビュー(同じ head 3edeadf):止める点なし。札の決め方から、席どうしの知らせの行き来は起きないことも確かめてもらった。残る点「打った一行で出力中が少し長引く」は実機で見る。
  • ワークスペース側の後回し:なし。
  • 次:直接マージする。実機での確認(docs/4-status.md の未確認)はマージ後に行う。

— Claude Lin

@liplus-lin-lay
liplus-lin-lay merged commit ee8fb6a into main Oct 13, 2026
2 checks passed
@liplus-lin-lay
liplus-lin-lay deleted the feat/412-seat-status-line branch October 13, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(room): tell a busy seat what the other seats are doing

2 participants