ticket: accept panel mouse and rewind routing

This commit is contained in:
Keisuke Hirata 2026-06-13 19:57:19 +09:00
parent 68f1631672
commit 20daae0c59
No known key found for this signature in database
9 changed files with 197 additions and 5 deletions

View File

@ -0,0 +1 @@
{"id":"orch-plan-20260613-105639-1","ticket_id":"00001KV04NJ8D","kind":"accepted_plan","accepted_plan":{"summary":"Manual rewind picker Enter 後に live TUI 表示が巻き戻らない問題を専用 worktree で調査・修正する。Pod-authoritative rewind semantics を維持し、`Event::RewindApplied` restore failure / picker pending / stale live update を focused tests で確認する。root/original workspace では作業しない。","branch":"ticket-00001KV04NJ8D-rewind-live-refresh","worktree":"/home/hare/Projects/yoi/.worktree/rewind-live-refresh","role_plan":"Orchestrator が dedicated child worktree を作成し、Coder Pod に `crates/tui` / `crates/pod` / `crates/protocol` の narrow write scope を渡す。Coder はまず必要なら一時 diagnostic / focused reproduction seam で `RewindApplied` timing と restore path を切り分け、最終 diff から一時ログを除去する。Reviewer は read-only を基本に起動する。"},"author":"orchestrator","at":"2026-06-13T10:56:39Z"}

View File

@ -1,8 +1,8 @@
--- ---
title: 'TUI rewind picker の Enter 後に live 表示が巻き戻らない問題を調査・修正する' title: 'TUI rewind picker の Enter 後に live 表示が巻き戻らない問題を調査・修正する'
state: 'queued' state: 'inprogress'
created_at: '2026-06-13T09:23:07Z' created_at: '2026-06-13T09:23:07Z'
updated_at: '2026-06-13T10:53:20Z' updated_at: '2026-06-13T10:56:45Z'
assignee: null assignee: null
readiness: 'implementation_ready' readiness: 'implementation_ready'
risk_flags: ['tui', 'pod-protocol', 'persistence', 'history-rewind'] risk_flags: ['tui', 'pod-protocol', 'persistence', 'history-rewind']

View File

@ -108,4 +108,82 @@ LocalTicketBackend によって作成されました。
Ticket を `workspace-panel` が queued にしました。 Ticket を `workspace-panel` が queued にしました。
---
<!-- event: decision author: orchestrator at: 2026-06-13T10:56:29Z -->
## Decision
Routing decision: implementation_ready
Reason:
- Ticket は `queued` で、症状、既知の関連実装、受け入れ条件、調査範囲、実装 latitude、escalation conditions が具体化されている。
- `TicketRelationQuery``TicketOrchestrationPlanQuery` で blocker / ordering / conflict 記録は見つからなかった。
- 関連の closed Ticket `00001KSKBPBX0` は rewind picker / RewindTo flow の既存実装背景として確認済みで、本 Ticket はその follow-up bugfix として独立に扱える。
- risk flags は `tui-state` / `rewind` / `stream-sync` だが、Ticket は rewind 成功時に live 表示を snapshot/remaining session に同期する invariant と、generation id / reload を含む実装 latitude を明記しており、実装前に不足する設計判断はない。
- 現 Orchestrator worktree は clean。root/original workspace では git/read/write/validate せず、実装は専用 child worktree に隔離する。
- 主な変更面は single-Pod rewind / app state / Pod RewindTo response path で、Panel mouse selection Ticket `00001KV072V89` の panel row hit-test surface とは分離できるため並列開始候補にする。
Evidence checked:
- Ticket body / thread / artifactsartifacts なし)。
- relation records: なし。
- orchestration plan records: なし。
- related Ticket `00001KSKBPBX0` の intent / prior rewind picker scope。
- code map: `crates/tui/src/single_pod.rs` の rewind picker/UI flow、`crates/tui/src/app.rs` の app state / event handling、`crates/pod/src/**` の `RewindTo` / `RewindApplied` path、`crates/protocol` の response type 周辺。
- workspace/Pod state: Orchestrator worktree clean、visible live implementation Pods なし。
IntentPacket:
Intent:
- rewind picker で Enter により RewindTo が成功した後、TUI live 表示が巻き戻し後の session tail / snapshot 状態へ確実に同期されるようにする。
Binding decisions / invariants:
- RewindTo の成功通知だけを見て cosmetic reload するのではなく、表示 state と Pod/session state の整合を保つ。
- rewind は破壊的 state operation なので、古い generation / stale stream / stale pending reload が live 表示を再汚染しないこと。
- TUI-local state fix を優先し、Pod の永続 session model / history authority を不必要に変更しない。
- 未完了 run や stream 中の rewind を勝手に許可しない。既存 idle/control constraints を尊重する。
Requirements / acceptance criteria:
- rewind picker Enter 後、成功した rewind target より後の old output / live tail が残らない。
- 成功後の composer/status/actionbar が既存 UX と矛盾しない。
- no-op / cancelled / failed rewind では表示を誤って消さない。
- stale stream/update が rewind 後の表示を復活させない。
- focused tests で rewind success / failure / stale update などを確認する。
Implementation latitude:
- Pod response に既存情報で足りるなら TUI 側 reload/generation 管理で直す。
- 既存 protocol が足りない場合は最小の typed response 拡張を検討してよいが、protocol/API の互換境界を変える必要がある場合は escalation する。
- UI reload のタイミング、generation id、snapshot再取得、buffer clear のどれを使うかは bounded investigation に委ねる。
Escalate if:
- protocol/API の public contract を大きく変える必要がある。
- rewind の history authority / persisted session semantics を変更しないと直せない。
- stream中 rewind許可や concurrent run semantics の設計判断が必要になる。
- fix が broad TUI event-loop rewrite を要求する。
Validation:
- focused TUI/app rewind tests、必要なら Pod protocol/unit tests。
- `cargo fmt --check`
- `git diff --check`
- 変更範囲に応じて `cargo test -p tui` / `cargo test -p pod` / `cargo check --workspace --all-targets`
Current code map:
- `crates/tui/src/single_pod.rs`: rewind picker input/display flow。
- `crates/tui/src/app.rs`: session item/live state、pending reload、generation/stream handling の候補。
- `crates/pod/src/**` and `crates/protocol/**`: `RewindTo` / `RewindApplied` response path and typed metadata。
Critical risks / reviewer focus:
- 成功 rewind 後に old assistant output / live tail が残らないこと。
- failed/cancelled rewind の no-op semantics。
- stale stream/reload ordering。
- persisted history authority を TUI 側都合で歪めていないこと。
---
<!-- event: state_changed author: orchestrator at: 2026-06-13T10:56:45Z from: queued to: inprogress reason: orchestrator_acceptance field: state -->
## State changed
Ticket evidence、relations、orchestration plan、関連 closed Ticket、bounded code map、Orchestrator worktree clean state を確認した。blocking relation はなく、rewind live refresh の要件・invariants・escalation conditions は実装可能な粒度で記録済み。実装 side effect の前に routing decision / IntentPacket / accepted plan を記録したため、専用 child worktree と Coder delegation に進む。
--- ---

