feat: Script Generator Phase 1+2 — backend, engine, API, frontend, template editor, parameter detector
Complete Script Generator feature including: Backend: - ScriptCategory, ScriptTemplate, ScriptGeneration models - ScriptTemplateEngine with substitution, filters, sanitization - CRUD + share API endpoints with permission checks - Integration tests for permissions and sharing - Migration 057 with AD User Management seed templates Frontend — Script Library: - Browse templates with category tabs and search - Configure pane with parameter form and script generation - Script preview with live substitution and copy/download - scriptGeneratorStore Zustand store Frontend — Template Editor: - Full CRUD form with metadata, script body (Monaco Editor), parameters - ParameterSchemaBuilder with visual builder + JSON toggle - ScriptManagePage with routing and nav link Frontend — Parameter Detector: - Client-side PowerShell parameter detection engine - Detects script-level param() blocks and variable assignments - Type inference from PS type annotations and value patterns - ParameterDetectorStepper one-by-one review UI with accept/skip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #105.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { type ReactNode } from 'react'
|
||||
import { type ReactNode, useEffect, useRef } from 'react'
|
||||
import { Button } from '@/components/ui/Button'
|
||||
|
||||
interface FallbackProps {
|
||||
@@ -18,17 +18,20 @@ function isChunkLoadError(error: Error): boolean {
|
||||
}
|
||||
|
||||
function DefaultFallback({ error, resetError }: FallbackProps) {
|
||||
const reloadingRef = useRef(false)
|
||||
|
||||
// Auto-reload on stale chunk errors (happens after deployments)
|
||||
if (isChunkLoadError(error)) {
|
||||
useEffect(() => {
|
||||
if (!isChunkLoadError(error)) return
|
||||
const key = 'rf_boundary_chunk_reload'
|
||||
const lastReload = sessionStorage.getItem(key)
|
||||
const now = Date.now()
|
||||
if (!lastReload || now - Number(lastReload) > 10_000) {
|
||||
sessionStorage.setItem(key, String(now))
|
||||
reloadingRef.current = true
|
||||
window.location.reload()
|
||||
return null
|
||||
}
|
||||
}
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<div className="flex min-h-[400px] flex-col items-center justify-center p-8">
|
||||
|
||||
Reference in New Issue
Block a user