From 27b89546766eda1aa2d6d3f10a92b168f6e32ac8 Mon Sep 17 00:00:00 2001 From: Anso Date: Sun, 24 May 2026 15:56:40 -0400 Subject: [PATCH] feat(deploy-panel): tell Community operators deploys lack auto-rollback (#1193) * feat(deploy-panel): tell Community operators deploys lack auto-rollback Atomic-deploy is paid-only (effectiveTier === 'paid' in the deploy and update routes); Community deploys proceed without the backup/restore fallback. The UI never told the user. They only learned the difference when a deploy failed and there was nothing to roll back to. Add a one-line muted-style notice strip inside the deploy-feedback modal, between header and log body, shown only when the user is on Community AND the action is a deploy or update (the two paths that support atomic on paid). Copy is deliberately one line and states the requirement once: "Auto-rollback on failure is a Skipper feature." Compliant with Directive 31: it does not enumerate where the feature is hidden, it does not say "you don't get it", it states what the upgrade unlocks. Other tier-named upgrade prompts in Sencho follow the same pattern. Resolves M-3 from the stack-management audit. * fix(deploy-panel): mount DeployFeedbackPortal inside LicenseProvider The portal was mounted at App level, outside the authed AppContent tree where LicenseProvider lives. After this PR introduced useLicense() inside DeployFeedbackModal (for the atomic-deploy notice), every test that opened the modal hit: Error: useLicense must be used within a LicenseProvider caught by ErrorBoundary and surfaced through every deploy-log-panel E2E spec. Move the portal inside LicenseProvider in AppContent. DeployFeedback- Provider stays at App level so its state survives across re-renders of AppContent; the portal still inherits it because AppContent is a descendant. A deploy can only fire after authentication, so rendering the portal only inside the authed tree loses nothing in practice. --- frontend/src/App.tsx | 5 ++++- frontend/src/components/DeployFeedbackModal.tsx | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index cd46ed72..164b4e67 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -36,6 +36,10 @@ function AppContent() { + {/* Portal lives inside LicenseProvider so DeployFeedbackModal can + call useLicense() (M-3 atomic-deploy notice depends on isPaid). + Outer DeployFeedbackProvider is still an ancestor through App. */} + ); @@ -46,7 +50,6 @@ function App() { - diff --git a/frontend/src/components/DeployFeedbackModal.tsx b/frontend/src/components/DeployFeedbackModal.tsx index e5b45dad..d9f1d6bb 100644 --- a/frontend/src/components/DeployFeedbackModal.tsx +++ b/frontend/src/components/DeployFeedbackModal.tsx @@ -13,6 +13,7 @@ import { Button } from '@/components/ui/button'; import { StructuredLogRow } from '@/components/log-rendering/StructuredLogRow'; import TerminalComponent from '@/components/Terminal'; import { useDeployFeedback, VERB_LABELS } from '@/context/DeployFeedbackContext'; +import { useLicense } from '@/context/LicenseContext'; const AUTO_CLOSE_SECONDS = 4; @@ -32,6 +33,7 @@ function formatElapsed(seconds: number): string { export function DeployFeedbackModal({ isMinimized, onMinimize }: DeployFeedbackModalProps) { const { panelState, logRows, onTerminalReady, onMessage, onPanelClose } = useDeployFeedback(); + const { isPaid } = useLicense(); const [showRaw, setShowRaw] = useState(false); const [elapsedSeconds, setElapsedSeconds] = useState(0); @@ -213,6 +215,16 @@ export function DeployFeedbackModal({ isMinimized, onMinimize }: DeployFeedbackM + {/* Atomic-deploy notice for Community: deploys without auto-rollback. */} + {!isPaid && (action === 'deploy' || action === 'update') && ( +
+ Auto-rollback on failure is a Skipper feature. +
+ )} + {/* Body */}