Skip to content

Commit 516aab4

Browse files
committed
fix: allow configuration editing on failed workspaces
The Configuration tab was gated behind a `status === 'ready'` check, which blocked users from viewing or editing pixi.toml when a workspace failed during initial creation. This made it impossible to fix a broken configuration without recreating the workspace from scratch. The backend (GetPixiToml / SavePixiToml) already supports reading and writing pixi.toml regardless of workspace status, so this was purely a frontend restriction. Removed the status guard from three places: - useEffect that loads toml content when switching to the tab - disabled prop on the Edit button in the workspace header - conditional block that replaced the editor with a "must be ready" message
1 parent 2fac91d commit 516aab4

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

frontend/src/pages/WorkspaceDetail.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const WorkspaceDetail = () => {
6565

6666
// Load pixi.toml when switching to that tab
6767
useEffect(() => {
68-
if (activeTab === 'toml' && !pixiToml && workspace?.status === 'ready') {
68+
if (activeTab === 'toml' && !pixiToml) {
6969
loadPixiToml();
7070
}
7171
}, [activeTab, workspace?.status]);
@@ -162,7 +162,6 @@ export const WorkspaceDetail = () => {
162162
variant="outline"
163163
size="sm"
164164
className="gap-2"
165-
disabled={workspace.status !== 'ready'}
166165
onClick={async () => {
167166
if (!pixiToml) {
168167
setLoadingToml(true);
@@ -527,11 +526,7 @@ export const WorkspaceDetail = () => {
527526
)}
528527
</div>
529528
</div>
530-
{workspace.status !== 'ready' ? (
531-
<div className="text-center py-8 text-muted-foreground">
532-
Workspace must be ready to view pixi.toml
533-
</div>
534-
) : loadingToml ? (
529+
{loadingToml ? (
535530
<div className="flex items-center justify-center py-12">
536531
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
537532
</div>

0 commit comments

Comments
 (0)