fix(FN-784): close Scripts modal before async API call to prevent handoff race
- Close the Scripts modal immediately before making the async script-run API call, preventing the modal from interfering with the terminal handoff - Add regression tests covering script-to-terminal handoff behavior (modal close timing, API call sequencing, error handling) - Document the script-run modal handoff behavior in the dashboard README
This commit is contained in:
@@ -112,9 +112,10 @@ Access a fully functional PTY (pseudo-terminal) shell directly from the dashboar
|
||||
- `Escape` - Close terminal modal
|
||||
|
||||
### Script Run Dialog
|
||||
When running a saved script from the dashboard (via QuickScripts dropdown in the header or the Run button in Scripts modal), a dedicated ScriptRunDialog opens with live output streaming. The exit status. The dialog uses the existing terminal PTY session infrastructure:
|
||||
When running a saved script from the dashboard (via QuickScripts dropdown in the header or the Run button in Scripts modal), the Scripts modal closes immediately and a dedicated ScriptRunDialog becomes the active foreground view with live output streaming. The dialog uses the existing terminal PTY session infrastructure:
|
||||
WebSocket connection for output, but is non-interactive (no user input).
|
||||
It **Features**:
|
||||
|
||||
**Modal Handoff**: When a script is launched from the Scripts modal, the modal dismisses synchronously before the API call completes so that the ScriptRunDialog always appears as the topmost surface — the user never sees both overlays stacked at once.
|
||||
- **Live Output**: Streams stdout/stderr from the script in real-time via WebSocket
|
||||
- **Script Name & Command**: Shows the script name and resolved command
|
||||
- **Status Indicator**: Shows running/completed/error status
|
||||
|
||||
Reference in New Issue
Block a user