Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: make app deploy modal dismissable while deploy is running

Adam Eivy94c61c78317d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 407748e6b5..460ad78329 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -42,6 +42,8 @@
## Fixed
+- **App deploy modal — dismissable while a deploy is in progress.** The Deploy panel modal (App detail → Deploy) hid its X close button whenever `isDeploying` was true and had no Esc / backdrop-click handlers, so an iOS deploy (which can take many minutes during the TestFlight upload phase) trapped the user behind a full-screen modal with no escape. The X button now renders unconditionally; while a deploy is running it acts as a *minimize* (sets a local `dismissed` flag, leaves the server-side `bash deploy.sh` child process untouched, keeps the streaming Socket.IO listeners attached so output/result keep accumulating in state) and after the deploy finishes it falls back to the original `clearDeploy()` reset. Esc and clicking the dimmed backdrop both call the same `handleClose` so all three dismiss vectors behave identically. The Deploy split-button label now flips to **"View deploy…"** while a hidden run is in progress, and clicking it short-circuits — `setDismissed(false)` reopens the modal instead of calling `startDeploy` again (which the server's per-app `deployingApps` lock would have rejected anyway, surfacing a confusing "Deploy already in progress" error). Disabled state on the primary Deploy button removed since the click is now meaningful even mid-run; the chevron-down options trigger stays disabled because changing flags mid-run is nonsensical. Touched: `client/src/components/apps/DeployPanel.jsx`.
+
- **Mobile sidebar footer — version + icons no longer overflow the nav.** The expanded sidebar drawer footer rendered the version label and four 40×40 touch-target icons (Ambient, theme toggle, voice toggle, notifications) on a single `flex justify-between` row. On mobile the sidebar is `w-56` (224px) with `p-4` padding, leaving 192px of content width — but `~50px` for `v1.48.0` plus `4 × 40px + gaps ≈ 172px` for the icons totaled ~225px, so the rightmost icon (notification bell with its yellow badge) bled outside the nav background. Fixed by stacking the row vertically below the `sm:` breakpoint (`flex-col items-center gap-2 sm:flex-row sm:gap-0 sm:justify-between`), which puts the version above the centered icon row on mobile while preserving the original side-by-side layout on `sm+` and the existing `lg:flex-col` stack when the sidebar is collapsed. Touched: `client/src/components/Layout.jsx`.
- **CoS agent progress bar — active runs cap at 99%, not 100%.** The P80-based progress meter on `AgentCard` clamped at 100% via `Math.min(100, …)`, so any agent that reached its expected run time visually flipped to "100% complete" while still actively running — confusing the user into thinking the task had finished. Capped the calculation at 99% instead so only completion can land on 100%, and switched the overtime color trigger from `progress >= 100` (now unreachable) to the existing `remainingTime?.isOvertime` flag so the bar still flips to yellow once the duration exceeds the P80 estimate. The "+Xs over estimate" badge already handled the textual overtime indicator. Touched: `client/src/components/cos/tabs/AgentCard.jsx`.
diff --git a/client/src/components/apps/DeployPanel.jsx b/client/src/components/apps/DeployPanel.jsx
index ac3a74d9af..914f40dc66 100644
--- a/client/src/components/apps/DeployPanel.jsx
+++ b/client/src/components/apps/DeployPanel.jsx
@@ -17,9 +17,11 @@ export default function DeployPanel({ appId, appName }) {
const { output, isDeploying, error, result, startDeploy, clearDeploy } = useAppDeploy();
const [showOptions, setShowOptions] = useState(false);
const [selectedFlags, setSelectedFlags] = useState([]);
+ const [dismissed, setDismissed] = useState(false);
const outputRef = useRef(null);
const rafRef = useRef(null);
- const isOpen = isDeploying || output.length > 0 || error || result;
+ const hasState = isDeploying || output.length > 0 || error || result;
+ const isOpen = hasState && !dismissed;
// Throttled auto-scroll via rAF
useEffect(() => {
@@ -33,6 +35,14 @@ export default function DeployPanel({ appId, appName }) {
useEffect(() => () => { if (rafRef.current) cancelAnimationFrame(rafRef.current); }, []);
+ // Esc to dismiss the modal (deploy keeps running in the background)
+ useEffect(() => {
+ if (!isOpen) return;
+ const onKey = (e) => { if (e.key === 'Escape') setDismissed(true); };
+ window.addEventListener('keydown', onKey);
+ return () => window.removeEventListener('keydown', onKey);
+ }, [isOpen]);
+
const toggleFlag = (flag) => {
setSelectedFlags(prev => {
if (PLATFORM_FLAGS.has(flag)) {
@@ -47,19 +57,36 @@ export default function DeployPanel({ appId, appName }) {
const handleDeploy = () => {
setShowOptions(false);
+ setDismissed(false);
+ // If a deploy is already running and the modal was dismissed, just reopen it
+ // instead of triggering another deploy (the backend would reject as duplicate).
+ if (isDeploying) return;
startDeploy(appId, selectedFlags);
};
+ const handleClose = () => {
+ if (isDeploying) {
+ // Hide the modal but keep state — deploy continues server-side.
+ setDismissed(true);
+ } else {
+ // Deploy is finished; clear state so the panel resets.
+ clearDeploy();
+ setDismissed(false);
+ }
+ };
+
return (
<div className="relative inline-flex">
<div className="inline-flex rounded-lg overflow-hidden border border-port-border">
<button
onClick={handleDeploy}
- disabled={isDeploying}
- className="px-2 py-1 bg-purple-500/20 text-purple-400 hover:bg-purple-500/30 transition-colors disabled:opacity-50 flex items-center gap-1"
+ className="px-2 py-1 bg-purple-500/20 text-purple-400 hover:bg-purple-500/30 transition-colors flex items-center gap-1"
+ title={isDeploying && dismissed ? 'Show deploy output' : undefined}
>
<Rocket size={14} className={isDeploying ? 'animate-pulse' : ''} />
- <span className="text-xs">{isDeploying ? 'Deploying...' : 'Deploy'}</span>
+ <span className="text-xs">
+ {isDeploying ? (dismissed ? 'View deploy…' : 'Deploying…') : 'Deploy'}
+ </span>
</button>
<button
onClick={() => setShowOptions(prev => !prev)}
@@ -95,7 +122,10 @@ export default function DeployPanel({ appId, appName }) {
)}
{isOpen && (
- <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4">
+ <div
+ className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4"
+ onClick={(e) => { if (e.target === e.currentTarget) handleClose(); }}
+ >
<div className="bg-port-bg border border-port-border rounded-xl shadow-2xl w-full max-w-3xl max-h-[80vh] flex flex-col">
<div className="flex items-center justify-between px-4 py-3 border-b border-port-border">
<div className="flex items-center gap-2">
@@ -103,11 +133,14 @@ export default function DeployPanel({ appId, appName }) {
<span className="text-sm font-medium text-white">Deploy: {appName}</span>
{isDeploying && <BrailleSpinner text="" className="text-xs text-purple-400" />}
</div>
- {!isDeploying && (
- <button onClick={clearDeploy} className="text-gray-400 hover:text-white transition-colors">
- <X size={16} />
- </button>
- )}
+ <button
+ onClick={handleClose}
+ className="text-gray-400 hover:text-white transition-colors"
+ title={isDeploying ? 'Hide (deploy keeps running)' : 'Close'}
+ aria-label={isDeploying ? 'Hide deploy output' : 'Close deploy panel'}
+ >
+ <X size={16} />
+ </button>
</div>
<div