feat(admin-web): surface generation error message and speed up active polling

Hoists hasActiveGenerationStatus into the shared display helper so all
views agree on what counts as in-flight generation, shows the backend
generation_error_message inline on the imitation list and detail drawer
when status is failed, and drops the workspace/templates/imitation poll
interval from 10s to 3s (with a 5s fallback when streaming is enabled)
plus explicit query-cache invalidation so failed/completed states show
up promptly.
This commit is contained in:
2026-05-11 11:11:40 +08:00
parent cbbed4b42c
commit f34c6f2ceb
6 changed files with 57 additions and 30 deletions
+4
View File
@@ -62,6 +62,10 @@ export function getGenerateStatusMeta(status?: string | null): { label: string;
: { label: status, color: 'default' }
}
export function hasActiveGenerationStatus(status?: string | null): boolean {
return status === 'queued' || status === 'pending' || status === 'generating' || status === 'running'
}
export function getPublishStatusMeta(status?: string | null): { label: string; color: string } {
if (!status) {
return { label: '--', color: 'default' }