159 lines
8.9 KiB
Markdown
159 lines
8.9 KiB
Markdown
<!-- event: create author: LocalTicketBackend at: 2026-06-24T11:39:59Z -->
|
||
|
||
## 作成
|
||
|
||
LocalTicketBackend によって作成されました。
|
||
|
||
---
|
||
|
||
<!-- event: intake_summary author: ticket-intake at: 2026-06-24T11:56:52Z -->
|
||
|
||
## Intake summary
|
||
|
||
ユーザーが draft 内容を確認し、Ticket `00001KVWPW3KX` を ready にするよう明示した。Ticket 本文には implementation_ready、blocking open questions なし、対象範囲・invariants・validation が記録済みで、Orchestrator が implementation routing を判断できる。
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: ticket-intake at: 2026-06-24T11:56:52Z from: planning to: ready reason: user_confirmed_ready field: state -->
|
||
|
||
## State changed
|
||
|
||
ユーザー確認済みのため planning から ready へ移行する。blocking open questions はなく、Orchestrator は通常の routing 判断に進める。
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: workspace-panel at: 2026-06-24T12:01:41Z from: ready to: queued reason: queued field: state -->
|
||
|
||
## State changed
|
||
|
||
Ticket を `workspace-panel` が queued にしました。
|
||
|
||
|
||
---
|
||
|
||
<!-- event: decision author: yoi-orchestrator at: 2026-06-24T12:03:09Z -->
|
||
|
||
## Decision
|
||
|
||
Routing decision: implementation_ready
|
||
|
||
Reason:
|
||
- Dashboard Queue により人間が Orchestrator routing を許可した queued Ticket として確認した。
|
||
- Ticket body は TUI Console の連続 Thinking block を render-time で一つの表示 group にまとめる目的、non-goals、binding invariants、validation を具体的に列挙している。
|
||
- `TicketRelationQuery` は blocking relation 0 件、`TicketOrchestrationPlanQuery` は既存 plan 0 件だった。
|
||
- risk flags は TUI rendering / reasoning-display / block-aggregation / text-selection だが、protocol / pod / persistence 変更をしない、source block sequence を保持する、turn boundary / non-Thinking block を跨がない、selection behavior を壊さない、という invariant が明示されている。risk は reviewer focus として扱えばよく、planning return 理由にはならない。
|
||
- 同時 queued Ticket `00001KVWPVHFJ` は Pod/session storage cleanup CLI で code surface が別。conflict risk は低く、別 worktree/branch で並列開始可能。
|
||
|
||
Evidence checked:
|
||
- Ticket body / thread: `item.md`, `thread.md`。thread は create、planning->ready、ready->queued のみで未解決 blocker は記録されていない。
|
||
- Relations / orchestration plan: relation 0 件、routing 前 plan 0 件。accepted plan `orch-plan-20260624-120242-1` を記録済み。
|
||
- Code map: Grep で `ThinkingStart` / `ThinkingDelta` / `ThinkingStop` / `thinking` 周辺を確認し、primary files `crates/tui/src/block.rs`, `crates/tui/src/app.rs`, `crates/tui/src/ui.rs`, `crates/tui/src/tool.rs` が妥当。
|
||
- Workspace state: `/home/hare/Projects/yoi/.worktree/orchestration` は clean。active inprogress Ticket は 0 件。
|
||
|
||
IntentPacket:
|
||
|
||
Intent:
|
||
- TUI Console の transcript rendering で、assistant turn 内に連続する `Thinking` blocks を一つの表示 group として描画し、reasoning が細切れに見える UX を改善する。
|
||
|
||
Binding decisions / invariants:
|
||
- これは render-time aggregation。history / protocol / persistence / block sequence は変更しない。
|
||
- turn boundary を跨いで group 化しない。
|
||
- non-Thinking block を跨いで group 化しない。
|
||
- streaming / incomplete thinking を隠さない。
|
||
- Thinking を selectable/copyable transcript text に変える UX 変更はしない。
|
||
- Dashboard / Panel / web UI は対象外。
|
||
|
||
Requirements / acceptance criteria:
|
||
- 連続 Thinking blocks が Console 表示で一つのまとまりとして見える。
|
||
- 既存の `Read` aggregation / tool rendering と同様に、rendering helper が consumed count 等で `compute_history` の走査を壊さない。
|
||
- 単独 Thinking block の表示は regress しない。
|
||
- Detail mode / collapsed mode / streaming state が破綻しない。
|
||
- focused unit tests で consecutive Thinking, non-Thinking separator, turn boundary, incomplete/streaming case を確認する。
|
||
|
||
Implementation latitude:
|
||
- `render_thinking` を単体 renderer として残し、必要なら aggregate renderer/helper を追加してよい。
|
||
- Header 文言、elapsed 表示、detail mode の separator/index/blank line は既存 UX に沿って実装判断してよい。
|
||
- `compute_history` の構造に合わせ、最小変更で実装してよい。
|
||
|
||
Escalate if:
|
||
- protocol / pod / persistence 層の変更が必要になる。
|
||
- Thinking を text selection/copy target にする必要が出る。
|
||
- Provider-specific reasoning metadata の意味づけ変更が必要になる。
|
||
- Console 以外の UI surface に範囲が広がる。
|
||
- broad TUI rendering rewrite が必要になる。
|
||
|
||
Validation:
|
||
- `cargo test -p tui` または focused `cargo test -p tui thinking` / rendering tests。
|
||
- `cargo fmt --check`。
|
||
- `git diff --check`。
|
||
- 必要に応じて `cargo check -p tui`。
|
||
|
||
Current code map:
|
||
- Primary: `crates/tui/src/block.rs`, `crates/tui/src/app.rs`, `crates/tui/src/ui.rs`, `crates/tui/src/tool.rs`。
|
||
- Avoid: protocol/history/persistence, Dashboard/Panel/web UI, broad TUI rewrite。
|
||
|
||
Critical risks / reviewer focus:
|
||
- source blocks/history を変更してしまうこと。
|
||
- non-Thinking block や turn boundary を跨いだ誤 grouping。
|
||
- streaming/incomplete thinking state の欠落。
|
||
- text selection/copy semantics の accidental change。
|
||
|
||
Next action:
|
||
- `queued -> inprogress` を記録してから worktree-workflow で dedicated worktree を作成し、Coder/Reviewer sibling loop に進める。
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-24T12:04:07Z from: queued to: inprogress reason: orchestrator_acceptance_unblocked field: state -->
|
||
|
||
## State changed
|
||
|
||
Orchestrator acceptance: queued -> inprogress
|
||
|
||
- 直前確認で `TicketShow` は state `queued`、blocking relation は 0 件、accepted plan `orch-plan-20260624-120242-1` を確認した。
|
||
- 同時 queued Ticket `00001KVWPVHFJ` は disjoint code surface のため別 worktree/branch で並列開始可能と判断した。
|
||
- routing decision と IntentPacket は Ticket thread に記録済み。
|
||
- これ以降に worktree-workflow で `/home/hare/Projects/yoi/.worktree/00001KVWPW3KX-thinking-group` を作成し、multi-agent-workflow に接続する。
|
||
|
||
---
|
||
|
||
<!-- event: implementation_report author: hare at: 2026-06-24T12:14:38Z -->
|
||
|
||
## Implementation report
|
||
|
||
実装報告: Ticket `00001KVWPW3KX` / TUI Console: 連続した Thinking block を一つの表示グループにまとめる
|
||
|
||
変更内容:
|
||
- `crates/tui/src/ui.rs`
|
||
- `compute_history` の render-time 処理で、連続する `Block::Thinking` だけをまとめて消費する `render_thinking_aggregate` を追加しました。
|
||
- 単一の Thinking block は既存 `render_thinking` へ委譲し、単体表示の互換性を維持しました。
|
||
- 複数 Thinking group は `Normal` / `Overview` では 1 つのヘッダーとして表示し、`Detail` では各 Thinking block の状態ヘッダーと本文を下位項目として読めるようにしました。
|
||
- streaming 中の group は `Thinking...` と最新 streaming tail preview を表示し、incomplete が含まれる場合はヘッダーに `interrupted` を含めるようにしました。
|
||
- group 行は `compute_history` 側で selectable=false のまま扱い、Thinking を選択・コピー可能な transcript text にしていません。
|
||
- 連続 Thinking、非 Thinking separator、turn boundary、streaming/incomplete、単一 Thinking、tool 表示回帰の単体テストを追加しました。
|
||
- `crates/tui/src/dashboard/tests.rs`
|
||
- `cargo test -p tui` の validation を通すため、既存 dashboard test fixture の `TicketRoleLaunchResult` に現行必須 field `acceptance_evidence` を補いました。
|
||
|
||
保持した不変条件:
|
||
- history / session / protocol / reasoning persistence / source block sequence は変更していません。
|
||
- group 化は Console TUI の render-time のみです。
|
||
- `Block::Thinking` が連続している場合だけ group 化し、非 Thinking block や `TurnHeader` を跨ぎません。
|
||
- streaming/incomplete 状態はヘッダーと preview/detail で見えるままにしています。
|
||
|
||
検証結果:
|
||
- `cargo test -p tui thinking -- --nocapture`: PASS(6 tests)
|
||
- `cargo test -p tui tool -- --nocapture`: PASS(2 tests)
|
||
- `cargo test -p tui`: PASS(382 tests)
|
||
- `cargo fmt --check`: PASS
|
||
- `cargo check -p tui`: PASS
|
||
- `git diff --check`: PASS
|
||
|
||
実装 commit:
|
||
- `0b2ce6ca1f7ae44bc43bbf5afb440e35e69c705b` (`tui: group consecutive thinking blocks`)
|
||
|
||
残リスク:
|
||
- 実端末での目視確認は行っていません。テストは `compute_history` の行テキスト・selectable 属性を中心に確認しています。
|
||
- group header の文言は既存 Console 表示に合わせて英語にしています。将来 UI 文言を整理する場合は別途調整してください。
|
||
|
||
|
||
---
|