Skip to content

feat(cli): support session deletion in Shared TUI - #1891

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/shared-tui-session-delete
Jul 30, 2026
Merged

feat(cli): support session deletion in Shared TUI#1891
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/shared-tui-session-delete

Conversation

@limityan

@limityan limityan commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add deletion of idle, non-current Sessions to the opt-in Shared TUI deployment
  • keep AgentRuntime::delete_session as the only behavior owner: Embedded calls it directly and Shared maps one private local IPC operation to the same request
  • reuse the existing TUI Session-operation slot, selector, timeout handling, and outcome_unknown recovery instead of adding a delete task or queue
  • centralize the private IPC operation rules for controller checks, idle requirements, Session selection serialization, and timeout semantics
  • preserve the declarative-context reload behavior added on main; the combined private protocol is v7

Scope and behavior

  • Shared deletion is allowed only when the requesting TUI has no active Turn and the target Session is not current or controlled by another Shared client
  • the Session disappears from the selector only after Runtime confirms success
  • not_found and session_in_use remain typed failures; a timed-out side effect returns outcome_unknown, closes the connection, and is never retried automatically
  • the Shared Host supplies canonical workspace facts; the wire carries only the Session ID
  • context reload remains available during an active Turn and affects the next message, matching the behavior already on main
  • no public SDK, server endpoint, remote transport, archive/fork/replay/observer capability, general task queue, or second persistence owner is introduced

Rebase notes

Rebased onto gcwing/main@29c2b1569. Both branches had independently used private protocol v6, so the combined delete + reload operation set now uses v7. Conflict resolution retained both user paths and consolidated their policy in one closed operation-rules table.

Validation

  • cargo check --workspace
  • cargo test -p bitfun-agent-runtime-ipc (43 passed)
  • cargo test -p bitfun-cli shared_runtime::tests -- --nocapture (14 passed)
  • cargo test -p bitfun-cli session_delete -- --nocapture (4 passed)
  • changed Rust files: rustfmt --check
  • node scripts/check-core-boundaries.mjs
  • pnpm run check:repo-hygiene
  • git diff --check gcwing/main...HEAD

The full Windows CLI test binary was also exercised: 469 tests passed and five existing dispatch file-lock/path tests failed outside this diff. Two lock-contention tests are structurally unsupported by the current cfg(not(unix)) implementation, and the remaining failures reproduce as Windows os error 5; this PR does not modify src/apps/cli/src/dispatch.

@limityan
limityan force-pushed the yanzhn/shared-tui-session-delete branch from 3b155b7 to 4936f34 Compare July 30, 2026 10:13
@limityan
limityan merged commit bdd0077 into GCWing:main Jul 30, 2026
7 checks passed
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.

1 participant