AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-onlyapp/src/components/motion/deploy-demo.tsx
1"use client";2// Interactive deployment DEMONSTRATION. Everything here is scripted: no server is contacted, no number is a measurement.3// Pipeline shown is the PLANNED platform flow; the container and hosted-application stages do not exist as products yet (see labels below).4import { useCallback, useEffect, useRef, useState } from "react";5import { Play, RotateCcw, SkipForward } from "lucide-react";6import { useInView, useMotion } from "./provider";7import { ZloudLogo } from "./logo";8const STAGES = [9 { id: "source", name: "Source Code", note: "Git repository", cmd: ["$ git clone https://git.example.invalid/acme/shop.git", "Receiving objects: 100% (412/412), done.", "ref main @ 3f9c2ab (example)"] },10 { id: "build", name: "Build", note: "Install and compile", cmd: ["$ npm ci && npm run build", "added 214 packages", "build finished (simulated timing)"] },11 { id: "container", name: "Container", note: "Package the build", cmd: ["$ docker build -t acme/shop:1.0 .", "image sha256:0000…example tagged acme/shop:1.0", "image size shown here is not measured"] },12 { id: "infra", name: "Infrastructure", note: "Target server", cmd: ["$ zloud deploy --target demo-server", "agent: outbound connection to gateway (simulated)", "allocated port 20417 (example)"] },13 { id: "live", name: "Live Application", note: "Health + HTTPS", cmd: ["health: GET / -> 200 (simulated)", "certificate: issued (simulated)", "https://shop.example.invalid ● live (simulated)"] },14] as const;15const TOTAL = STAGES.reduce((n, s) => n + s.cmd.length, 0);16const HEALTH = [["Build", 1], ["Image", 2], ["Agent link", 3], ["App health", 4]] as const;17export function DeployDemo() {18 const { level, ready } = useMotion(); const animated = level !== "off"; const ref = useRef<HTMLDivElement>(null); const inView = useInView(ref, "0px", false);19 const [lines, setLines] = useState(TOTAL); // default = completed static state (what no-JS / reduced-motion visitors see)20 const [running, setRunning] = useState(false); const started = useRef(false); const timer = useRef<ReturnType<typeof setTimeout> | null>(null);21 const flat = STAGES.flatMap((s, si) => s.cmd.map(c => ({ si, c }))); const shown = flat.slice(0, lines); const stage = lines >= TOTAL ? STAGES.length : lines === 0 ? -1 : shown[shown.length - 1].si;22 const stop = () => { if (timer.current) clearTimeout(timer.current); timer.current = null; setRunning(false); };23 const tick = useCallback((n: number) => { if (document.hidden) { timer.current = setTimeout(() => tick(n), 500); return; } if (n >= TOTAL) { setRunning(false); return; } setLines(n + 1); timer.current = setTimeout(() => tick(n + 1), 520); }, []);24 const run = () => { stop(); if (!animated) { setLines(TOTAL); return; } setLines(0); setRunning(true); timer.current = setTimeout(() => tick(0), 300); };25 const step = () => { stop(); const next = lines >= TOTAL ? 1 : lines + 1; setLines(next); };26 useEffect(() => { if (!ready || !animated || !inView || started.current) return; started.current = true; run(); }, [ready, animated, inView]); // auto-play once when first seen27 useEffect(() => () => { if (timer.current) clearTimeout(timer.current); }, []);28 useEffect(() => { if (!animated) stop(); }, [animated]);29 const done = (i: number) => stage > i || stage === STAGES.length; const cur = (i: number) => stage === i;30 const scroller = useRef<HTMLPreElement>(null); useEffect(() => { const el = scroller.current; if (el) el.scrollTop = el.scrollHeight; }, [lines]);31 return <div ref={ref} className="mk-demo mk-glass" data-paused={!inView}>32 <div className="mk-demo-banner" role="note"><strong>Simulated demonstration.</strong> Scripted output for illustration. No real server, build or application is involved, and none of these values is live telemetry.</div>33 <ol className="mk-stages" aria-label="Deployment stages">{STAGES.map((s, i) => <li key={s.id} className={`mk-stage-item${done(i) ? " done" : ""}${cur(i) ? " cur" : ""}`} aria-current={cur(i) ? "step" : undefined}><span className="mk-stage-dot" aria-hidden>{done(i) ? "✓" : i + 1}</span><span><b>{s.name}</b><small>{s.note}</small></span></li>)}</ol>34 <div className="mk-demo-body">35 <pre ref={scroller} className="mk-term" aria-label="Simulated terminal output" tabIndex={0}>{shown.length === 0 ? <span className="text-muted">press Run to start the simulation</span> : shown.map((l, i) => <span key={i} className={l.c.startsWith("$") ? "mk-cmd" : ""}>{l.c}{"\n"}</span>)}{running && <span className="mk-caret" aria-hidden>▍</span>}</pre>36 <div className="mk-health"><div className="mk-health-h">Service health <em>(simulated)</em></div>37 {HEALTH.map(([n, s]) => <div key={n} className="mk-health-row"><span className={`mk-led${stage >= s || stage === STAGES.length ? " ok" : ""}`} aria-hidden />{n}<span className="ml-auto text-muted">{stage >= s || stage === STAGES.length ? "ok" : "waiting"}</span></div>)}38 <div className="mk-health-h mt-3">Connected nodes <em>(example)</em></div>39 <div className="mk-nodes">{["demo-server", "gateway", "proxy"].map((n, i) => <span key={n} className={`mk-chip${stage >= 3 + (i === 2 ? 1 : 0) || stage === STAGES.length ? " on" : ""}`}>{n}</span>)}</div></div>40 </div>41 <div className="mk-demo-ctl"><button type="button" className="mk-btn mk-btn-primary !py-2 text-sm" onClick={run}>{lines >= TOTAL || lines === 0 ? <><RotateCcw size={15} /> {lines === 0 ? "Run" : "Replay"}</> : <><Play size={15} /> Restart</>}</button>42 <button type="button" className="mk-btn !py-2 text-sm" onClick={step} aria-label="Advance one line"><SkipForward size={15} /> Step</button>43 {running && <ZloudLogo size={26} variant="loading" label="Simulation running" />}<p className="text-xs text-muted" aria-live="polite">{stage === STAGES.length ? "Simulation complete: all five stages finished." : stage >= 0 ? `Stage ${stage + 1} of 5: ${STAGES[stage].name}` : "Ready."}</p></div>44 <p className="mk-demo-status text-xs text-muted">What exists today: the AI workspace is <b>Experimental</b>. Container builds, hosted applications and one-click marketplace are <b>Upcoming</b> and are not offered.</p>45 </div>;46}47
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 1c27633 on master.
Approval requests
None pending.