Skip to content

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

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions