feat(desktop): TODO ライブストリームをサブエージェント入れ子 + スタイリッシュ UI に刷新 (#234)#236
feat(desktop): TODO ライブストリームをサブエージェント入れ子 + スタイリッシュ UI に刷新 (#234)#236
Conversation
#234 — AgentManager の TODO 詳細で、Claude Code のサブエージェント (Task/Agent ツール) の tool_use/tool_result が親 Agent ブロック外にフラット表示される 不具合を修正し、併せて全体のビジュアルを改善する。 - supervisor: stream-json の `parent_tool_use_id` と tool_use/tool_result ブロックの id を抽出して TodoStreamEvent に `parentToolUseId` / `toolUseId` として伝搬。 - types: TodoStreamEvent に optional な id フィールドを追加。旧 jsonl (id 無し) は renderer 側の legacy 位置ペアリングで従来通り動作する。 - renderer: pairStreamEvents を id ベース + 親子ツリー化した buildStreamTree に差し替え。ToolCallCard はツリー再帰表示・ lucide-react のツール別アイコン/パレット・実行中 ShinyText シマー・ 子件数バッジを持つカード型に刷新。子がいる場合は初回に自動展開。 - globals.css: pure CSS の `.animate-shine` キーフレームを追加 (currentColor + --shine-peak で theme 対応)。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 43 minutes and 50 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7da887eca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Modern path: already attached via resultByUseId. | ||
| if (ev.toolUseId && toolNodeById.has(ev.toolUseId)) continue; |
There was a problem hiding this comment.
Prevent duplicate tool_result rows for out-of-order events
buildStreamTree pre-indexes tool_result by toolUseId and later attaches that result to the matching tool_use, but this guard only skips rendering the standalone result when the parent tool node has already been seen in the same pass. If a tool_result arrives before its tool_use (the exact out-of-order case this code is meant to handle), the result is first emitted as a message row and then also shown inside the tool card once the tool_use is processed, so the same output appears twice.
Useful? React with 👍 / 👎.
Closes #234
Summary
AgentManager の TODO 詳細ライブストリーム表示を改善します。
主な実装ポイント
Backend (
apps/desktop/src/main/todo-agent)classifyStreamJsonでparent_tool_use_id(top-level)、tool_use ブロックのid、tool_result ブロックのtool_use_idを抽出してTodoStreamEventに伝搬。TodoStreamEventに optional なtoolUseId/parentToolUseIdを追加。旧stream.jsonlとの互換は renderer 側の legacy 位置ペアリングで維持。Frontend (
apps/desktop/src/renderer/features/todo-agent/TodoManager)pairStreamEvents(位置ベース) →buildStreamTree(id ベース + サブエージェント親子ツリー) に差し替え。ToolCallCardをツリー再帰レンダリング対応に再設計。<details>は controlledopenstate にして、再レンダリング時にユーザーの展開操作が巻き戻る問題を回避。子が 0→1 になった瞬間だけ自動展開。<ShinyText>適用。getToolPalette()で Bash/Read/Edit/Write/Grep/Glob/Task/Agent/TodoWrite/WebFetch/WebSearch 等の色分けとアイコン表示。Styling (
apps/desktop/src/renderer/globals.css)@keyframes shine+.animate-shineを追加。currentColorと--shine-peak(light/dark テーマ別) を使った軽量なシマー。テスト観点
bun run typecheck✅ 通過確認済みbun run lint✅ 通過確認済みtoolUseIdが無いもの) を開いたとき、tool_use ↔ tool_result の組がこれまで通り対表示されること参考
parent_tool_use_idfield, letting you track which messages belong to which subagent execution."