zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.38k stars 610 forks source link

Fullscreen should temporarily disable "sync". #3458

Open markstos opened 5 days ago

markstos commented 5 days ago

Basic information

zellij --version: 0.40.1

2. Issues with the Zellij UI / behavior / crash

Zellij should strive to be safe by default and follow the principle of least surprise.

Currently, these principles are violated when combining the sync and fullscreen features, leading to dangerous outcomes.

Say you are inspecting two redundant servers with a parallel SSH sessions and sync'ed input. After determining the stable is cluster, you decide to reboot one, so use "full screen" so only that one is visible and then issue the "reboot" command.

A reasonable expectation is that you've only sent the reboot command to the window you can actually see, but what actually happens currently is you have also rebooted a server through a terminal that you can't see.

Now both halves of the redundant cluster are down and what should have been routine maintenance is now a public-facing outage.

Minimal reproduction

To reproduce:

  1. Enable two panes.
  2. Enable Sync
  3. Enable full screen for one window
  4. Type sudo reboot ine one screen.
  5. Exit full screen.

Other relevant information

While you suggested to not make comparisons with tmux, the reality is that many zellij users will be coming from there, and tmux behaves safely and with less surprise in this context by only sending sync'ed input into the window that is visible ("zoomed" in tmux semantics).

Zellij's current behavior is quite dangerous is that you can't notice you've typed a command into two servers instead of one until you've exited fullscreen and by then it may be too late!