fix(templates): don't disable the detail actions on a background refetch

isTemplatePending ORed the raw Apollo `loading` flag, gating Save/Rename/Delete.
Commit 3d5fc75 fixed the sibling *render* gate (`isLoadingTemplate && !template`)
but left this `disabled` gate one level down still keyed on raw loading, so a
background revalidation greyed out the actions on a form the user had already
edited. flow.tsx uses the entity-guarded `isFlowLoading`; template was the only
detail page reading raw loading here. The render gates above (both branches carry
`!template`) already make the form unreachable without a loaded template, so the
loading term only added a dead disabled window — dropped it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-07-23 13:52:15 +07:00
co-authored by Claude Opus 4.8
parent f0860a7858
commit 2de6386cb5
+1 -1
View File
@@ -422,7 +422,7 @@ function Template() {
}, [pendingPreset, setValue]);
const hasTemplate = !!templateData?.flowTemplate;
const isTemplatePending = !isNew && (isLoadingTemplate || !hasTemplate);
const isTemplatePending = !isNew && !hasTemplate;
const isTemplateMissing = !isNew && !isLoadingTemplate && !hasTemplate;
const pageHeader = (