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.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
fix(deploy-console): collapse the failure tail so the log has room
Juan Denis64d84c4abde3
diff --git a/frontend/src/components/deploy-console/ErrorCard.jsx b/frontend/src/components/deploy-console/ErrorCard.jsxindex 72d4e329..52081f03 100644--- a/frontend/src/components/deploy-console/ErrorCard.jsx+++ b/frontend/src/components/deploy-console/ErrorCard.jsx@@ -1,17 +1,25 @@-import { useContext } from 'react';-import { AlertTriangle, RefreshCw, Copy, Sparkles } from 'lucide-react';+import { useContext, useState } from 'react';+import { AlertTriangle, RefreshCw, Copy, Sparkles, ChevronDown, ChevronRight } from 'lucide-react';import { AIContext } from '../../contexts/AIContext';-// Pinned failure card (plan 51 §1.1): failed step name, the persisted failure-// tail (the real reason, not a summary), the one-line error, a plain-language-// hint when a heuristic matched, and actions: Retry / Copy error / Ask AI.+// Pinned failure card (plan 51 §1.1): failed step name, the one-line error, a+// plain-language hint when a heuristic matched, actions (Retry / Copy / Ask AI)+// and the persisted failure tail behind a disclosure.+//+// The tail is collapsed by default. It used to be open, which cost ~250px above+// the fold and pushed the live log into a strip — while showing the same output+// that is already in the log below. Now that a failed deploy scrolls itself to+// the offending line and the severity map marks it, the duplicate is worth+// having on demand rather than always.export default function ErrorCard({ failedStepName, failureTail, hint, errorMessage, onRetry, retrying }) {+ const [showTail, setShowTail] = useState(false);// Read the AI drawer context directly (null when no AIProvider is mounted),// so the hook is called unconditionally and the "Ask AI" button degrades// gracefully.const ai = useContext(AIContext);const tailText = Array.isArray(failureTail) ? failureTail.join('\n') : (failureTail || '');+ const tailLines = tailText ? tailText.split('\n') : [];const copyError = () => {const blob = [@@ -50,7 +58,7 @@ export default function ErrorCard({ failedStepName, failureTail, hint, errorMess</p>)}- {tailText && (+ {showTail && tailText && (<pre className="deploy-console__error-tail">{tailText}</pre>)}@@ -67,6 +75,19 @@ export default function ErrorCard({ failedStepName, failureTail, hint, errorMess<Sparkles size={14} /> Ask AI</button>)}+ {tailLines.length > 0 && (+ <button+ type="button"+ className="deploy-console__error-toggle"+ onClick={() => setShowTail((v) => !v)}+ aria-expanded={showTail}+ >+ {showTail ? <ChevronDown size={13} /> : <ChevronRight size={13} />}+ {showTail+ ? 'Hide output'+ : `Show output (${tailLines.length} line${tailLines.length === 1 ? '' : 's'})`}+ </button>+ )}</div></div>);diff --git a/frontend/src/styles/pages/_deploy-console.scss b/frontend/src/styles/pages/_deploy-console.scssindex bb1eae00..ec35fa4c 100644--- a/frontend/src/styles/pages/_deploy-console.scss+++ b/frontend/src/styles/pages/_deploy-console.scss@@ -709,3 +709,31 @@ $dc-surface-line: rgba(255, 255, 255, 0.04);contain-intrinsic-size: auto 19px;}}++// ---- failure card: tail behind a disclosure ----+.deploy-console {+ // Sits at the end of the actions row, pushed right — a quiet text control,+ // since it is a disclosure rather than an action.+ &__error-toggle {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ margin-left: auto;+ padding: 4px 8px;+ border: none;+ background: transparent;+ color: $text-secondary;+ font-size: 12px;+ cursor: pointer;+ border-radius: $radius-md;++ &:hover { color: $text-primary; background: rgba(255, 255, 255, 0.06); }+ }++ &__error-actions { flex-wrap: wrap; }++ // With the tail collapsed the card is ~100px instead of ~350px, so the log+ // below gets the height back. Keep the expanded tail shorter than it was+ // too — it is a preview of the log, not a second copy of it.+ &__error-tail { max-height: 180px; }+}