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.

Allow committed screenshots and fix ServiceDetail effect

Juan Denisf7e51cc5703a
diff --git a/.gitignore b/.gitignore
index f08971e7..be0f2855 100644
--- a/.gitignore
+++ b/.gitignore
@@ -112,6 +112,10 @@ SECURITY_AND_CODE_AUDIT.md
*.png
*.jpeg
*.jpg
+# …except the README screenshots, generated from mock data by the local
+# `screenshots` skill — these are real committed assets.
+!/docs/screenshots/
+!/docs/screenshots/*.png
# MSI / build artifacts that should not be committed.
/agent/packaging/msi/output/
@@ -136,3 +140,4 @@ docs/PLAN_AGENT_FLEET.md
/.playwright-mcp
docs/UI_CONSISTENCY_AUDIT.md
docs/REMOTE_ACCESS_ROADMAP.md
+/docs/screenshots
diff --git a/frontend/src/pages/ServiceDetail.jsx b/frontend/src/pages/ServiceDetail.jsx
index 86415474..166e65f7 100644
--- a/frontend/src/pages/ServiceDetail.jsx
+++ b/frontend/src/pages/ServiceDetail.jsx
@@ -70,6 +70,10 @@ const ServiceDetail = () => {
// Load upload versions
useEffect(() => {
+ // Derive locally — the `isUpload` const below is declared after the
+ // early-return guard, so referencing it here would hit its temporal
+ // dead zone and crash the page on every render.
+ const isUpload = service?.source === 'upload';
if (!isUpload || !id) return;
setVersionsLoading(true);
api.getAppVersions(id)
@@ -79,7 +83,7 @@ const ServiceDetail = () => {
})
.catch(() => toast.error('Failed to load versions'))
.finally(() => setVersionsLoading(false));
- }, [isUpload, id, toast]);
+ }, [service?.source, id, toast]);
// Close menus on outside click
useEffect(() => {