fix: use kubectl json output for terminal introspection

- replace fragile jsonpath quoting with full pod JSON parsing
- show container and image summary in terminal failure message
This commit is contained in:
Mark McKeen
2026-03-29 10:05:13 -06:00
parent 4de15bc8ab
commit 25a2971928
2 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ export default function SandboxList({
const inspectRes = await fetch(`/api/openshell/terminal/introspect?sandboxId=${encodeURIComponent(selectedSandbox)}`)
const inspectData = await inspectRes.json()
setTerminalMessage(inspectData.ok
? `Terminal probe failed. Pod introspection for ${selectedSandbox}: ${inspectData.raw}`
? `Terminal probe failed. Pod introspection for ${selectedSandbox}: containers=${(inspectData.containers || []).join(', ')} images=${(inspectData.images || []).join(', ')}`
: (data.error || 'Failed to attach to OpenShell terminal.'))
}
} catch (error) {