Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(operations): replace deploy pill with dock

Juan Denis5db3595fe3bd
diff --git a/frontend/scripts/check-frontend-boundaries.mjs b/frontend/scripts/check-frontend-boundaries.mjs
index 4bfad483..102b2886 100644
--- a/frontend/scripts/check-frontend-boundaries.mjs
+++ b/frontend/scripts/check-frontend-boundaries.mjs
@@ -74,7 +74,7 @@ const LEGACY_COLOR_LITERALS = new Map(Object.entries({
'styles/pages/_bandwidth.scss': 1,
'styles/pages/_cutover.scss': 1,
'styles/pages/_databases.scss': 5,
- 'styles/pages/_deploy-console.scss': 15,
+ 'styles/pages/_deploy-console.scss': 14,
'styles/pages/_doctor.scss': 1,
'styles/pages/_domains.scss': 1,
'styles/pages/_file-manager.scss': 10,
diff --git a/frontend/src/components/DeployPill.jsx b/frontend/src/components/DeployPill.jsx
deleted file mode 100644
index 0d7cd382..00000000
--- a/frontend/src/components/DeployPill.jsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import { useEffect, useState, useCallback, useRef } from 'react';
-import { Link, useLocation } from 'react-router-dom';
-import { Loader2 } from 'lucide-react';
-import api from '../services/api';
-import socketService from '../services/socket';
-import { usePolling } from '../hooks/usePolling';
-import { useTranslation } from 'react-i18next';
-
-// A small global "deploy in progress" pill: while any deployment job is
-// pending/running it appears (bottom-left) so you can navigate away mid-deploy
-// and always find your way back to the live Deploy Console (plan 51 §1.3).
-// Driven by a lightweight poll of GET /deployment-jobs?status=running, refreshed
-// on socket reconnect and on any deploy_status event that flows through.
-//
-// It is a shortcut *back* to Deploy Activity, so it has nothing to offer while
-// you are already there: on /deployments and /deployments/:jobId it stays out
-// of the way entirely (and stops polling). Installing a database engine sends
-// you straight to that console, which is how a floating "1 deploy running" tag
-// ended up shouting at the page it links to.
-const POLL_MS = 6000;
-
-export default function DeployPill() {
- const { t } = useTranslation();
- const { pathname } = useLocation();
- const [active, setActive] = useState([]);
- // Deploy Activity and the console are the surface this pill points at.
- const onDeploySurface = pathname === '/deployments' || pathname.startsWith('/deployments/');
-
- // A tick must never start while the previous one is outstanding. This pill
- // lives in the global shell, so it polls on EVERY authenticated route; when
- // the backend is slow a 6s interval with no guard stacks a new pair of
- // requests every 6s on top of the ones already waiting. A 30s response time
- // means five concurrent `status=running` calls — which is exactly what a
- // DevTools capture of /domains showed, alongside a wall of pending rows.
- const inFlight = useRef(false);
-
- const refresh = useCallback(async () => {
- if (inFlight.current) return;
- inFlight.current = true;
- try {
- // One request, not two. The endpoint returns the job's status, so
- // asking for each status separately doubled the request count to
- // learn the same thing.
- const res = await api.getDeploymentJobs({ limit: 20 });
- setActive((res?.jobs || []).filter(
- (job) => job.status === 'running' || job.status === 'pending',
- ));
- } catch {
- // Silent — the pill is a convenience, not critical chrome.
- } finally {
- inFlight.current = false;
- }
- }, []);
-
- // The interval, the hidden-tab pause, and the catch-up on return are the
- // shared convention now; this component was where they were first worked
- // out by hand.
- usePolling(refresh, POLL_MS, { enabled: !onDeploySurface });
-
- useEffect(() => {
- if (onDeploySurface) return undefined;
- // React quickly to live status changes when a console elsewhere is
- // streaming — but a burst of deploy_status events must not become a
- // burst of requests, so the in-flight guard covers these too.
- const unsubStatus = socketService.on('deploy_status', refresh);
- const unsubConnect = socketService.on('connected', refresh);
- return () => {
- unsubStatus();
- unsubConnect();
- };
- }, [refresh, onDeploySurface]);
-
- if (onDeploySurface || active.length === 0) return null;
-
- const count = active.length;
- const to = count === 1 ? `/deployments/${active[0].id}` : '/deployments';
- const label = count === 1 ? '1 deploy running' : `${count} deploys running`;
-
- return (
- <Link to={to} className="deploy-pill" title={t('app.deployPill.openTheDeployConsole', 'Open the Deploy Console')}>
- <Loader2 size={14} className="deploy-pill__spin" />
- <span>{label}</span>
- </Link>
- );
-}
diff --git a/frontend/src/components/OperationsDock.jsx b/frontend/src/components/OperationsDock.jsx
new file mode 100644
index 00000000..70901dd2
--- /dev/null
+++ b/frontend/src/components/OperationsDock.jsx
@@ -0,0 +1,356 @@
+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
+import { Link } from 'react-router-dom';
+import {
+ Activity,
+ AlertTriangle,
+ ArrowUpRight,
+ Clock3,
+ ListRestart,
+ RotateCcw,
+ Square,
+ SquareTerminal,
+ X,
+} from 'lucide-react';
+import { useTranslation } from 'react-i18next';
+
+import { Button } from '@/components/ui/button';
+import { useOperations } from '../contexts/OperationsContext';
+import { useToast } from '../contexts/ToastContext';
+import { useConfirm } from '../hooks/useConfirm';
+import { usePolling } from '../hooks/usePolling';
+import { useShortcut } from '../hooks/useShortcut';
+import api from '../services/api';
+import { operationKey } from '../services/operations';
+import { formatDuration } from '../utils/time';
+import IconButton from './IconButton';
+import Pill from './ds/Pill';
+import { statusKind, statusLabel } from './ds/status';
+
+const VIEWS = ['active', 'attention', 'history'];
+
+function resourcePath(resource) {
+ if (!resource) return null;
+ if (resource.type === 'app' || resource.type === 'application') return `/services/${resource.id}`;
+ if (resource.type === 'server') return `/servers/${resource.id}`;
+ if (resource.type === 'backup_policy') return `/backups?focus=policy:${resource.id}`;
+ return null;
+}
+
+function lineText(line) {
+ if (typeof line === 'string') return line;
+ return line?.message || line?.line || JSON.stringify(line);
+}
+
+function OperationProgress({ operation, t }) {
+ const progress = operation.progress || {};
+ const total = Math.max(0, Number(progress.total) || 0);
+ const completed = Math.max(0, Number(progress.completed) || 0);
+ const percent = Math.max(0, Math.min(100, Number(progress.percent) || 0));
+ const railSize = Math.min(total, 8);
+ if (!total && !percent) return null;
+
+ return (
+ <div className="operations-dock__progress">
+ <div className="operations-dock__progress-copy">
+ <span>{operation.currentStepName || t('app.operationsDock.progress', 'Progress')}</span>
+ <span>{total ? `${completed}/${total}` : `${percent}%`}</span>
+ </div>
+ <progress value={percent} max="100" aria-label={t('app.operationsDock.progress', 'Progress')} />
+ {railSize > 1 && (
+ <div className="operations-dock__step-rail" aria-hidden="true">
+ {Array.from({ length: railSize }, (_, index) => (
+ <span
+ key={index}
+ className={index < completed ? 'is-complete' : index === completed ? 'is-current' : ''}
+ />
+ ))}
+ </div>
+ )}
+ </div>
+ );
+}
+
+export default function OperationsDock() {
+ const { t } = useTranslation();
+ const toast = useToast();
+ const { confirm } = useConfirm();
+ const {
+ activeOperations,
+ history,
+ attentionOperations,
+ selectedOperation,
+ selectedLines,
+ selectedTransport,
+ selectedStreamError,
+ unreadKeys,
+ unreadCount,
+ collapsed,
+ loading,
+ refresh,
+ openOperation,
+ setCollapsed,
+ } = useOperations();
+ const [view, setView] = useState('active');
+ const [now, setNow] = useState(Date.now());
+ const logRef = useRef(null);
+
+ usePolling(() => setNow(Date.now()), 1000, { enabled: !collapsed, immediate: false });
+
+ const toggle = useCallback(() => {
+ if (!collapsed) {
+ setCollapsed(true);
+ return;
+ }
+ if (!selectedOperation && activeOperations[0]) openOperation(activeOperations[0]);
+ else setCollapsed(false);
+ }, [collapsed, selectedOperation, activeOperations, openOperation, setCollapsed]);
+
+ useShortcut({
+ id: 'operations-dock-toggle',
+ label: t('app.operationsDock.shortcutLabel', 'Toggle Operations dock'),
+ group: 'shell',
+ keys: [{ key: 'o', ctrlOrMeta: true, shift: true }],
+ handler: toggle,
+ });
+ useShortcut({
+ id: 'operations-dock-close',
+ label: t('app.operationsDock.collapse', 'Collapse Operations dock'),
+ group: 'overlays',
+ keys: [{ key: 'Escape' }],
+ enabled: !collapsed,
+ priority: 50,
+ allowInInput: true,
+ handler: () => setCollapsed(true),
+ });
+
+ useEffect(() => {
+ if (logRef.current) logRef.current.scrollTop = logRef.current.scrollHeight;
+ }, [selectedLines]);
+
+ const rows = useMemo(() => {
+ if (view === 'attention') return attentionOperations;
+ if (view === 'history') return history;
+ return activeOperations;
+ }, [view, activeOperations, attentionOperations, history]);
+
+ const elapsed = useMemo(() => {
+ if (!selectedOperation?.startedAt) return null;
+ const start = new Date(selectedOperation.startedAt).getTime();
+ const finish = selectedOperation.finishedAt
+ ? new Date(selectedOperation.finishedAt).getTime()
+ : now;
+ if (!Number.isFinite(start) || !Number.isFinite(finish)) return null;
+ return formatDuration(Math.max(0, (finish - start) / 1000));
+ }, [selectedOperation, now]);
+
+ const cancelSelected = async () => {
+ if (!selectedOperation?.canCancel) return;
+ const accepted = await confirm({
+ title: t('app.operationsDock.cancelTitle', 'Cancel operation?'),
+ message: t('app.operationsDock.cancelMessage', 'The current step may finish before cancellation takes effect.'),
+ confirmText: t('app.operationsDock.cancelOperation', 'Cancel operation'),
+ variant: 'danger',
+ });
+ if (!accepted) return;
+ try {
+ if (selectedOperation.runKind === 'job') await api.cancelJob(selectedOperation.id);
+ await refresh();
+ toast.success(t('app.operationsDock.cancelQueued', 'Cancellation requested'));
+ } catch (error) {
+ toast.error(error?.message || t('app.operationsDock.actionFailed', 'Operation action failed'));
+ }
+ };
+
+ const retrySelected = async () => {
+ if (!selectedOperation?.canRetry) return;
+ try {
+ if (selectedOperation.runKind === 'deploy') await api.retryDeploymentJob(selectedOperation.id);
+ else await api.retryJob(selectedOperation.id);
+ await refresh();
+ toast.success(t('app.operationsDock.retryQueued', 'Retry queued'));
+ } catch (error) {
+ toast.error(error?.message || t('app.operationsDock.actionFailed', 'Operation action failed'));
+ }
+ };
+
+ const activeLabel = t('app.operationsDock.activeCount', '{{count}} active', {
+ count: activeOperations.length,
+ });
+
+ return (
+ <div className={`operations-dock${collapsed ? ' is-collapsed' : ' is-open'}`}>
+ {collapsed ? (
+ <Button
+ type="button"
+ className="operations-dock__launcher"
+ onClick={toggle}
+ aria-expanded="false"
+ aria-keyshortcuts="Control+Shift+O Meta+Shift+O"
+ title={t('app.operationsDock.open', 'Open Operations dock')}
+ >
+ <Activity size={17} className={activeOperations.length ? 'is-active' : ''} />
+ <span>{t('app.operationsDock.title', 'Operations')}</span>
+ {activeOperations.length > 0 && <span className="operations-dock__launcher-count">{activeOperations.length}</span>}
+ {unreadCount > 0 && <span className="operations-dock__unread" aria-label={t('app.operationsDock.unreadCount', '{{count}} unread', { count: unreadCount })}>{unreadCount}</span>}
+ </Button>
+ ) : (
+ <section className="operations-dock__panel" aria-label={t('app.operationsDock.title', 'Operations')}>
+ <header className="operations-dock__header">
+ <div className="operations-dock__heading">
+ <span className="operations-dock__icon"><Activity size={16} /></span>
+ <div>
+ <h2>{t('app.operationsDock.title', 'Operations')}</h2>
+ <span>{activeLabel}</span>
+ </div>
+ </div>
+ <div className="operations-dock__header-actions">
+ <IconButton
+ icon={<RotateCcw size={15} />}
+ label={t('common.actions.refresh', 'Refresh')}
+ onClick={refresh}
+ />
+ <IconButton
+ icon={<X size={16} />}
+ label={t('app.operationsDock.collapse', 'Collapse Operations dock')}
+ onClick={() => setCollapsed(true)}
+ />
+ </div>
+ </header>
+
+ <div className="operations-dock__tabs" role="tablist">
+ {VIEWS.map((item) => {
+ const count = item === 'active'
+ ? activeOperations.length
+ : item === 'attention' ? attentionOperations.length : history.length;
+ const label = item === 'active'
+ ? t('app.operationsDock.active', 'Active')
+ : item === 'attention'
+ ? t('app.operationsDock.needsAttention', 'Needs attention')
+ : t('app.operationsDock.history', 'History');
+ return (
+ <Button
+ key={item}
+ type="button"
+ variant="ghost"
+ size="sm"
+ className={view === item ? 'is-active' : ''}
+ onClick={() => setView(item)}
+ role="tab"
+ aria-selected={view === item}
+ >
+ {label}<span>{count}</span>
+ </Button>
+ );
+ })}
+ </div>
+
+ <div className="operations-dock__list" role="tabpanel">
+ {loading && rows.length === 0 ? (
+ <div className="operations-dock__empty">{t('common.state.loading', 'Loading')}</div>
+ ) : rows.length === 0 ? (
+ <div className="operations-dock__empty">
+ {view === 'active'
+ ? t('app.operationsDock.noActive', 'No operations are running')
+ : view === 'attention'
+ ? t('app.operationsDock.noAttention', 'Nothing needs attention')
+ : t('app.operationsDock.noHistory', 'No recent operations')}
+ </div>
+ ) : rows.map((operation) => {
+ const key = operationKey(operation);
+ const unread = unreadKeys.has(key);
+ return (
+ <Button
+ type="button"
+ variant="ghost"
+ key={key}
+ className={`operations-dock__row${selectedOperation && operationKey(selectedOperation) === key ? ' is-selected' : ''}`}
+ onClick={() => openOperation(operation)}
+ >
+ <span className={`operations-dock__row-state operations-dock__row-state--${statusKind(operation.status)}`} />
+ <span className="operations-dock__row-copy">
+ <strong>{operation.title}</strong>
+ <small>{operation.resource?.label || operation.kind}</small>
+ </span>
+ <Pill kind={statusKind(operation.status)}>{statusLabel(operation.status)}</Pill>
+ {unread && <span className="operations-dock__row-unread" aria-hidden="true" />}
+ </Button>
+ );
+ })}
+ </div>
+
+ {selectedOperation ? (
+ <div className="operations-dock__detail">
+ <div className="operations-dock__detail-head">
+ <div>
+ <span className="operations-dock__eyebrow">{selectedOperation.kind}</span>
+ <h3>{selectedOperation.title}</h3>
+ </div>
+ <Pill kind={statusKind(selectedOperation.status)}>{statusLabel(selectedOperation.status)}</Pill>
+ </div>
+
+ <div className="operations-dock__meta">
+ {elapsed && <span><Clock3 size={13} /> {elapsed}</span>}
+ <span><SquareTerminal size={13} /> {selectedTransport === 'socket' ? t('app.operationsDock.live', 'Live') : t('app.operationsDock.polling', 'Polling')}</span>
+ </div>
+
+ <OperationProgress operation={selectedOperation} t={t} />
+
+ {(selectedOperation.error || selectedStreamError) && (
+ <div className="operations-dock__error">
+ <AlertTriangle size={15} />
+ <span>{selectedOperation.error || selectedStreamError}</span>
+ </div>
+ )}
+
+ <div className="operations-dock__logs" ref={logRef}>
+ {selectedLines.length === 0 ? (
+ <span className="operations-dock__logs-empty">{t('app.operationsDock.waitingForLogs', 'Waiting for run logs…')}</span>
+ ) : selectedLines.slice(-250).map((line, index) => (
+ <div key={line?.id ?? index} className={`operations-dock__log-line${line?.level ? ` is-${line.level}` : ''}`}>
+ {lineText(line)}
+ </div>
+ ))}
+ </div>
+
+ <footer className="operations-dock__footer">
+ <div className="operations-dock__footer-links">
+ {resourcePath(selectedOperation.resource) && (
+ <Button asChild variant="ghost" size="sm">
+ <Link to={resourcePath(selectedOperation.resource)}>
+ {selectedOperation.resource.label}<ArrowUpRight size={13} />
+ </Link>
+ </Button>
+ )}
+ <Button asChild variant="ghost" size="sm">
+ <Link to={selectedOperation.detailPath}>
+ {selectedOperation.runKind === 'deploy'
+ ? t('app.deployPill.openTheDeployConsole', 'Open the Deploy Console')
+ : t('app.operationsDock.openDetails', 'Open details')}<ArrowUpRight size={13} />
+ </Link>
+ </Button>
+ </div>
+ <div className="operations-dock__footer-actions">
+ {selectedOperation.canRetry && (
+ <Button type="button" variant="outline" size="sm" onClick={retrySelected}>
+ <ListRestart size={14} /> {t('common.actions.retry', 'Retry')}
+ </Button>
+ )}
+ {selectedOperation.canCancel && (
+ <Button type="button" variant="destructive" size="sm" onClick={cancelSelected}>
+ <Square size={13} /> {t('app.operationsDock.cancel', 'Cancel')}
+ </Button>
+ )}
+ </div>
+ </footer>
+ </div>
+ ) : (
+ <div className="operations-dock__detail operations-dock__detail--empty">
+ <Activity size={22} />
+ <span>{t('app.operationsDock.selectOperation', 'Select an operation to inspect progress and logs')}</span>
+ </div>
+ )}
+ </section>
+ )}
+ </div>
+ );
+}
diff --git a/frontend/src/contexts/OperationsContext.jsx b/frontend/src/contexts/OperationsContext.jsx
index becd86a5..029a15f9 100644
--- a/frontend/src/contexts/OperationsContext.jsx
+++ b/frontend/src/contexts/OperationsContext.jsx
@@ -110,8 +110,13 @@ export function OperationsProvider({ children }) {
);
const selectedRunKind = selectedOperation?.runKind;
const selectedRunId = selectedOperation?.id;
+ const selectedRunStatus = selectedOperation?.status;
+ const initialSelectedRun = useMemo(() => (
+ selectedRunId == null ? null : { id: selectedRunId, status: selectedRunStatus }
+ ), [selectedRunId, selectedRunStatus]);
const selectedStream = useRunStream(selectedRunKind, selectedRunId, {
enabled: !collapsed && !!selectedRunKind && selectedRunId != null,
+ initialRun: initialSelectedRun,
});
const markRead = useCallback((key) => {
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index 3c26fd17..2a9e4fce 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -4540,6 +4540,33 @@
"stepHistory": "Step history",
"validate": "Validate"
},
+ "operationsDock": {
+ "actionFailed": "Operation action failed",
+ "active": "Active",
+ "activeCount": "{{count}} active",
+ "cancel": "Cancel",
+ "cancelMessage": "The current step may finish before cancellation takes effect.",
+ "cancelOperation": "Cancel operation",
+ "cancelQueued": "Cancellation requested",
+ "cancelTitle": "Cancel operation?",
+ "collapse": "Collapse Operations dock",
+ "history": "History",
+ "live": "Live",
+ "needsAttention": "Needs attention",
+ "noActive": "No operations are running",
+ "noAttention": "Nothing needs attention",
+ "noHistory": "No recent operations",
+ "open": "Open Operations dock",
+ "openDetails": "Open details",
+ "polling": "Polling",
+ "progress": "Progress",
+ "retryQueued": "Retry queued",
+ "selectOperation": "Select an operation to inspect progress and logs",
+ "shortcutLabel": "Toggle Operations dock",
+ "title": "Operations",
+ "unreadCount": "{{count}} unread",
+ "waitingForLogs": "Waiting for run logs…"
+ },
"organizationTabs": {
"projects": "Projects",
"sharedVariables": "Shared Variables",
diff --git a/frontend/src/layouts/DashboardLayout.jsx b/frontend/src/layouts/DashboardLayout.jsx
index b7784b26..d3d07350 100644
--- a/frontend/src/layouts/DashboardLayout.jsx
+++ b/frontend/src/layouts/DashboardLayout.jsx
@@ -15,7 +15,7 @@ import { useLockBodyScroll } from '../hooks/useLockBodyScroll';
import api from '../services/api';
import SystemNotices from '../components/SystemNotices';
import StagingBanner from '../components/StagingBanner';
-import DeployPill from '../components/DeployPill';
+import OperationsDock from '../components/OperationsDock';
import ErrorBoundary from '../components/ErrorBoundary';
import { useShortcut } from '../hooks/useShortcut';
import { useTranslation } from 'react-i18next';
@@ -126,7 +126,7 @@ const DashboardLayout = () => {
</main>
<CommandPalette open={paletteOpen} onClose={() => setPaletteOpen(false)} />
<LogsDrawer />
- <DeployPill />
+ <OperationsDock />
<AIAssistant />
<PluginLoader api={api} />
</div>
diff --git a/frontend/src/services/operations.js b/frontend/src/services/operations.js
index 51ec6fc4..691a6a70 100644
--- a/frontend/src/services/operations.js
+++ b/frontend/src/services/operations.js
@@ -93,11 +93,13 @@ export function normalizeDeploymentOperation(job) {
title: job.title || (target ? `Deploy ${target}` : 'Application deployment'),
resource: deploymentResource(job),
progress: normalizeProgress(job),
+ currentStepName: job.current_step_name || job.currentStepName || null,
startedAt: job.started_at || job.startedAt || job.created_at || null,
finishedAt: job.completed_at || job.finishedAt || null,
updatedAt: job.updated_at || job.updatedAt || job.completed_at || job.started_at || job.created_at || null,
error: job.error_message || job.error || null,
- canCancel: permissionFlag(job, 'can_cancel', 'canCancel'),
+ // Deployment jobs currently expose retry but no cancel endpoint.
+ canCancel: false,
canRetry: permissionFlag(job, 'can_retry', 'canRetry'),
requiresAction: permissionFlag(job, 'requires_action', 'requiresAction') || job.handoff === true,
needsAttention: permissionFlag(job, 'needs_attention', 'needsAttention'),
@@ -115,6 +117,7 @@ export function normalizeJobOperation(job) {
title: job.title || jobTitle(job),
resource: jobResource(job),
progress: normalizeProgress(job.result || job),
+ currentStepName: job.current_step_name || job.currentStepName || null,
startedAt: job.started_at || job.startedAt || job.created_at || null,
finishedAt: job.completed_at || job.finishedAt || null,
updatedAt: job.updated_at || job.updatedAt || job.completed_at || job.started_at || job.created_at || null,
diff --git a/frontend/src/styles/components/_operations-dock.scss b/frontend/src/styles/components/_operations-dock.scss
new file mode 100644
index 00000000..4248f65c
--- /dev/null
+++ b/frontend/src/styles/components/_operations-dock.scss
@@ -0,0 +1,268 @@
+.operations-dock {
+ position: fixed;
+ inset-inline-start: calc(#{$sidebar-width} + #{$space-4});
+ inset-block-end: $space-4;
+ z-index: 1050;
+ font-family: $font-main;
+
+ &__launcher {
+ min-height: 42px;
+ gap: $space-2;
+ border: 1px solid var(--border-strong);
+ border-radius: 999px;
+ background: var(--surface);
+ color: var(--text);
+ box-shadow: $shadow-lg;
+
+ svg.is-active { color: var(--cyan); }
+ }
+
+ &__launcher-count,
+ &__unread {
+ display: inline-grid;
+ min-width: 20px;
+ height: 20px;
+ padding-inline: 5px;
+ place-items: center;
+ border-radius: 999px;
+ font-family: var(--mono);
+ font-size: 10px;
+ line-height: 1;
+ }
+
+ &__launcher-count { @include status-variant(var(--cyan), var(--cyan-bg)); }
+ &__unread { @include status-variant(var(--red), var(--red-bg)); }
+
+ &__panel {
+ display: grid;
+ grid-template-rows: auto auto minmax(92px, 180px) minmax(0, 1fr);
+ width: min(520px, calc(100vw - #{$sidebar-width} - #{$space-8}));
+ height: min(720px, calc(100vh - #{$space-8}));
+ overflow: hidden;
+ border: 1px solid var(--border-strong);
+ border-radius: $radius-lg;
+ background: var(--surface);
+ box-shadow: $shadow-lg;
+ }
+
+ &__header,
+ &__detail-head,
+ &__footer,
+ &__heading,
+ &__header-actions,
+ &__meta,
+ &__progress-copy,
+ &__footer-links,
+ &__footer-actions {
+ display: flex;
+ align-items: center;
+ }
+
+ &__header {
+ justify-content: space-between;
+ gap: $space-3;
+ padding: $space-3 $space-4;
+ border-bottom: 1px solid var(--border-soft);
+ }
+
+ &__heading { gap: $space-3; min-width: 0; }
+ &__heading h2,
+ &__detail-head h3 { margin: 0; color: var(--text); }
+ &__heading h2 { font-size: $font-size-base; }
+ &__heading > div > span { color: var(--text-faint); font-family: var(--mono); font-size: 10px; }
+ &__header-actions { gap: $space-1; }
+
+ &__icon {
+ display: grid;
+ width: 30px;
+ height: 30px;
+ flex: 0 0 auto;
+ place-items: center;
+ border-radius: $radius-md;
+ @include status-variant(var(--cyan), var(--cyan-bg));
+ }
+
+ &__tabs {
+ display: flex;
+ gap: $space-1;
+ padding: $space-2 $space-3;
+ border-bottom: 1px solid var(--border-soft);
+
+ .btn {
+ flex: 1;
+ justify-content: center;
+ gap: 6px;
+ color: var(--text-dim);
+
+ span { color: var(--text-faint); font-family: var(--mono); font-size: 10px; }
+ &.is-active { background: var(--surface-hover); color: var(--text); }
+ }
+ }
+
+ &__list {
+ overflow-y: auto;
+ border-bottom: 1px solid var(--border-soft);
+ scrollbar-width: thin;
+ }
+
+ &__row {
+ position: relative;
+ display: grid;
+ grid-template-columns: 8px minmax(0, 1fr) auto;
+ width: 100%;
+ min-height: 52px;
+ padding: $space-2 $space-3;
+ gap: $space-3;
+ border-radius: 0;
+ text-align: start;
+
+ &.is-selected { background: var(--surface-hover); }
+ }
+
+ &__row-state {
+ width: 7px;
+ height: 7px;
+ align-self: center;
+ border-radius: 50%;
+ background: var(--text-faint);
+
+ &--green { @include status-variant(var(--green), var(--green)); }
+ &--amber { @include status-variant(var(--amber), var(--amber)); }
+ &--red { @include status-variant(var(--red), var(--red)); }
+ &--cyan { @include status-variant(var(--cyan), var(--cyan)); }
+ &--violet { @include status-variant(var(--violet), var(--violet)); }
+ }
+
+ &__row-copy {
+ display: flex;
+ min-width: 0;
+ flex-direction: column;
+ align-items: flex-start;
+
+ strong,
+ small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ strong { color: var(--text); font-size: $font-size-sm; }
+ small { color: var(--text-faint); font-family: var(--mono); font-size: 10px; }
+ }
+
+ &__row-unread {
+ position: absolute;
+ inset-block-start: 7px;
+ inset-inline-end: 7px;
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--red);
+ }
+
+ &__empty {
+ display: grid;
+ min-height: 92px;
+ place-items: center;
+ padding: $space-4;
+ color: var(--text-faint);
+ font-size: $font-size-sm;
+ text-align: center;
+ }
+
+ &__detail {
+ display: flex;
+ min-height: 0;
+ flex-direction: column;
+ padding: $space-4;
+ gap: $space-3;
+
+ &--empty {
+ align-items: center;
+ justify-content: center;
+ color: var(--text-faint);
+ text-align: center;
+ }
+ }
+
+ &__detail-head { justify-content: space-between; gap: $space-3; }
+ &__detail-head > div { min-width: 0; }
+ &__detail-head h3 { overflow: hidden; font-size: $font-size-lg; text-overflow: ellipsis; white-space: nowrap; }
+ &__eyebrow { color: var(--text-faint); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
+
+ &__meta { gap: $space-3; color: var(--text-faint); font-family: var(--mono); font-size: 10px; }
+ &__meta span { display: inline-flex; align-items: center; gap: 5px; }
+
+ &__progress { display: grid; gap: $space-2; }
+ &__progress-copy { justify-content: space-between; color: var(--text-dim); font-size: $font-size-xs; }
+ &__progress progress {
+ width: 100%;
+ height: 5px;
+ overflow: hidden;
+ border: 0;
+ border-radius: 999px;
+ background: var(--surface-hover);
+ accent-color: var(--accent-primary);
+ }
+ &__progress progress::-webkit-progress-bar { background: var(--surface-hover); }
+ &__progress progress::-webkit-progress-value { background: var(--accent-primary); }
+
+ &__step-rail { display: flex; justify-content: space-between; }
+ &__step-rail span {
+ width: 8px;
+ height: 8px;
+ border: 1px solid var(--border-strong);
+ border-radius: 50%;
+ background: var(--surface);
+
+ &.is-complete { @include status-variant(var(--green), var(--green), var(--green)); }
+ &.is-current { @include status-variant(var(--cyan), null, var(--cyan)); box-shadow: 0 0 0 3px var(--cyan-bg); }
+ }
+
+ &__error {
+ display: flex;
+ align-items: flex-start;
+ gap: $space-2;
+ padding: $space-2 $space-3;
+ border: 1px solid transparent;
+ border-radius: $radius-md;
+ @include status-variant(var(--red), var(--red-bg), var(--red));
+ font-size: $font-size-xs;
+ }
+
+ &__logs {
+ flex: 1;
+ min-height: 100px;
+ overflow: auto;
+ padding: $space-3;
+ border: 1px solid var(--border-soft);
+ border-radius: $radius-md;
+ background: var(--bg-code);
+ font-family: var(--mono);
+ font-size: 11px;
+ line-height: 1.6;
+ scrollbar-width: thin;
+ }
+
+ &__logs-empty { display: block; padding-block: $space-4; color: var(--text-faint); text-align: center; }
+ &__log-line { color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
+ &__log-line.is-error { color: var(--red); }
+ &__log-line.is-warn,
+ &__log-line.is-warning { color: var(--amber); }
+
+ &__footer { justify-content: space-between; gap: $space-2; }
+ &__footer-links { min-width: 0; gap: $space-1; }
+ &__footer-links .btn { max-width: 190px; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ &__footer-actions { gap: $space-2; }
+
+ @media (max-width: $breakpoint-md) {
+ inset-inline: $space-3;
+ inset-block-end: 72px;
+
+ &__panel {
+ width: auto;
+ height: min(680px, calc(100vh - 92px));
+ }
+
+ &__footer { align-items: stretch; flex-direction: column; }
+ &__footer-links,
+ &__footer-actions { justify-content: flex-end; }
+ }
+}
+
+.operations-dock.is-open { z-index: 1110; }
diff --git a/frontend/src/styles/main.scss b/frontend/src/styles/main.scss
index ddc6eb88..cd4a577e 100644
--- a/frontend/src/styles/main.scss
+++ b/frontend/src/styles/main.scss
@@ -68,6 +68,7 @@
@import 'components/_contribution-graph';
@import 'components/_command-palette';
@import 'components/_logs-drawer';
+@import 'components/_operations-dock';
@import 'components/_ai-assistant';
@import 'components/_ui';
@import 'components/_staging-banner';
diff --git a/frontend/src/styles/pages/_deploy-console.scss b/frontend/src/styles/pages/_deploy-console.scss
index aae65e44..5d4303ad 100644
--- a/frontend/src/styles/pages/_deploy-console.scss
+++ b/frontend/src/styles/pages/_deploy-console.scss
@@ -606,35 +606,6 @@ $dc-surface-line: rgba(255, 255, 255, 0.04);
to { transform: rotate(360deg); }
}
-// Global "deploy in progress" pill (fixed, bottom-left). Sits clear of the AI
-// chat bubble (bottom-right).
-.deploy-pill {
- position: fixed;
- left: $space-4;
- bottom: $space-4;
- z-index: 60;
- display: inline-flex;
- align-items: center;
- gap: $space-2;
- padding: $space-2 $space-3;
- border-radius: 999px;
- background: var(--accent-primary);
- color: #fff;
- font-size: $font-size-sm;
- font-weight: 600;
- box-shadow: $shadow-lg;
-
- &:hover { filter: brightness(1.05); }
-
- &__spin {
- animation: dc-spin 1s linear infinite;
- }
-
- @media (max-width: 768px) {
- bottom: calc(#{$space-4} + 56px); // clear the mobile bottom bar
- }
-}
-
// ---- log sections, chips and match navigation (plan 51.6 console parity) ----
.deploy-console {
// Error / warning counts in the toolbar. They read as a summary first and