Skip to content

Change kubectl exec to launch in new shell window instead of suspending TUI - #21

Merged
clobrano merged 3 commits into
mainfrom
claude/di-x-floating-terminal-7wAac
May 29, 2026
Merged

clobrano merged 3 commits into
mainfrom
claude/di-x-floating-terminal-7wAac

Conversation

@clobrano

Copy link
Copy Markdown
Owner

Summary

Modified the execIntoPod() function to launch kubectl exec in a new shell window rather than suspending the TUI. This allows the TUI to remain responsive while the user interacts with the exec session.

Key Changes

  • Updated the comment to clarify that a floating system terminal window is opened with kubectl exec, and the TUI stays alive during the session
  • Replaced tea.ExecProcess() call (which suspends the TUI) with a direct call to launchInNewShell()
  • Removed the error callback function since the new approach doesn't require TUI suspension handling
  • Simplified the return value from a command to nil

Implementation Details

The change shifts from the Bubble Tea framework's ExecProcess mechanism (which pauses the TUI) to launching the kubectl exec command in a separate shell window via launchInNewShell(). This provides a better user experience by keeping the TUI active and responsive while the user operates in the kubectl exec session.

https://claude.ai/code/session_01U4tvdcoQpWc17WQT3agZxh

claude added 3 commits May 29, 2026 07:52
Pressing 'x' now launches kubectl exec in the default system terminal
emulator (gnome-terminal, xterm, etc.) as a separate floating window,
keeping the TUI alive so the user can type freely without losing context.

https://claude.ai/code/session_01U4tvdcoQpWc17WQT3agZxh
Remove the kubectl exec pre-load so pressing 'x' simply launches the
default system terminal emulator (gnome-terminal, xterm, etc.) with a
plain interactive shell where the user can type any command freely.

https://claude.ai/code/session_01U4tvdcoQpWc17WQT3agZxh
- Config field: Exec → Terminal, yaml tag exec → terminal, default x → T
- KeyMap: Exec → Terminal binding with help text "terminal"
- Case handler: "x" → m.config.Keybindings.Terminal, calls openTerminal()
- Footer hints: [x]exec → [T]erminal in both normal and filtered views
- Removed dead code: makeKubectlExecCmd, execWithContainer, container-exec
  selector case, ExecRequestMsg (none were reachable after the rework)
- README: updated keybinding table and config example

https://claude.ai/code/session_01U4tvdcoQpWc17WQT3agZxh
@clobrano
clobrano merged commit 9d0658b into main May 29, 2026
2 of 3 checks passed
@clobrano
clobrano deleted the claude/di-x-floating-terminal-7wAac branch May 29, 2026 13:21
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.

2 participants