From b6c2953ec37421ea90ce3e951299c29f096b6973 Mon Sep 17 00:00:00 2001 From: Jeroen Rinzema Date: Tue, 30 Jun 2026 09:23:31 +0200 Subject: [PATCH] fix(console): refresh schedule schema map after creating a schedule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a scheduled item is created with a brand-new schedule name, the server registers a new schedule schema (new id). The id→name map backing the list, however, was fetched once on mount and never refreshed, so the freshly created row had no name entry and fell back to rendering its raw scheduled_id (a UUID) instead of the name the user just entered. Capture the schema resolver's reload function and call it alongside the instance reload after a successful create, so the new id→name mapping is available immediately. --- console/src/components/scheduled-detail-table.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/console/src/components/scheduled-detail-table.tsx b/console/src/components/scheduled-detail-table.tsx index 0f795581..654e2a31 100644 --- a/console/src/components/scheduled-detail-table.tsx +++ b/console/src/components/scheduled-detail-table.tsx @@ -230,7 +230,7 @@ export default function ScheduledDetailTable({ } // Fetch scheduled schemas to get id→name mapping - const [schemasResult] = useResolver( + const [schemasResult, , reloadSchemas] = useResolver( useCallback(async () => { try { const { data } = await client.get<{ results: ScheduledSchema[] }>( @@ -312,7 +312,10 @@ export default function ScheduledDetailTable({ ) } - await reloadScheduled() + // Creating with a new name registers a new schedule schema, so refresh + // the id→name map too — otherwise the new row falls back to showing its + // raw scheduled_id (a UUID) instead of the name the user just entered. + await Promise.all([reloadScheduled(), reloadSchemas()]) setIsCreateOpen(false) scheduledForm.reset() setNewScheduledData({})