Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { buildExecutionHostRegistry } from '../../../../../../shared/execution-h
import { getHostDisplayLabelOverrides } from '../../../../../../shared/host-setting-overrides'
import type { ProjectHostSetup } from '../../../../../../shared/project-types'
import type { Repo } from '../../../../../../shared/repo-types'
import { parseWslUncPath } from '../../../../../../shared/wsl-paths'
import { useAppStore } from '../../../../store/index'
import { getProjectHostSetupProjectionFromState } from '../../../../store/project-host-setup-selector'
import { cn } from '../../../../lib/utils'
Expand Down Expand Up @@ -308,6 +309,17 @@ export function RepositoryHostSetupsSection({
}
)
: (hostOptionById.get(setup.hostId)?.label ?? getExecutionHostLabel(setup.hostId))
// Why: a WSL-UNC setup path is where this project's worktrees live, so
// the row names the storage distro instead of reading as plain Windows.
const setupStorageDistro = parseWslUncPath(setup.path)?.distro ?? null
const setupHostLabelWithDistro =
setupStorageDistro && executionHost?.kind === 'local'
Comment thread
Bandersnatch0x marked this conversation as resolved.
Resolved
? translate(
'auto.components.settings.RepositoryPane.wslStorageHostLabel',
'{{value0}} · WSL ({{distro}})',
{ value0: setupHostLabel, distro: setupStorageDistro }
)
: setupHostLabel
const isCurrentSetup = setup.id === selectedProjectHostSetup?.id
const canOpenSetup = setup.repoId.trim().length > 0
const canRemoveSetup = !canOpenSetup && deletingSetupId !== setup.id
Expand All @@ -322,7 +334,7 @@ export function RepositoryHostSetupsSection({
>
<div className="min-w-0 flex-1">
<div className="flex min-w-0 items-center gap-2">
<span className="truncate text-sm font-medium">{setupHostLabel}</span>
<span className="truncate text-sm font-medium">{setupHostLabelWithDistro}</span>
<SettingsBadge tone={setupReady ? 'accent' : 'muted'}>
{setupStateLabel}
</SettingsBadge>
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8717,7 +8717,8 @@
"show": "Show",
"hide": "Hide",
"externalWorktreesGlobal": "Global default: {{value0}}",
"useGlobal": "Use global"
"useGlobal": "Use global",
"wslStorageHostLabel": "{{value0}} · WSL ({{distro}})"
},
"RepositorySourceControlAiActionRows": {
"548a6e1281": "Command template",
Expand Down