contour icon indicating copy to clipboard operation
contour copied to clipboard

[0.6.1.7494 Regression] Switching between windows of the same Contour process broken (likely due to terminal tabs feature)

Open whisperity opened this issue 8 months ago • 1 comments

Contour Terminal version

0.6.21.7494

Installer source

GitHub: release page

Operating System

MacOS San Sequoia 15.3.1

Architecture

ARM64

Other Software

Steps to reproduce

It may be relevant, but have spawn_new_process: false. It is important that new terminals under the same binary (the MacOS idiosyncratic way of dealing with this concept…) has the issue. If a new top-level binary is started, the Contour icon keeps on multiplying as the system considers the terminals entirely separate — and the issue doesn't arise!

  1. Open Contour and put something into the existing window in order to uniquely identify it, e.g., the shell's PID $$. 😄

A single freshly started Contour instance running.

  1. Press the NewTerminal keybind (in my case it is ⌃ Control⇧ ShiftN).
  2. A new Contour window opens under the purview of the same application (the Contour icon doesn't multiply on the Dock).
  3. ⚠ **The existing window (now in the background) resets itself to show a new session as well.
  4. Type an identifying command into the newly spawned foregrounded window which shows that the two windows show the same terminal tab.

Two contour windows running the exact same session.

  1. Normally, switching the focus between two windows of the same program would be possible by right clicking the icon on the Dock, and selecting a window. (Proper apps also offer a Window drop-down in the menu bar.)

Right-click on the running app menu

  1. Clicking the "other" Contour here (the one on the bottom) brings the "older" window into the foreground, but they are still attached to the same session.
  2. exiting the newer session does force the older window to get back to "Contour 1" in our case, but the newer window infinitely hangs on the exit command, never to actually exit. htop reveals a zombie zsh process.

Expected Behavior

Creating a new terminal window and session should not destroy the user's ability to interface with the old already open window.

Actual Behavior

— See earlier in bug report. —

Additional notes

No response

whisperity avatar Mar 02 '25 13:03 whisperity

Yes, behavior is quite funny, i think what we should do is to remove spawn_new_process option, and always create new process when spawning new window, since then we make sure that sessions share same window and it will make it easier for us to handle and will reduce possible bugs

Yaraslaut avatar Mar 17 '25 17:03 Yaraslaut