View File

@ -0,0 +1,2 @@
{"id":"orch-plan-20260613-105653-1","ticket_id":"00001KV0723PC","kind":"conflicts_with","related_ticket":"00001KV072V89","note":"同時 queued routing で `00001KV072V89` を panel mouse selection として受理した。`00001KV0723PC` は spike/readiness の通り `crates/tui/src/multi_pod.rs` の Panel event loop / `PendingReload` / Quit handling / queue-attention notice dispatch / snapshot reload をまず調査する必要があり、`00001KV072V89` も同じ `multi_pod.rs` / Panel row input surface に触れる可能性が高い。衝突 risk が小さくないため、この Ticket は `00001KV072V89` の branch が統合または再評価可能になるまで queued のまま待機させる。","author":"orchestrator","at":"2026-06-13T10:56:53Z"}
{"id":"orch-plan-20260613-105659-2","ticket_id":"00001KV0723PC","kind":"waiting_capacity_note","note":"現在の queue review では `00001KV072V89`Panel mouse selectionと `00001KV04NJ8D`single-Pod rewind live refreshを先に inprogress 受理する。`00001KV0723PC` は Panel Quit 遅延の spike/fix で同じ Panel event-loop surface に触れる可能性が高く、parallel merge conflict と reviewer bottleneck を避けるため queued のまま待機。`00001KV072V89` の統合後、または Orchestrator が conflict surface を再評価して問題なしと判断した場合に受理する。","author":"orchestrator","at":"2026-06-13T10:56:59Z"}

View File

@ -2,7 +2,7 @@
title: 'Panel Quit 時の断続的な遅延を調査して解消する' title: 'Panel Quit 時の断続的な遅延を調査して解消する'
state: 'queued' state: 'queued'
created_at: '2026-06-13T10:04:55Z' created_at: '2026-06-13T10:04:55Z'
updated_at: '2026-06-13T10:53:17Z' updated_at: '2026-06-13T10:57:14Z'
assignee: null assignee: null
readiness: 'spike_needed' readiness: 'spike_needed'
risk_flags: ['tui-panel', 'shutdown-latency', 'async-cancellation'] risk_flags: ['tui-panel', 'shutdown-latency', 'async-cancellation']

View File

