[PR #106] [MERGED] Fix terminal input handling #216

Closed
opened 2026-02-26 12:40:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/106
Author: @michelroegl-brunner
Created: 10/10/2025
Status: Merged
Merged: 10/10/2025
Merged by: @michelroegl-brunner

Base: mainHead: fix/terminal-input-handling


📝 Commits (2)

  • ee50ca8 Fix terminal input handling
  • 222cdc3 Fix TypeScript build errors

📊 Changes

1 file changed (+62 additions, -21 deletions)

View changed files

📝 src/app/_components/Terminal.tsx (+62 -21)

📄 Description

Problem

Terminal input would stop working after script restarts due to stale executionId being captured in the input handler closure.

Solution

  • Fixed stale executionId issue in terminal input handler by using useEffect with proper dependencies
  • Added proper terminal focus management with click handlers
  • Fixed timing issues with input handler registration using isTerminalReady state
  • Removed invalid terminal.off() cleanup method that was causing errors
  • Cleaned up debugging console logs

Changes

  • Modified Terminal.tsx to properly handle executionId updates
  • Added isTerminalReady state to ensure input handler only registers after terminal is initialized
  • Improved terminal focus handling
  • Fixed cleanup methods to prevent errors

Testing

  • Terminal input now works correctly on initial script execution
  • Terminal input continues to work after script restarts
  • Arrow keys and other keyboard input function properly
  • No more console errors when closing terminal

Fixes terminal input functionality for interactive scripts.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE-Local/pull/106 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 10/10/2025 **Status:** ✅ Merged **Merged:** 10/10/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `fix/terminal-input-handling` --- ### 📝 Commits (2) - [`ee50ca8`](https://github.com/community-scripts/ProxmoxVE-Local/commit/ee50ca82d411d3a79fa4cb977462b8ca5ab3fa8e) Fix terminal input handling - [`222cdc3`](https://github.com/community-scripts/ProxmoxVE-Local/commit/222cdc312291b9b9abab950d38543b36eceae089) Fix TypeScript build errors ### 📊 Changes **1 file changed** (+62 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `src/app/_components/Terminal.tsx` (+62 -21) </details> ### 📄 Description ## Problem Terminal input would stop working after script restarts due to stale executionId being captured in the input handler closure. ## Solution - Fixed stale executionId issue in terminal input handler by using useEffect with proper dependencies - Added proper terminal focus management with click handlers - Fixed timing issues with input handler registration using isTerminalReady state - Removed invalid terminal.off() cleanup method that was causing errors - Cleaned up debugging console logs ## Changes - Modified Terminal.tsx to properly handle executionId updates - Added isTerminalReady state to ensure input handler only registers after terminal is initialized - Improved terminal focus handling - Fixed cleanup methods to prevent errors ## Testing - Terminal input now works correctly on initial script execution - Terminal input continues to work after script restarts - Arrow keys and other keyboard input function properly - No more console errors when closing terminal Fixes terminal input functionality for interactive scripts. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:40:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE-Local#216
No description provided.