Keep New workspace metadata inside the composer (#3050)

Allow desktop metadata controls to shrink so long host and starting-ref labels truncate without crossing the composer rail. Adds a real-browser regression for the combined long-label case.
This commit is contained in:
Mohamed Boudra
2026-08-08 23:29:45 +02:00
committed by GitHub
parent 49b257c55a
commit cefb71dcac
2 changed files with 97 additions and 4 deletions
@@ -1350,8 +1350,10 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
[isPending],
);
const desktopControlStyle = isCompact ? undefined : styles.desktopControl;
const projectControl = (
<View>
<View style={desktopControlStyle}>
<ProjectPickerTrigger
pickerAnchorRef={project.anchorRef}
onPress={project.open}
@@ -1388,7 +1390,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
);
const hostControl = showHostControl ? (
<View>
<View style={desktopControlStyle}>
<HostPicker
hosts={host.allHosts}
value={host.selectedServerId}
@@ -1431,7 +1433,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
) : null;
const isolationControl = isolation.canCreateWorktree ? (
<View>
<View style={desktopControlStyle}>
<IsolationPickerTrigger
pickerAnchorRef={isolation.anchorRef}
onPress={isolation.open}
@@ -1458,7 +1460,7 @@ function useNewWorkspaceFormStack(input: NewWorkspaceFormStackInput): ReactEleme
) : null;
const baseControl = base.showRefPicker ? (
<View>
<View style={desktopControlStyle}>
<RefPickerTrigger
pickerAnchorRef={base.anchorRef}
onPress={base.open}
@@ -2392,6 +2394,10 @@ const styles = StyleSheet.create((theme) => ({
paddingRight: theme.spacing[4],
gap: theme.spacing[2],
},
desktopControl: {
minWidth: 0,
flexShrink: 1,
},
// The row's left inset matches the heading's text x (composerTitleContainer
// paddingLeft) so the control aligns with the "New workspace" glyph. The badge
// adds its own left padding, so the row inset is reduced by that amount.