Skip to content

Changes to SSH terminal vars + add spinners#319

Merged
ellie merged 2 commits intomainfrom
ellie/optional-ssh-vars
Dec 25, 2025
Merged

Changes to SSH terminal vars + add spinners#319
ellie merged 2 commits intomainfrom
ellie/optional-ssh-vars

Conversation

@ellie
Copy link
Member

@ellie ellie commented Dec 23, 2025

  1. Only setup for ATUIN_OUTPUT_VARS if we are actually using it, otherwise save on latency
  2. Show spinners while SSH operations are occurring

This feature requires several extra calls to setup the file + download
it before closing the terminal. This adds some latency

If it's not being used, don't pay the latency cost.
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 23, 2025

Greptile Summary

Optimizes SSH terminal operations by only setting up ATUIN_OUTPUT_VARS when actually used in the code, reducing latency. Adds visual feedback with loading spinners during SSH connection and cancellation operations.

  • Backend checks if code contains ATUIN_OUTPUT_VARS before creating remote temp files
  • Frontend tracks isStarting and isStopping states for execution lifecycle
  • PlayButton shows spinner and disables during SSH operations

Important Files Changed

Filename Overview
crates/atuin-desktop-runtime/src/blocks/script.rs Optimized SSH script execution to only create remote temp file when ATUIN_OUTPUT_VARS is used
crates/atuin-desktop-runtime/src/blocks/terminal.rs Optimized terminal to only setup ATUIN_OUTPUT_VARS when actually referenced in code
src/lib/hooks/useDocumentBridge.ts Added isStarting/isStopping states to track execution lifecycle transitions
src/components/runbooks/editor/blocks/Script/Script.tsx Added spinner to PlayButton during SSH operations using isStarting/isStopping states
src/lib/blocks/terminal/component.tsx Added spinner to PlayButton during SSH operations using isStarting/isStopping states

@ellie ellie force-pushed the ellie/optional-ssh-vars branch from 174b846 to e10baff Compare December 25, 2025 19:43
@ellie ellie merged commit 1fd7935 into main Dec 25, 2025
8 checks passed
@ellie ellie deleted the ellie/optional-ssh-vars branch December 25, 2025 19:55
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2025
@BinaryMuse
Copy link
Member

BinaryMuse commented Jan 30, 2026

@ellie It took me a little bit to figure out why a script on a remote machine couldn't write to $ATUIN_OUTPUT_VARS. This also means you can't manually export from a terminal session. Is there a nice way we could handle this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants