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

When a pane closes on its own and is in full screen, the FULLSCREEN message remains in the tip line #748

Closed
imsnif opened this issue Sep 29, 2021 · 10 comments · Fixed by #757
Labels
hacktoberfest For the hacktoberfest month suspected bug

Comments

@imsnif
Copy link
Member

imsnif commented Sep 29, 2021

To reproduce:

  1. Open a new pane (alt + n)
  2. Change it to full screen
  3. type "exit" to get the shell to close itself
  4. the "FULLSCREEN" message still appears at the bottom of the screen
@tlinford
Copy link
Contributor

tlinford commented Oct 4, 2021

@imsnif not sure why the tests failed in the pr, everything seems fine on my machine.

@imsnif
Copy link
Member Author

imsnif commented Oct 4, 2021

@tlinford - the tests also passed a few times for me locally. I re-ran them in the CI now, but this is a little concerning... could be that we introduced an extra render here and there's a race condition?

@tlinford
Copy link
Contributor

tlinford commented Oct 4, 2021

All that was added here was two calls to update_tabs, as far as I can see that should only cause some PluginInstruction::Update to be sent to the plugins?

@imsnif
Copy link
Member Author

imsnif commented Oct 4, 2021

I need to go afk now so can't check, but it's worth checking if those calls add an additional Render down the line. If so it might be a race.

@tlinford
Copy link
Contributor

tlinford commented Oct 4, 2021

You are right, there are some additional calls to render down the line, I think because when PluginInstruction::Update is handled and plugins are updated, ScreenInstruction::Render is sent from zellij-server/src/wasm_vm.rs.

Don't really get what happened in the failed test run though.

@imsnif
Copy link
Member Author

imsnif commented Oct 5, 2021

Ideally I'd like to avoid adding more renders. We might need to rethink some of the update_tabs flow if it causes more renders than needed. Ideally I'd like things to be:

  1. Update state of all actors involved as a result of an action (eg. terminals, plugins)
  2. Render once this is done

But we don't live in an ideal world :)

Do you think we can achieve this without adding extra renders somehow?

@tlinford
Copy link
Contributor

tlinford commented Oct 5, 2021

In this case, as a workaround, I think we can skip the screen.render() after screen.update_tabs(), since we know that update_tabs() will update plugins, and after that a render is always requested by wasm_vm.

@imsnif
Copy link
Member Author

imsnif commented Oct 5, 2021

Sounds good. Will have to play with it a little to make sure there isn't some edge case the tests don't cover that is harmed by this.

@tlinford
Copy link
Contributor

tlinford commented Oct 5, 2021

cool, I pushed the changes and the tests ran fine, and I'm seeing the expected behavior locally.

@imsnif
Copy link
Member Author

imsnif commented Oct 7, 2021

Looks great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest For the hacktoberfest month suspected bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants