* Fit once during creation
This does not fix any bugs (that I know of) but we only need to fit once
when the terminal is created, not every time we reconnect. Granted,
currently we do not support reconnecting without refreshing anyway so it
does not really matter, but this just seems more correct.
Plus now we will not have to pass the fit addon around.
* Pass size when connecting web socket URL
I think this will solve an issue where screen does does not correctly
handle an immediate resize. It seems to ignore the resize, but even if
you send it again nothing changes, seemingly thinking it is already at
that size?
* Use new struct for decoding reconnecting pty requests
Decoding a JSON message does not touch omitted (or null) fields so once
a message with a resize comes in, every single message from that point
will cause a resize.
I am not sure if this is an actual problem in practice but at the very
least it seems unintentional.
* Remove terminalXService
This is a prelude to the change I actually want to make, which is to
send the size of the terminal on the web socket URL after we do a fit.
I have found xstate so confusing that it was easier to just rewrite it.
* Fix hanging tests
I am not really sure what ws.connected is doing but it seems to somehow
block updates. Something to do with `act()` maybe?
Basically, the useEffect creating the terminal never updates once the
config query finishes, so the web socket is never created, and the test
hangs forever.
It might have been working before only because the web socket was
created using xstate rather than useEffect and once it connected it
would unblock and React could update again but this is just a guess.
* Ignore other config changes
The terminal only cares about the renderer specifically, no need to
recreate the terminal if something else changes.
* Break out port forward URL open to util
Felt like this could be broken out to reduce the component size. Also
trying to figure out why it is causing the terminal to create multiple
times.
* Prevent handleWebLink change from recreating terminal
Depending on the timing, handleWebLink was causing the terminal to get
recreated. We only need to create the terminal once unless the render
type changes.
Recreating the terminal was also recreating the web socket pointlessly.
* refactor: extract UserRoleCell into separate component
* wip: add placeholder Groups column
* fix: remove redundant css styles
* refactor: update EditRolesButton to use Sets to detect selections
* wip: commit progress for updated roles column
* wip: commit current role pill progress
* fix: update state sync logic
* chore: add groupsByUserId query options factory
* fix: update return value of select function
* chore: drill groups data down to cell component
* wip: commit current cell progress
* fix: remove redundant classes
* wip: commit current styling progress
* fix: update line height for CTA
* fix: update spacing
* chore: add tooltip for Groups column header
* fix: remove tsbuild file
* refactor: consolidate tooltip components
* fix: update font size defaults inside theme
* fix: expand hoverable/clickable area of groups cell
* fix: remove possible undefined cases from HelpTooltip
* chore: add popover functionality to groups
* wip: commit progress on groups tooltip
* fix: remove zero-height group name visual bug
* feat: get basic version of user group tooltips done
* perf: move sort order callback outside loop
* fix: update spacing for tooltip
* feat: make popovers entirely hover-based
* fix: disable scroll locking for popover
* docs: add comments explaining some pitfalls with Popover component
* refactor: simplify userRoleCell implementation
* feat: complete main feature
* fix: prevent scroll lock for role tooltips
* fix: change import to type import
* refactor: simplify how groups are clustered
* refactor: update UserRoleCell to use Popover
* refactor: remove unnecessary fragment
* chore: add id/aria support for Popover
* refactor: update UserGroupsCell to use Popover
* chore: redo visual design for UserGroupsCell
* fix: shrink UserGroupsCell text
* fix: update UsersTable test to include groups info