Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: display offline workspaces#39

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedFeb 10, 2025
edited
Loading

The app previously didn't match the proposed design (and the Windows app) and display offline workspaces with a gray status.

image

Also improves the app's handling of invalid agents, indicating to the user that something went wrong. Clicking the button opens an alert with info. It's possible for invalid agents to resolve themselves, such as if the workspace update is sent at a later time.

imageimage

Formatting these legacy API alert messages (such as to uncentre the text) is a pain, but ideally users never see these errors in the first place, so I think it's okay.

Also, for some reason I had the display of an agent in the list as always .coder. Whilst it usually is that value, if there's multiple agents in a workspace coderd will not send .coder as a FQDN, in which case we should instead display the next shortest FQDN, which we do now.

@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedFeb 10, 2025
edited
Loading

@ethanndicksonethanndicksonforce-pushed theethan/quarantine-workaround branch fromd434e77 to024d7e3CompareFebruary 10, 2025 10:27
@ethanndicksonethanndicksonforce-pushed theethan/offline-workspaces branch 2 times, most recently froma9e3504 tocaf84f1CompareFebruary 10, 2025 12:06
@ethanndicksonethanndickson marked this pull request as ready for reviewFebruary 11, 2025 04:18
@ethanndicksonethanndickson self-assigned thisFeb 11, 2025
Comment on lines +19 to +21
// `.alert` from SwiftUI doesn't play nice when the calling view is in the
// menu bar.
private func showAlert() {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

If you use.alert, the menu bar window dismisses itself, and takes the alert with it - it basically doesn't work at all.
This olderNSAlert API creates a temporary, managed, window instead.

If we need to create popup alerts for something that's part of the normal user flow later, we'll need to find a better way.

ThomasK33 reacted with thumbs up emoji
@Environment(\.dismiss) var dismiss
@EnvironmentObject var vpn: VPN
var msg: String {
"\(vpn.menuState.invalidAgents.count) invalid \(vpn.menuState.invalidAgents.count > 1 ? "agents" : "agent").."
Copy link
Member

Choose a reason for hiding this comment

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

Are we purposefully calling it an invalid agent or should we stick to invalid workspace?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good point. Let's stick with agent for now since this an internal error we're surfacing.

ThomasK33 reacted with thumbs up emoji
Copy link
Member

@ThomasK33ThomasK33 left a comment

Choose a reason for hiding this comment

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

LGTM. Only one question regarding naming consistency

@ethanndicksonethanndickson merged commit7ffa48b intoethan/quarantine-workaroundFeb 12, 2025
3 of 4 checks passed
@ethanndicksonethanndickson deleted the ethan/offline-workspaces branchFebruary 12, 2025 10:59
@ethanndicksonethanndickson restored the ethan/offline-workspaces branchFebruary 12, 2025 11:01
ethanndickson added a commit that referenced this pull requestFeb 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ThomasK33ThomasK33ThomasK33 approved these changes

@coadlercoadlerAwaiting requested review from coadler

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethanndickson@ThomasK33

[8]ページ先頭

©2009-2025 Movatter.jp