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.
This commit is contained in:
Anso
2026-05-24 15:56:40 -04:00
committed by GitHub
parent fbd13accda
commit 27b8954676
2 changed files with 16 additions and 1 deletions
+4 -1
View File
@@ -36,6 +36,10 @@ function AppContent() {
<NodeProvider>
<LicenseProvider>
<EditorLayout />
{/* 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. */}
<DeployFeedbackPortal />
</LicenseProvider>
</NodeProvider>
);
@@ -46,7 +50,6 @@ function App() {
<AuthProvider>
<DeployFeedbackProvider>
<AppContent />
<DeployFeedbackPortal />
</DeployFeedbackProvider>
<ToastContainer />
</AuthProvider>
@@ -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
</div>
</div>
{/* Atomic-deploy notice for Community: deploys without auto-rollback. */}
{!isPaid && (action === 'deploy' || action === 'update') && (
<div
className="px-4 py-1.5 text-xs text-muted-foreground bg-muted/40 border-b border-glass-border shrink-0"
role="note"
>
Auto-rollback on failure is a Skipper feature.
</div>
)}
{/* Body */}
<div
ref={scrollRef}