Try to fix workers and workspace
Build and Push Spoon Images / quality (push) Successful in 1m40s
Build and Push Spoon Images / build-images (push) Successful in 7m0s

This commit is contained in:
Gabriel Brown
2026-06-22 23:17:27 -04:00
parent f33f76d874
commit 930fbf5965
11 changed files with 208 additions and 48 deletions
@@ -95,13 +95,13 @@ export const AgentWorkspaceShell = ({ jobId }: { jobId: Id<'agentJobs'> }) => {
};
return (
<main className='border-border bg-muted/20 min-h-[calc(100vh-5rem)] overflow-hidden rounded-md border'>
<main className='border-border bg-muted/20 flex h-[calc(100vh-8.5rem)] min-h-[720px] flex-col overflow-hidden rounded-md border'>
<JobStatusBar job={job} />
<div className='border-border bg-background flex items-center justify-end border-b px-4 py-2'>
<WorkspaceActions job={job} disabled={workspaceDisabled} />
</div>
<div className='grid min-h-[680px] grid-cols-1 xl:grid-cols-[260px_minmax(0,1fr)_360px]'>
<aside className='border-border bg-background min-h-[260px] border-r'>
<div className='grid min-h-0 flex-1 grid-cols-1 lg:grid-cols-[280px_minmax(0,1fr)] 2xl:grid-cols-[300px_minmax(0,1fr)_420px]'>
<aside className='border-border bg-background min-h-0 border-r'>
<div className='border-border border-b p-3'>
<h2 className='text-sm font-semibold'>Files</h2>
<p className='text-muted-foreground text-xs'>Current workspace</p>
@@ -117,16 +117,19 @@ export const AgentWorkspaceShell = ({ jobId }: { jobId: Id<'agentJobs'> }) => {
}}
/>
</aside>
<section className='bg-background min-w-0'>
<Tabs defaultValue='editor' className='h-full'>
<section className='bg-background flex min-w-0 flex-col'>
<Tabs defaultValue='editor' className='flex min-h-0 flex-1 flex-col'>
<TabsList
variant='line'
className='border-border h-11 w-full justify-start rounded-none border-b px-3'
className='border-border h-11 flex-none justify-start rounded-none border-b px-3'
>
<TabsTrigger value='editor'>Editor</TabsTrigger>
<TabsTrigger value='diff'>Diff</TabsTrigger>
<TabsTrigger value='thread' className='2xl:hidden'>
Thread
</TabsTrigger>
</TabsList>
<TabsContent value='editor' className='m-0'>
<TabsContent value='editor' className='m-0 min-h-0 flex-1'>
<CodeEditor
path={selectedPath}
content={fileContent}
@@ -134,13 +137,23 @@ export const AgentWorkspaceShell = ({ jobId }: { jobId: Id<'agentJobs'> }) => {
onSave={saveFile}
/>
</TabsContent>
<TabsContent value='diff' className='m-0'>
<TabsContent value='diff' className='m-0 min-h-0 flex-1'>
<DiffViewer diff={diff} onRefresh={loadDiff} />
</TabsContent>
<TabsContent
value='thread'
className='m-0 min-h-0 flex-1 2xl:hidden'
>
<AgentThread
jobId={jobId}
messages={messages}
disabled={workspaceDisabled}
/>
</TabsContent>
</Tabs>
<CommandPanel jobId={jobId} disabled={workspaceDisabled} />
</section>
<aside className='border-border bg-muted/20 min-w-0 border-l'>
<aside className='border-border bg-muted/20 hidden min-w-0 border-l 2xl:block'>
<AgentThread
jobId={jobId}
messages={messages}
@@ -79,7 +79,7 @@ export const CodeEditor = ({
};
return (
<div className='flex h-full min-h-[520px] flex-col'>
<div className='flex h-full min-h-0 flex-col'>
<div className='border-border flex h-11 items-center justify-between gap-3 border-b px-3'>
<div className='min-w-0'>
<p className='truncate font-mono text-xs'>{path}</p>
@@ -104,7 +104,8 @@ export const CodeEditor = ({
</div>
<div className='min-h-0 flex-1'>
<MonacoEditor
height='520px'
height='100%'
width='100%'
path={path}
value={value}
theme='vs-dark'
@@ -114,6 +115,7 @@ export const CodeEditor = ({
fontSize: 13,
scrollBeyondLastLine: false,
wordWrap: 'on',
automaticLayout: true,
}}
onMount={(editor) => {
editorRef.current = editor as MonacoEditorInstance;
@@ -15,7 +15,7 @@ export const DiffViewer = ({
diff: string;
onRefresh: () => Promise<void>;
}) => (
<div className='flex h-full min-h-[520px] flex-col'>
<div className='flex h-full min-h-0 flex-col'>
<div className='border-border flex h-11 items-center justify-between border-b px-3'>
<div>
<p className='text-sm font-medium'>Workspace diff</p>
@@ -27,7 +27,8 @@ export const DiffViewer = ({
</div>
{diff.trim() ? (
<MonacoEditor
height='520px'
height='100%'
width='100%'
language='diff'
theme='vs-dark'
value={diff}
@@ -36,6 +37,7 @@ export const DiffViewer = ({
minimap: { enabled: false },
fontSize: 13,
scrollBeyondLastLine: false,
automaticLayout: true,
}}
/>
) : (
@@ -1,11 +1,21 @@
'use client';
import type { ReactNode } from 'react';
import { usePathname } from 'next/navigation';
export const AppShell = ({ children }: { children: ReactNode }) => {
const pathname = usePathname();
const isWorkspace = /\/spoons\/[^/]+\/agent\/[^/]+/.test(pathname);
return (
<div className='bg-muted/20 flex-1 border-t'>
<div className='container mx-auto min-w-0 px-4 py-6 md:px-6'>
<div
className={
isWorkspace
? 'min-w-0 px-3 py-3 md:px-4'
: 'container mx-auto min-w-0 px-4 py-6 md:px-6'
}
>
{children}
</div>
</div>
@@ -85,7 +85,7 @@ const providerOptions: {
},
{
value: 'opencode_openai_login',
label: 'OpenCode OpenAI login',
label: 'Codex ChatGPT login',
authType: 'opencode_auth_json',
},
];
@@ -282,8 +282,8 @@ export const AiProviderProfilesPanel = () => {
))
) : (
<p className='text-muted-foreground text-sm'>
Add API-key providers for OpenCode, or store an OpenCode OpenAI
login profile for the next auth-file injection pass.
Add API-key providers for OpenCode, or store a Codex ChatGPT login
profile for runs that should use your Codex plan.
</p>
)}
</CardContent>
@@ -332,7 +332,7 @@ export const AiProviderProfilesPanel = () => {
<div className='grid gap-2'>
<Label>
{selectedProvider.authType === 'opencode_auth_json'
? 'OpenCode auth JSON'
? 'Codex auth JSON'
: 'API key'}
</Label>
{selectedProvider.authType === 'opencode_auth_json' ? (
@@ -347,8 +347,9 @@ export const AiProviderProfilesPanel = () => {
<code className='bg-muted rounded px-1 py-0.5'>
~/.codex/auth.json
</code>
. It is stored encrypted and should be treated like a
password.
. Spoon writes it into the isolated job workspace as
Codex&apos;s auth cache. It is stored encrypted and should
be treated like a password.
</p>
</>
) : (