Skip to content

Conversation

michelroegl-brunner
Copy link
Member

@michelroegl-brunner michelroegl-brunner commented Oct 14, 2025

Overview

This PR adds a new Shell button that provides interactive access to LXC containers without automatically sending update commands.

Features

  • Interactive Shell Access: Direct shell access to LXC containers
  • Disabled When Stopped: Button is disabled when container is stopped
  • Auto-scroll: Smooth scrolling to terminal when opened
  • Visual Feedback: Highlight effect to draw attention
  • Consistent UX: Mirrors Update button behavior but for interactive use

Implementation Details

Frontend Changes

  • Added onShell prop to ScriptInstallationCard
  • Added openingShell state management in InstalledScriptsTab
  • Added isShell prop to Terminal component
  • Implemented smooth scrolling with highlight effect

Backend Changes

  • Added startShellExecution method
  • Added startLocalShellExecution (no auto-commands)
  • Added startSSHShellExecution (no auto-commands)
  • Updated WebSocket message handling for shell mode

Testing

  • Shell button appears for SSH scripts with container_id
  • Shell button is disabled when container is stopped
  • Terminal opens and connects properly
  • Auto-scroll works smoothly
  • No automatic commands are sent
  • Interactive shell session works correctly

Screenshots

The Shell button appears in the Actions column next to the Update button for SSH scripts.

Breaking Changes

None - this is a purely additive feature.

Related Issues

Implements interactive shell access for LXC containers as requested.

- Add Shell button to ScriptInstallationCard for SSH scripts with container_id
- Implement shell state management in InstalledScriptsTab
- Add shell execution methods in server.js (local and SSH)
- Add isShell prop to Terminal component
- Implement smooth scrolling to terminal when opened
- Add highlight effect for better UX
- Shell sessions are interactive (no auto-commands like update)

The Shell button provides direct interactive access to LXC containers
without automatically sending update commands, allowing users to
manually execute commands in the container shell.
@michelroegl-brunner michelroegl-brunner requested a review from a team as a code owner October 14, 2025 08:06
@michelroegl-brunner michelroegl-brunner self-assigned this Oct 14, 2025
- Add SSH key fields (auth_type, ssh_key, ssh_key_passphrase, ssh_port) to database query
- Update InstalledScript interface to include SSH authentication fields
- Fix server data construction in handleOpenShell and handleUpdateScript
- Now properly supports SSH key authentication for shell and update operations

This fixes the issue where SSH key authentication was not being used
even when configured in server settings, as the installed scripts data
was missing the SSH authentication fields.
- Replace logical OR (||) with nullish coalescing (??) operators
- Remove unnecessary type assertion for container_id
- Add missing dependencies to useEffect and useCallback hooks
- Remove unused variable in SSHKeyInput component
- Add isShell property to WebSocketMessage type definition
- Fix ServerInfo type to allow null in shell execution methods

All TypeScript and ESLint errors resolved, build now passes successfully.
@michelroegl-brunner michelroegl-brunner merged commit 546d729 into main Oct 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant