'use client' import { useState, useCallback } from 'react' import Link from 'next/link' import { useFlowRun } from '@/hooks/useFlowRun' import StreamingTerminal from '@/components/StreamingTerminal' import ConfirmDialog from '@/components/ConfirmDialog' const FLOW_KEY = 'update_scrum4me_web' const STEPS = [ 'git status (show current state)', 'git fetch (fetch remote refs)', 'git log (commits ahead of upstream)', 'git pull --ff-only (aborts if dirty)', 'npm ci (install dependencies)', 'prisma migrate deploy (apply migrations)', 'npm run build (build application)', 'systemctl restart scrum4me-web', 'smoke test: curl /api/products (expect 200 or 401)', ] export default function FlowPanel() { const [pendingDryRun, setPendingDryRun] = useState(null) const [completedFlowRunId, setCompletedFlowRunId] = useState(null) const handleComplete = useCallback((flowRunId: string) => { setCompletedFlowRunId(flowRunId) }, []) const flowRun = useFlowRun(handleComplete) const handleConfirm = useCallback(() => { if (pendingDryRun === null) return const dryRun = pendingDryRun setPendingDryRun(null) setCompletedFlowRunId(null) flowRun.startFlow(FLOW_KEY, dryRun) }, [pendingDryRun, flowRun]) const handleReset = useCallback(() => { flowRun.reset() setCompletedFlowRunId(null) }, [flowRun]) return (

Reproduces the Scrum4Me website update: pulls latest code, installs dependencies, applies migrations, builds, restarts the service, and verifies the endpoint is responding.

repo: /srv/scrum4me/repos/Scrum4Me

    {STEPS.map((step, i) => (
  1. {i + 1}. {step}
  2. ))}
{flowRun.status !== 'idle' && flowRun.status !== 'running' && ( )}
{flowRun.status !== 'idle' && (
Output {completedFlowRunId && ( View in audit log → )}
)} ` ${i + 1}. ${s}`).join('\n')}` } onConfirm={handleConfirm} onCancel={() => setPendingDryRun(null)} />
) }