Skip to content

Add status and start/stop buttons to recents view #243

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

Merged
merged 9 commits into from
May 8, 2023
Merged

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented May 5, 2023

I am not 100% on the design, I just stuck the start/stop buttons next to the existing terminal button, moved them to the right, and put an icon to the left of the host name to indicate status (it also has hover tooltip text). I think it could be greatly improved.

recent

Might be easiest to review by commit, there is also some context in each description.

code-asher added 7 commits May 5, 2023 13:58
This way we can create multiple clients on the recent workspaces page
without having to do the whole init thing for each one.
We need this information so we can query the status of recent
connections as they could belong to multiple deployments.

This could end up desyncing if the user manually edits their config file
and changes the global config path in ProxyCommand.

The alternative would be to parse the SSH config to make sure we have
the right config directory but that would mean parsing ProxyCommand to
extract the value of --global-config.

As a fallback for connections that already exist and are not yet stored
with the config directory we could split the host name itself on `--`
since it has the domain in it and join with the default directory but
this could be inaccurate if the default has been changed or if in the
future we change the host name format.
So we can match against the API response.  We could split the hostname
on `--` but there are cases where that will fail (when the name or
domain itself contains -- in specific configurations).

We have to add the config path anyway so this is the best opportunity to
add more information.
I guess this could happen if you manually edit the recents?  In any case
if there is no host name I am not sure there is value in trying to show
the connection and it is making it difficult to check if the workspace
is up.
We will need this in the recent connections view as well.
So we can show just the icon in the recent connections view.
@code-asher code-asher force-pushed the recents-status branch 2 times, most recently from 750eae1 to 720e69f Compare May 5, 2023 22:08
This relies on some new data being stored with the recent connections so
old connections will be in an unknown state.
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to worry about agent names as well as workspace names in future, but for now 👍

@code-asher
Copy link
Member Author

We may need to worry about agent names as well

Good to know, thanks for the heads up!!

@code-asher code-asher merged commit fa7d3d1 into main May 8, 2023
@code-asher code-asher deleted the recents-status branch May 8, 2023 22:05
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

Successfully merging this pull request may close these issues.

2 participants