Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: close the upscale drawer on the queued generative job (#6511)

[._.]/ Adam Eivy827892d76481
diff --git a/client/src/components/media/VideoUpscaleDrawer.jsx b/client/src/components/media/VideoUpscaleDrawer.jsx
index 9c194a635a..2e5aa38d0e 100644
--- a/client/src/components/media/VideoUpscaleDrawer.jsx
+++ b/client/src/components/media/VideoUpscaleDrawer.jsx
@@ -100,6 +100,15 @@ export default function VideoUpscaleDrawer({ item, onClose, onUpscaled }) {
return null;
});
setSubmitting(false);
+ // The two methods answer with different keys because they finish at
+ // different times (#6511): Lanczos runs inline and hands back the finished
+ // row, while the generative pass is a multi-minute GPU render that answers
+ // with the queued job and lands in history when it completes.
+ if (result?.job) {
+ toast.success('Queued — watch it in the render queue');
+ onClose();
+ return;
+ }
if (result?.video) {
onUpscaled(result.video);
toast.success('Upscaled 2×');
diff --git a/client/src/components/media/VideoUpscaleDrawer.test.jsx b/client/src/components/media/VideoUpscaleDrawer.test.jsx
index 33f2b38278..9cf271a9c4 100644
--- a/client/src/components/media/VideoUpscaleDrawer.test.jsx
+++ b/client/src/components/media/VideoUpscaleDrawer.test.jsx
@@ -74,14 +74,22 @@ describe('VideoUpscaleDrawer', () => {
await waitFor(() => expect(onUpscaled).toHaveBeenCalledWith({ id: 'video-2', upscaledFrom: 'video-1' }));
});
- it('choosing the generative method submits method: "ltx"', async () => {
- render(<VideoUpscaleDrawer item={ITEM} onClose={vi.fn()} onUpscaled={vi.fn()} />);
+ it('choosing the generative method submits method: "ltx" and closes on the queued job', async () => {
+ // The generative pass answers with a QUEUED JOB, not a finished row (#6511),
+ // so the drawer must close on `job` instead of waiting for a `video` that
+ // only arrives minutes later, in history.
+ upscaleVideo.mockResolvedValue({ ok: true, job: { jobId: 'job-1', position: 1, status: 'queued' } });
+ const onClose = vi.fn();
+ const onUpscaled = vi.fn();
+ render(<VideoUpscaleDrawer item={ITEM} onClose={onClose} onUpscaled={onUpscaled} />);
await waitFor(() => expect(getUpscalePlan).toHaveBeenCalled());
fireEvent.click(screen.getByLabelText(/LTX-2\.5 generative/i));
fireEvent.click(screen.getByRole('button', { name: /upscale 2×/i }));
await waitFor(() => expect(upscaleVideo).toHaveBeenCalledWith('video-1', { method: 'ltx', silent: true }));
+ await waitFor(() => expect(onClose).toHaveBeenCalled());
+ expect(onUpscaled).not.toHaveBeenCalled();
});
it('renders target dimensions and the synthesized-detail warning once generative is picked', async () => {