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: handle missing workspace appdisplay_name#154

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
ethanndickson merged 2 commits intomainfromethan/optional-display-name
May 9, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,8 @@ struct WorkspaceApp {
sessionToken: String
) throws(WorkspaceAppError) {
slug = original.slug
displayName = original.display_name
// Same behaviour as the web UI
displayName = original.display_name ?? original.slug

guard original.external else {
throw .isWebApp
Expand DownExpand Up@@ -196,7 +197,7 @@ func vscodeDisplayApp(hostname: String, baseIconURL: URL, path: String? = nil) -
}

func vscodeInsidersDisplayApp(hostname: String, baseIconURL: URL, path: String? = nil) -> WorkspaceApp {
let icon = baseIconURL.appendingPathComponent("/icon/code.svg")
let icon = baseIconURL.appendingPathComponent("/icon/code-insiders.svg")
return WorkspaceApp(
slug: "-vscode-insiders",
displayName: "VS Code Insiders Desktop",
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -137,7 +137,7 @@ struct WorkspaceAppTests {
#expect(apps.count == 1)
#expect(apps[0].slug == "-vscode-insiders")
#expect(apps[0].displayName == "VS Code Insiders Desktop")
#expect(apps[0].icon?.absoluteString == "https://coder.example.com/icon/code.svg")
#expect(apps[0].icon?.absoluteString == "https://coder.example.com/icon/code-insiders.svg")
#expect(
apps[0].url.absoluteString == """
vscode-insiders://vscode-remote/ssh-remote+test-workspace.coder.test//home/user
Expand Down
5 changes: 2 additions & 3 deletionsCoder-Desktop/CoderSDK/Workspace.swift
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,11 +56,10 @@ public struct WorkspaceAgent: Codable, Identifiable, Sendable {

public struct WorkspaceApp: Codable, Identifiable, Sendable {
public let id: UUID
// Not `omitempty`, but `coderd` sends empty string if `command` is set
public var url: URL?
public var url: URL? // `omitempty`
public let external: Bool
public let slug: String
public let display_name: String
public let display_name: String? // `omitempty`
public let command: String? // `omitempty`
public let icon: URL? // `omitempty`
public let subdomain: Bool
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp