Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: session-manager session doesn't get cleaned up when resurrecting a session #3410

Open
cristiand391 opened this issue Jun 9, 2024 · 1 comment

Comments

@cristiand391
Copy link
Contributor

2. Issues with the Zellij UI / behavior / crash

Issue description

I start zellij with the welcome layout in alacritty like this:

[shell]
program = "/home/cristiand391/.local/bin/zellij"
args = ["-l", "welcome"]

when I create or attach to a new session I see the session where welcome layout lives being deleted after I'm on the new session (which is intended). If I instead resurrect a session I can see the session containing the welcome layout still alive.

Minimal reproduction

  1. start zellij with the welcome layout as mentioned above
  2. check the session name of the welcome layout, then resurrect a session
  3. on the resurrected session, launch session-manager and see the previous session in the Attach to session tab.

Other relevant information

zellij --version: zellij 0.40.1

@cristiand391
Copy link
Contributor Author

cristiand391 commented Jun 9, 2024

It seems the session gets cleared for the AttachToSession tab beacuse it runs hide_self right after switching to the new session:
https://github.com/zellij-org/zellij/blob/56baf0b13dfc177a095ae9b3267fe531d4453099/default-plugins/session-manager/src/main.rs#L483C1-L494C29

I tested a few layouts launching just zj-quit and when pressing Esc (which runs hide_self too) the session gets deleted so that could explain the current behaviour (calling hide_self on the only pane kills its session). Not sure if this was a hack (maybe calling kill_sessions would kill the zellij instance if it happened before the session switch call above) or an unintended side-effect.

Happy to open a PR if maintainers agree the current behavior is unintended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant