-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
Mirrored sessions #740
Mirrored sessions #740
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Just a small concern with the --force
flag in the attach command. I haven't looked at the tests though, you know it better than me.
I'm very happy with the changes you made 😄, especially the ones in the ServerOsApi
(It looks very neat now).
Merge when you're ready 🙂
Thanks for the review! |
… how many hidden panes are (#450) * fix(ui): offset content after viewport construction * Added the feature to display fullscreen information on the second line of the status-bar. * fix(strider): update host mount-point * fix(plugin): create missing data directories as needed * feat(layout): specify only tab name in `tabs` section (#722) Allow specifying only the tab name in the `tabs` section - For example this is now possible: ``` tabs: - name: first parts: - direction: Vertical - direction: Vertical - name: second - name: third ``` For that the tab section defaults the direction to `direction::Horizontal` - Adds an error upon specifying a tab name inside the `parts` section of the tab-layout * docs(changelog): Solely name tab in `tabs` section * feature(release): Copy default config to the examples folder on release (#736) fixes #733 * docs(changelog): Copy example config on release * Update default config (#737) * feat(plugin): add manifest to allow for plugin configuration (#660) * feat(plugins-manifest): Add a plugins manifest to allow for more configuration of plugins * refactor(plugins-manifest): Better storage of plugin metadata in wasm_vm * fix(plugins-manifest): Inherit permissions from run configuration * refactor(plugins-manifest): Rename things for more clarity - The Plugins/Plugin structs had "Config" appended to them to clarify that they're metadata about plugins, and not the plugins themselves. - The PluginType::OncePerPane variant was renamed to be just PluginType::Pane, and the documentation clarified to explain what it is. - The "service" nomenclature was completely removed in favor of "headless". * refactor(plugins-manifest): Move security warning into start plugin * refactor(plugins-manifest): Remove hack in favor of standard method * refactor(plugins-manifest): Change display of plugin location The only time that a plugin location is displayed in Zellij is the border of the pane. Having `zellij:strider` display instead of just `strider` was a little annoying, so we're stripping out the scheme information from a locations display. * refactor(plugins-manifest): Add a little more documentation * fix(plugins-manifest): Formatting Co-authored-by: Jesse Tuchsen <not@disclosing> * chore(docs): update changelog * feat(sessions): mirrored sessions (#740) * feat(sessions): mirrored sessions * fix(tests): input units * style(fmt): make rustfmt happy * fix(tests): make mirrored sessions e2e test more robust * refactor(sessions): remove force attach * style(fmt): rustfmtify * docs(changelog): update change * fix(e2e): retry on all errors Co-authored-by: Brooks J Rady <b.j.rady@gmail.com> Co-authored-by: a-kenji <aks.kenji@protonmail.com> Co-authored-by: spacemaison <tuchsen@protonmail.com> Co-authored-by: Jesse Tuchsen <not@disclosing> Co-authored-by: Aram Drevekenin <aram@poor.dev>
This change introduces "mirrored sessions". With this change, when one tries to attach to a session that is already attached, instead of getting an error, the session will be mirrored in the new terminal window.
This change also introduces some fixes and stabalizations for the e2e tests.
@kunalmohan - if you could take a look mainly at the parts involving the server os_input_output to make sure I didn't make any fatal mistakes there, that would be great. :)
I know this change is a little big, so I'd be happy to walk you through the code as needed. Thanks!
EDIT:
The main changes to the client involve moving the input handler to its own thread and creating a new thread that would just read events from stdin (and interpret them with termion).
The reason for this is that the mirrored sessions need to be in the same mode. Since we kept the input mode on the client side, if one client changed the input mode, we would need to let the other clients know somehow. So I introduced a new ServerToClient::SwitchToMode variant that would let the client know a different client (or it itself) switched a mode and it needs to update its own state. This is handled by the new "input thread" that also handles events from the stdin thread.