@ -29,4 +29,35 @@ Panel から Quit するときに断続的な遅延が発生する問題につ
Ticket を `workspace-panel` が queued にしました。 Ticket を `workspace-panel` が queued にしました。
---
<!-- event: decision author: orchestrator at: 2026-06-13T10:57:14Z -->
## Decision
Routing decision: spike_needed / queued_waiting_capacity
Reason:
- Ticket は `queued` で要件は明確だが、readiness は `spike_needed`。遅延原因・再現条件・影響 async path は未特定で、まず `crates/tui/src/multi_pod.rs` の Panel event loop / `PendingReload` / Quit handling / queue-attention notice dispatch / snapshot reload 周辺の code-path analysis が必要。
- `TicketRelationQuery``TicketOrchestrationPlanQuery` で durable blocker はなかったが、この queue review では `00001KV072V89`Workspace panel mouse selectionを先に inprogress 受理した。
- `00001KV0723PC``00001KV072V89` はどちらも Panel / `multi_pod.rs` の event/input/render/reload surface に触れる可能性が高く、同時 child worktree で進めると conflict risk と reviewer bottleneck が大きい。
- `00001KV04NJ8D` は single-Pod rewind / Pod protocol 周辺の別 surface として parallel start 可能なため、現在の capacity は `00001KV072V89``00001KV04NJ8D` に割り当てる。
Evidence checked:
- Ticket body / thread / artifactsartifacts なし)。
- relation records: なし。
- orchestration plan records: この routing pass で `00001KV072V89` との `conflicts_with` と waiting-capacity note を記録。
- related closed Ticket `00001KTFMMZP0`: Panel non-blocking transition work は closed で、`PendingReload` / background refresh / attach-return path の背景として関連するが、今回の Quit 遅延とは別 follow-up。
- code map: `crates/tui/src/multi_pod.rs` の run loop、`PendingReload`、Quit action、queue-attention notice dispatch、terminal event poll/reload interaction。
- workspace/Pod state: Orchestrator worktree clean。implementation Pods はまだ起動していないが、この routing pass で 2 件を受理予定。
Next action:
- この Ticket は queued のまま保持する。
- `00001KV072V89` の branch が統合されるか、panel surface conflict が低いと再評価できた時点で、改めて `queued -> inprogress` 受理を検討する。
- 受理時の first step は read-only/code-path spike とし、Quit が pending background work / notice dispatch / snapshot reload で block される path を特定してから修正する。
Escalate if:
- Quit 遅延の修正が terminal cleanup、Pod lifecycle authority、Ticket workflow semantics、または broad TUI runtime-loop redesign を必要とする場合。
- 原因が Panel 外OS terminal / shell / external command / specific provider/networkにある証拠が出た場合。
--- ---

View File

@ -0,0 +1 @@
{"id":"orch-plan-20260613-105558-1","ticket_id":"00001KV072V89","kind":"accepted_plan","accepted_plan":{"summary":"Panel/View row click selection を dedicated implementation worktree で実装する。対象は Panel rows の hit-test と selection update、既存 keyboard/composer/action semantics preservation、focused TUI tests。root/original workspace では作業しない。","branch":"ticket-00001KV072V89-panel-mouse-selection","worktree":"/home/hare/Projects/yoi/.worktree/panel-mouse-selection","role_plan":"Orchestrator が dedicated child worktree を作成し、Coder Pod に `crates/tui` 周辺の narrow write scope を渡す。Reviewer は reviewer phase で read-only を基本に起動する。`00001KV0723PC` は同じ panel event-loop surface のためこの branch の統合まで queued 待ち。"},"author":"orchestrator","at":"2026-06-13T10:55:58Z"}

View File

@ -1,8 +1,8 @@
--- ---
title: 'Workspace panel の View item をマウスで選択できるようにする' title: 'Workspace panel の View item をマウスで選択できるようにする'
state: 'queued' state: 'inprogress'
created_at: '2026-06-13T10:05:19Z' created_at: '2026-06-13T10:05:19Z'
updated_at: '2026-06-13T10:53:16Z' updated_at: '2026-06-13T10:56:05Z'
assignee: null assignee: null
readiness: 'implementation_ready' readiness: 'implementation_ready'
risk_flags: ['tui-input', 'mouse-capture', 'panel-ux'] risk_flags: ['tui-input', 'mouse-capture', 'panel-ux']

View File

