fix(app): clean up host selection affordances

Single-host users should not see host-selection chrome, while multi-host surfaces keep shared combobox feedback and consistent hover-card metadata rows.
This commit is contained in:
Mohamed Boudra
2026-06-26 20:28:55 +07:00
parent 1ce00dca1f
commit 07680cdd69
6 changed files with 84 additions and 42 deletions
@@ -1196,6 +1196,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
const selectedHostLabel =
host.allHosts.find((h) => h.serverId === host.selectedServerId)?.label ?? "Host";
const showHostControl = host.allHosts.length > 1;
const isolationTriggerLabel = isolationLabel(t, isolation.effectiveIsolation);
const badgePressableStyle = useCallback(
@@ -1242,7 +1243,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
</View>
);
const hostControl = (
const hostControl = showHostControl ? (
<View>
<HostPicker
hosts={host.allHosts}
@@ -1271,7 +1272,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
</Pressable>
</HostPicker>
</View>
);
) : null;
const isolationControl = isolation.canCreateWorktree ? (
<View>
@@ -1334,7 +1335,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
return isCompact ? (
<View testID="new-workspace-ref-picker-row" style={styles.formStack}>
<FormRow>{projectControl}</FormRow>
<FormRow>{hostControl}</FormRow>
{hostControl ? <FormRow>{hostControl}</FormRow> : null}
{/* Keep fixed row height when git-only controls are hidden. */}
{isolationControl ? (
<FormRow>{isolationControl}</FormRow>