refactor(worker): delete per-job OpenCode container path, host_port split, and dead docker helpers

Claude-Session: https://claude.ai/code/session_01ScyZ1NhfN84LAnHpwhfEQk
This commit is contained in:
Gabriel Brown
2026-07-11 10:26:58 -04:00
parent ff0425cf4b
commit c9ee2e6cde
6 changed files with 172 additions and 763 deletions
@@ -31,18 +31,17 @@ type WorkerHealth = {
convexUrl: string;
runtime: string;
containerRuntime: string;
containerAccess: string;
jobImage: string;
workdir: string;
network?: string;
httpPort: number;
activeWorkspaceCount: number;
workspaceContainers: string[];
boxContainers: string[];
};
type CleanupResult = {
removedContainers: string[];
removedWorkdirs: string[];
boxContainers: string[];
};
export const WorkerHealthPanel = () => {
@@ -103,9 +102,7 @@ export const WorkerHealthPanel = () => {
});
if (!response.ok) throw new Error(await response.text());
const result = (await response.json()) as CleanupResult;
toast.success(
`Cleaned ${result.removedContainers.length} containers and ${result.removedWorkdirs.length} workdirs.`,
);
toast.success(`Cleaned ${result.removedWorkdirs.length} workdirs.`);
await refreshHealth();
} catch (error) {
console.error(error);
@@ -165,9 +162,7 @@ export const WorkerHealthPanel = () => {
{health.ok ? 'healthy' : 'unhealthy'}
</Badge>
<Badge variant='outline'>{health.workerId}</Badge>
<Badge variant='outline'>
{health.containerRuntime} / {health.containerAccess}
</Badge>
<Badge variant='outline'>{health.containerRuntime}</Badge>
</div>
<dl className='grid gap-3 text-sm md:grid-cols-2'>
<div>
@@ -198,12 +193,10 @@ export const WorkerHealthPanel = () => {
</div>
</dl>
<div>
<p className='text-muted-foreground text-sm'>
Workspace containers
</p>
<p className='text-muted-foreground text-sm'>Box containers</p>
<p className='mt-1 font-mono text-sm'>
{health.workspaceContainers.length
? health.workspaceContainers.join(', ')
{health.boxContainers.length
? health.boxContainers.join(', ')
: 'none'}
</p>
</div>
@@ -283,8 +276,7 @@ export const WorkerHealthPanel = () => {
<div>
<p className='text-sm font-medium'>Orphaned worker resources</p>
<p className='text-muted-foreground text-sm'>
Remove inactive Spoon job containers and inactive directories
under the configured worker workdir.
Remove inactive directories under the configured worker workdir.
</p>
</div>
<Button