@ -29,4 +29,83 @@ LocalTicketBackend によって作成されました。
Ticket を `workspace-panel` が queued にしました。 Ticket を `workspace-panel` が queued にしました。
---
<!-- event: decision author: orchestrator at: 2026-06-13T10:55:52Z -->
## Decision
Routing decision: implementation_ready
Reason:
- Ticket は `queued` で、要件・受け入れ条件・binding invariants・implementation latitude・escalation conditions が揃っている。
- `TicketRelationQuery``TicketOrchestrationPlanQuery` で blocker / ordering / conflict 記録は見つからなかった。
- risk flags は `tui-input` / `mouse-capture` / `panel-ux` だが、Ticket は mouse capture 方針、click-only MVP、destructive action 非実行、composer 入力優先を binding invariant として明記しており、実装前に不足する設計判断はない。
- 現 Orchestrator worktree は clean。root/original workspace では git/read/write/validate せず、実装は専用 child worktree に隔離する。
- 併走候補のうち `00001KV0723PC` は同じ `crates/tui/src/multi_pod.rs` 周辺に触れる可能性が高いため、こちらの panel mouse selection を先に受理し、Quit 遅延 Ticket は queued のまま conflict/capacity 待ちにする。`00001KV04NJ8D` は single-Pod rewind / Pod protocol 周辺で主な変更面が異なるため並列開始候補にできる。
Evidence checked:
- Ticket body / thread / artifactsartifacts なし)。
- relation records: なし。
- orchestration plan records: なし。
- code map: `crates/tui/src/multi_pod.rs` の panel selection state / keyboard handling / draw paths、`crates/tui/src/workspace_panel.rs` の ViewModel / row data、既存 `EnableWheelMouseCapture` 方針は `crates/tui/src/single_pod.rs` にあることを確認。
- related context: composer 入力優先、Panel selected-row actionbar 方針、least-intrusive mouse capture 方針は Ticket に binding invariant として反映済み。
- workspace/Pod state: Orchestrator worktree clean、visible live implementation Pods なし。
IntentPacket:
Intent:
- `yoi panel` の View item / row をマウスクリックでアプリ内選択できるようにし、クリック後の selected row に既存の blank Enter / actionbar / detail 表示が働くようにする。
Binding decisions / invariants:
- 対象は workspace Panel/View item selection に限定する。single-Pod conversation history 全体の block focus / navigation mode は実装しない。
- マウス操作で selected-Pod direct-send semantics を復活させない。
- composer text entry と既存 keyboard 操作を優先し、`↑` / `↓` / Enter / Esc / Tab の意味を壊さない。
- クリックは selection のみで、Queue / Open / Close などの workflow state mutation / destructive action を即時実行しない。
- 汎用 drag/text selection は作らない。
- `?1000h` + `?1006h` の least-intrusive mouse capture 方針を優先し、drag tracking を有効化して端末選択への副作用を増やさない。
Requirements / acceptance criteria:
- Panel 表示中に View item / row をクリックすると対応 item が selected になる。
- item 外クリックでは不正な selection change や composer draft loss が起きない。
- selected item に対する既存 action / blank Enter / detail 表示がクリック後の selection に対して働く。
- existing keyboard/composer behavior を維持する。
- focused tests で row hit testing / click selection / non-row click no-op / keyboard preservation を確認する。
Implementation latitude:
- render 時の row rect registry、row coordinate mapping、hit-test helper の具体設計は coder が選んでよい。
- MVP は click/down による Panel rows selection でよい。詳細 pane 内の個別要素クリックや hover selection は必須ではない。
- 外部 crate は不要なら入れない。既存 Panel 構造を大きく歪める外部 crate 導入は escalation する。
Escalate if:
- mouse capture が端末通常選択・貼り付け・wheel・IME・composer 入力へ副作用を出す場合。
- click selection と Enter / blank composer / Queue/Open/Close の境界が曖昧になる場合。
- Panel 以外の view、single-Pod block focus、drag selection へ範囲が広がる場合。
- hit testing のために大きな描画アーキテクチャ変更が必要になる場合。
Validation:
- focused `cargo test -p tui workspace_panel --lib` または該当 `multi_pod` / workspace panel tests。
- `cargo fmt --check`
- `git diff --check`
- 変更範囲に応じて `cargo check --workspace --all-targets`
Current code map:
- `crates/tui/src/multi_pod.rs`: panel event handling、`selected_row`、visible rows、draw/hotkey/action path、tests。
- `crates/tui/src/workspace_panel.rs`: `WorkspacePanelViewModel` / `PanelRowKey` / row data。
- `crates/tui/src/single_pod.rs`: existing narrow mouse capture implementation as reference only。
Critical risks / reviewer focus:
- click must select only, not execute workflow actions。
- item 外 click must be no-op for selection and must not drop composer draft。
- keyboard/composer target semantics must remain unchanged。
- mouse capture must remain least-intrusive and not enable drag tracking unnecessarily。
---
<!-- event: state_changed author: orchestrator at: 2026-06-13T10:56:05Z from: queued to: inprogress reason: orchestrator_acceptance field: state -->
## State changed
Ticket evidence、relations、orchestration plan、bounded code map、Orchestrator worktree clean state を確認した。blocking relation はなく、Panel mouse selection の binding invariants と acceptance criteria は実装可能な粒度で記録済み。実装 side effect の前に routing decision / IntentPacket / accepted plan を記録したため、専用 child worktree と Coder delegation に進む。
--- ---