Skip to content

feat(pty): share single Docker container across terminal tabs#88

Merged
veeso merged 2 commits intomainfrom
feat/reuse-test-container
Mar 9, 2026
Merged

feat(pty): share single Docker container across terminal tabs#88
veeso merged 2 commits intomainfrom
feat/reuse-test-container

Conversation

@veeso
Copy link
Copy Markdown
Collaborator

@veeso veeso commented Mar 9, 2026

Summary

  • Introduces SharedContainer (Arc-wrapped) that creates a single Docker container at app startup with sleep infinity as entrypoint
  • Each terminal tab spawns its own bash process via docker exec instead of creating a new container
  • Container is automatically stopped and removed when the last tab (last Arc reference) is dropped
  • Adds PtyProviderType enum to separate config-time provider selection from runtime PtyProvider (which carries the Arc<SharedContainer>)

Test plan

  • cargo clippy --all-features -- -D warnings passes
  • cargo clippy -- -D warnings passes (without feature)
  • cargo test — 381 tests pass
  • Manual: cargo run --features pty-test_container -- --use-pty-test-container, open multiple tabs with Cmd+T, verify all share one container (docker ps shows single infraware_* container)
  • Manual: close tabs one by one, verify container removed only after last tab closed

@veeso veeso force-pushed the feat/reuse-test-container branch from 2ec2364 to 5f913d0 Compare March 9, 2026 13:23
@veeso veeso force-pushed the feat/reuse-test-container branch from 5f913d0 to 1848c9f Compare March 9, 2026 13:47
@veeso veeso merged commit 8c45eca into main Mar 9, 2026
5 checks passed
@veeso veeso deleted the feat/reuse-test-container branch March 9, 2026 13:49
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