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.

fix(review): posture installs survive unchecked overlaps; translatable storage empty-states

Juan Deniscea1770562ae
diff --git a/builtin-extensions/serverkit-cloudflare-ops/frontend/components/StoragePanel.jsx b/builtin-extensions/serverkit-cloudflare-ops/frontend/components/StoragePanel.jsx
index 36fd6dfd..2be25617 100644
--- a/builtin-extensions/serverkit-cloudflare-ops/frontend/components/StoragePanel.jsx
+++ b/builtin-extensions/serverkit-cloudflare-ops/frontend/components/StoragePanel.jsx
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
function StorageSection({
title,
+ emptyHint,
items,
error,
placeholder,
@@ -58,7 +59,7 @@ function StorageSection({
</div>
{items.length === 0 ? (
- <p className="cf-storage__hint">{`No ${title.toLowerCase()} yet.`}</p>
+ <p className="cf-storage__hint">{emptyHint}</p>
) : (
<ul className="cf-storage__list">
{items.map((item) => {
@@ -227,6 +228,7 @@ export default function StoragePanel({ zoneId, isAdmin }) {
<div className="cf-storage">
<StorageSection
title={t('app.storagePanel.r2Buckets', 'R2 buckets')}
+ emptyHint={t('app.storagePanel.noR2BucketsYet', 'No R2 buckets yet.')}
items={data.r2 || []}
error={errors.r2}
placeholder="my-bucket"
@@ -240,6 +242,7 @@ export default function StoragePanel({ zoneId, isAdmin }) {
<StorageSection
title={t('app.storagePanel.kvNamespaces', 'KV namespaces')}
+ emptyHint={t('app.storagePanel.noKvNamespacesYet', 'No KV namespaces yet.')}
items={data.kv || []}
error={errors.kv}
placeholder="my-namespace"
@@ -252,6 +255,7 @@ export default function StoragePanel({ zoneId, isAdmin }) {
<StorageSection
title={t('app.storagePanel.d1Databases', 'D1 databases')}
+ emptyHint={t('app.storagePanel.noD1DatabasesYet', 'No D1 databases yet.')}
items={data.d1 || []}
error={errors.d1}
placeholder="my-database"
diff --git a/frontend/src/components/setup/SetupStepSummary.jsx b/frontend/src/components/setup/SetupStepSummary.jsx
index 33242b3b..e4556bb2 100644
--- a/frontend/src/components/setup/SetupStepSummary.jsx
+++ b/frontend/src/components/setup/SetupStepSummary.jsx
@@ -83,10 +83,14 @@ const SetupStepSummary = ({ accountInfo, useCases, twoFactorEnabled, onFinish })
// with per-item progress. Fail-soft: an install failure is surfaced
// but never blocks completing onboarding.
const postureExts = (postures[securityPosture] || []);
- const seen = new Set(recommendations.map((r) => r.slug));
+ // Posture extensions install regardless of the recommendation
+ // checkboxes — the posture choice is the authorization. Overlapping
+ // slugs are dropped from the recommendations half, not the posture
+ // half, so unchecking a recommendation can't veto the posture.
+ const postureSlugs = new Set(postureExts.map((r) => r.slug));
const queue = recommendations
- .filter((r) => checked.has(r.slug) && !r.installed)
- .concat(postureExts.filter((r) => !r.installed && !seen.has(r.slug)));
+ .filter((r) => checked.has(r.slug) && !r.installed && !postureSlugs.has(r.slug))
+ .concat(postureExts.filter((r) => !r.installed));
const installedSlugs = recommendations
.filter((r) => r.installed && checked.has(r.slug))
.map((r) => r.slug);
diff --git a/frontend/src/plugins/serverkit-cloudflare-ops/components/StoragePanel.jsx b/frontend/src/plugins/serverkit-cloudflare-ops/components/StoragePanel.jsx
index 36fd6dfd..2be25617 100644
--- a/frontend/src/plugins/serverkit-cloudflare-ops/components/StoragePanel.jsx
+++ b/frontend/src/plugins/serverkit-cloudflare-ops/components/StoragePanel.jsx
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
function StorageSection({
title,
+ emptyHint,
items,
error,
placeholder,
@@ -58,7 +59,7 @@ function StorageSection({
</div>
{items.length === 0 ? (
- <p className="cf-storage__hint">{`No ${title.toLowerCase()} yet.`}</p>
+ <p className="cf-storage__hint">{emptyHint}</p>
) : (
<ul className="cf-storage__list">
{items.map((item) => {
@@ -227,6 +228,7 @@ export default function StoragePanel({ zoneId, isAdmin }) {
<div className="cf-storage">
<StorageSection
title={t('app.storagePanel.r2Buckets', 'R2 buckets')}
+ emptyHint={t('app.storagePanel.noR2BucketsYet', 'No R2 buckets yet.')}
items={data.r2 || []}
error={errors.r2}
placeholder="my-bucket"
@@ -240,6 +242,7 @@ export default function StoragePanel({ zoneId, isAdmin }) {
<StorageSection
title={t('app.storagePanel.kvNamespaces', 'KV namespaces')}
+ emptyHint={t('app.storagePanel.noKvNamespacesYet', 'No KV namespaces yet.')}
items={data.kv || []}
error={errors.kv}
placeholder="my-namespace"
@@ -252,6 +255,7 @@ export default function StoragePanel({ zoneId, isAdmin }) {
<StorageSection
title={t('app.storagePanel.d1Databases', 'D1 databases')}
+ emptyHint={t('app.storagePanel.noD1DatabasesYet', 'No D1 databases yet.')}
items={data.d1 || []}
error={errors.d1}
placeholder="my-database"