The right pane (listing members, files and notifications for a given room) keeps re-opening itself after being closed when the window is resized, when it should instead keep its last user-decided state.
Something similar is happening to the left pane (listing rooms), which is made narrow instead of keeping its width.
Hmm, so far I can't seem to reproduce this. Do I need to first open a specific right pane, does it happen with any of them?
This works with all panes.
Here's a recording of the bug: the panel re-opens itself when the window is re-sized.

Can only reproduce it when making the window so small that the right-hand pane gets auto-hidden.
Did some triaging, and the problem lies in matrix-react-sdk, which doesn't distinguish in its state model between "user hid the panel" and "panel was auto-hidden", which means that upon restoration of the original window size, it just blindly re-shows the panel as it has no way to know whether it was open or closed before the first resize.
In MatrixChat.js, the action to re-show the panel is dispatched from the handleResize method:

In the same file, that action results in the collapsedRhs state being set:

This then propagates down, eventually showing the panel again. However, there's no check at either of these points about whether the panel was originally open or closed. Because when the panel is explicitly closed by the user, it just dispatches a generic hide_right_panel action, which doesn't track the reason for the panel close:

If the panel were to be auto-closed, then it would dispatch the exact same action (in MatrixChat.js again), which means there's no way to distinguish the two cases:

The solution would be to:
I don't know whether there are any other parts of the codebase being touched by this that I'm not aware of. That should probably be checked by someone more familiar with the code than me :)
possibly related: #10149. dupe: #10156