From 5db02079d031d227e6f080976c036093ddfc2a3c Mon Sep 17 00:00:00 2001 From: Hare Date: Sun, 7 Jun 2026 10:42:17 +0900 Subject: [PATCH] ticket: preflight panel role session registry --- .../item.md | 4 +- .../thread.md | 64 +++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/item.md b/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/item.md index 6cb7eb34..621e5ccb 100644 --- a/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/item.md +++ b/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/item.md @@ -6,9 +6,9 @@ status: open kind: task priority: P1 labels: [tui, panel, ticket, pod, orchestration] -workflow_state: intake +workflow_state: ready created_at: 2026-06-07T01:21:31Z -updated_at: 2026-06-07T01:21:31Z +updated_at: 2026-06-07T01:42:13Z assignee: null legacy_ticket: null --- diff --git a/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/thread.md b/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/thread.md index f5ab03eb..8d35d72c 100644 --- a/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/thread.md +++ b/.yoi/tickets/open/20260607-012131-workspace-panel-local-role-session-registry/thread.md @@ -4,4 +4,68 @@ Created by LocalTicketBackend create. +--- + + + +## Plan + +## Preflight / implementation intent + +Classification: implementation-ready with coordination risk. + +Intent: +- Add a local, workspace-scoped role session registry and Ticket claim index for `yoi panel` orchestration state. +- Store registry data under the configured user data directory, not under git-tracked `.yoi/tickets` files and not under the runtime directory. +- Model `Ticket -> at most one active local Pod claim` while allowing `Pod/session -> 0..N related Tickets`. +- Represent pre-Ticket Intake sessions even before a Ticket exists. +- Join Ticket state, local registry data, and Pod metadata in panel state/actions where practical, without introducing automatic polling/spawn. + +Requirements: +- Define a stable workspace key/path for registry storage under `manifest::paths::data_dir()` or an equivalent existing user-data boundary. +- Keep local Pod names, socket paths, runtime status, and local claim state out of git-tracked Ticket frontmatter/thread files. +- Make claim creation race-aware: when starting Intake for an existing Ticket, claim before spawn/restore; if a claim exists, do not start a second Pod silently. +- Treat stale claims explicitly with diagnostics/reclaim affordance rather than auto-replacing them. +- Intake is not 1:1 with Ticket: support no related Ticket and multiple related Tickets in the local model. +- Preserve the current interim access path where `ticket-*` Pods are visible in the panel. + +Code map: +- `crates/manifest/src/paths.rs`: existing data/config/runtime directory boundary; registry should use durable user data, not runtime. +- `crates/tui/src/multi_pod.rs`: Intake launch path (`prepare_intake_launch` / `finish_intake_launch`), panel snapshot construction, selected actions. +- `crates/tui/src/workspace_panel.rs`: Ticket rows, related Pod display, `workflow_state = intake` row behavior, Panel view model. +- `crates/client/src/ticket_role.rs`: Ticket role launch context and Pod naming; useful integration point but should not write git-tracked Ticket assignment. +- Existing Pod list/status model is in `crates/tui/src/multi_pod.rs` / `workspace_panel.rs`; use it for liveness/restorability rather than persisting live status as authority. + +Boundaries / non-goals: +- Do not store local Pod assignment in Ticket metadata/thread. +- Do not assume Intake Pod and Ticket are 1:1. +- Do not add polling that auto-starts Intake for `workflow_state = intake` Tickets. +- Do not replace Orchestrator scheduling. +- Do not implement the real Companion Pod lifecycle here. +- Do not remove selected-Pod direct-send here; `workspace-panel-remove-direct-pod-send` owns that and is being implemented in parallel. + +Coordination note: +- `workspace-panel-remove-direct-pod-send` is active in branch `work/workspace-panel-remove-direct-pod-send` and may touch `multi_pod.rs` / `workspace_panel.rs`. Keep this registry implementation as additive/localized as possible and report any likely merge conflicts. + +Validation: +- Add focused unit tests for registry serialization/path behavior, one-active-claim-per-Ticket invariant, and non-1:1 Intake/Ticket relation. +- Run focused `cargo test -p tui workspace_panel --lib` and relevant new registry tests; run `cargo test -p tui multi_pod --lib` if integration touches panel runtime paths; run formatting/checks appropriate for the diff. + +--- + + + +## Intake summary + +Implementation intent is clear: add a user-data workspace-scoped local role/session registry and Ticket claim index, enforce one active local Pod claim per Ticket, allow one Intake session to relate to multiple Tickets or none, and keep local Pod assignment out of git-tracked Ticket records. + +--- + + + +## State changed + +Ticket intake complete; workflow_state intake -> ready. + + ---