Fix empty space in new issue pane when workspaces disabled
The execution workspace section wrapper div was rendered whenever a project was selected, even when experimental workspaces were off. The empty div's py-3 padding caused a visible layout bump. Now the entire block only renders when currentProjectSupportsExecutionWorkspace is true, and the redundant inner conditional is removed. Co-Authored-By: Paperclip <noreply@paperclip.ing> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1117,51 +1117,49 @@ export function NewIssueDialog() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{currentProject && (
|
{currentProject && currentProjectSupportsExecutionWorkspace && (
|
||||||
<div className="px-4 py-3 shrink-0 space-y-2">
|
<div className="px-4 py-3 shrink-0 space-y-2">
|
||||||
{currentProjectSupportsExecutionWorkspace && (
|
<div className="space-y-1.5">
|
||||||
<div className="space-y-1.5">
|
<div className="text-xs font-medium">Execution workspace</div>
|
||||||
<div className="text-xs font-medium">Execution workspace</div>
|
<div className="text-[11px] text-muted-foreground">
|
||||||
<div className="text-[11px] text-muted-foreground">
|
Control whether this issue runs in the shared workspace, a new isolated workspace, or an existing one.
|
||||||
Control whether this issue runs in the shared workspace, a new isolated workspace, or an existing one.
|
</div>
|
||||||
</div>
|
<select
|
||||||
|
className="w-full rounded border border-border bg-transparent px-2 py-1.5 text-xs outline-none"
|
||||||
|
value={executionWorkspaceMode}
|
||||||
|
onChange={(e) => {
|
||||||
|
setExecutionWorkspaceMode(e.target.value);
|
||||||
|
if (e.target.value !== "reuse_existing") {
|
||||||
|
setSelectedExecutionWorkspaceId("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{EXECUTION_WORKSPACE_MODES.map((option) => (
|
||||||
|
<option key={option.value} value={option.value}>
|
||||||
|
{option.label}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
{executionWorkspaceMode === "reuse_existing" && (
|
||||||
<select
|
<select
|
||||||
className="w-full rounded border border-border bg-transparent px-2 py-1.5 text-xs outline-none"
|
className="w-full rounded border border-border bg-transparent px-2 py-1.5 text-xs outline-none"
|
||||||
value={executionWorkspaceMode}
|
value={selectedExecutionWorkspaceId}
|
||||||
onChange={(e) => {
|
onChange={(e) => setSelectedExecutionWorkspaceId(e.target.value)}
|
||||||
setExecutionWorkspaceMode(e.target.value);
|
|
||||||
if (e.target.value !== "reuse_existing") {
|
|
||||||
setSelectedExecutionWorkspaceId("");
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{EXECUTION_WORKSPACE_MODES.map((option) => (
|
<option value="">Choose an existing workspace</option>
|
||||||
<option key={option.value} value={option.value}>
|
{deduplicatedReusableWorkspaces.map((workspace) => (
|
||||||
{option.label}
|
<option key={workspace.id} value={workspace.id}>
|
||||||
|
{workspace.name} · {workspace.status} · {workspace.branchName ?? workspace.cwd ?? workspace.id.slice(0, 8)}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
{executionWorkspaceMode === "reuse_existing" && (
|
)}
|
||||||
<select
|
{executionWorkspaceMode === "reuse_existing" && selectedReusableExecutionWorkspace && (
|
||||||
className="w-full rounded border border-border bg-transparent px-2 py-1.5 text-xs outline-none"
|
<div className="text-[11px] text-muted-foreground">
|
||||||
value={selectedExecutionWorkspaceId}
|
Reusing {selectedReusableExecutionWorkspace.name} from {selectedReusableExecutionWorkspace.branchName ?? selectedReusableExecutionWorkspace.cwd ?? "existing execution workspace"}.
|
||||||
onChange={(e) => setSelectedExecutionWorkspaceId(e.target.value)}
|
</div>
|
||||||
>
|
)}
|
||||||
<option value="">Choose an existing workspace</option>
|
</div>
|
||||||
{deduplicatedReusableWorkspaces.map((workspace) => (
|
|
||||||
<option key={workspace.id} value={workspace.id}>
|
|
||||||
{workspace.name} · {workspace.status} · {workspace.branchName ?? workspace.cwd ?? workspace.id.slice(0, 8)}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
)}
|
|
||||||
{executionWorkspaceMode === "reuse_existing" && selectedReusableExecutionWorkspace && (
|
|
||||||
<div className="text-[11px] text-muted-foreground">
|
|
||||||
Reusing {selectedReusableExecutionWorkspace.name} from {selectedReusableExecutionWorkspace.branchName ?? selectedReusableExecutionWorkspace.cwd ?? "existing execution workspace"}.
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user