Read-only session mode to prevent accidentally killing a long-lived process #9701

Open
opened 2026-01-31 02:01:16 +00:00 by claunia · 0 comments
Owner

Originally created by @KalleOlaviNiemitalo on GitHub (Jul 20, 2020).

Description of the new feature/enhancement

I sometimes run ROBOCOPY or another long-lived process in Windows Terminal. I then fear that I might accidentally close the tab or hit Ctrl+C and have to start over. I would like to mark the session or tab as protected (important and read-only) and have Windows Terminal protect me from such mistakes.

I already mark such tabs with a distinctive color but they still feel risky.

Proposed technical implementation details (optional)

Add a "Read only" check box to the per-tab menu. When the check box is checked:

  • Do not forward any keyboard events to processes using the pseudoconsole. Instead, if the user types something, display a modeless notification that advises the user how to disable the read-only mode.
  • Do not forward any mouse events to processes using the pseudoconsole. Instead, let mouse events scroll the scrollback and select text. This should override the ENABLE_MOUSE_INPUT mode and perhaps also ENABLE_QUICK_EDIT_MODE.
  • Do not display a close button on the tab. This may also make it consume less horizontal space, depending on the "tabWidthMode" setting.
  • If the user tries to close the window, display a confirmation dialog box that includes the titles of the read-only tabs. This should override the "confirmCloseAllTabs" setting.
  • If the user tries to close the tab (with a key combination, as the close button is hidden), then either display a notification as with keyboard events, or prompt for confirmation.

There could be a key-bindable action to turn the read-only mode on and off.

Originally created by @KalleOlaviNiemitalo on GitHub (Jul 20, 2020). # Description of the new feature/enhancement I sometimes run `ROBOCOPY` or another long-lived process in Windows Terminal. I then fear that I might accidentally close the tab or hit Ctrl+C and have to start over. I would like to mark the session or tab as protected (important and read-only) and have Windows Terminal protect me from such mistakes. I already mark such tabs with a distinctive color but they still feel risky. # Proposed technical implementation details (optional) Add a "Read only" check box to the per-tab menu. When the check box is checked: - Do not forward any keyboard events to processes using the pseudoconsole. Instead, if the user types something, display a modeless notification that advises the user how to disable the read-only mode. - Do not forward any mouse events to processes using the pseudoconsole. Instead, let mouse events scroll the scrollback and select text. This should override the ENABLE_MOUSE_INPUT mode and perhaps also ENABLE_QUICK_EDIT_MODE. - Do not display a close button on the tab. This may also make it consume less horizontal space, depending on the "tabWidthMode" setting. - If the user tries to close the window, display a confirmation dialog box that includes the titles of the read-only tabs. This should override the "confirmCloseAllTabs" setting. - If the user tries to close the tab (with a key combination, as the close button is hidden), then either display a notification as with keyboard events, or prompt for confirmation. There could be a key-bindable action to turn the read-only mode on and off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9701