diff --git a/web/edit.html b/web/edit.html
index 1ab4eab..c1910f2 100644
--- a/web/edit.html
+++ b/web/edit.html
@@ -456,15 +456,27 @@
const app = result.data;
+ console.log("App data:", app); // Debug
+
// Llenar formulario con datos actuales
- document.getElementById("app_name").value = app.name;
+ document.getElementById("app_name").value = app.name || "";
document.getElementById("app_name").readOnly = true; // No cambiar nombre
- document.getElementById("script_path").value =
- app.entry_point;
+
+ // Construir script_path completo
+ const scriptPath =
+ app.path && app.entry_point
+ ? `${app.path}/${app.entry_point}`.replace(
+ "//",
+ "/",
+ )
+ : app.entry_point || "";
+
+ document.getElementById("script_path").value = scriptPath;
document.getElementById("working_directory").value =
- app.path;
- document.getElementById("user").value =
- app.user || "pablinux";
+ app.path || "";
+
+ // El user no está en el JSON, usar valor por defecto
+ document.getElementById("user").value = "pablinux";
document.getElementById("restart_policy").value = "always";
document.getElementById("app_type").value = "nodejs";
document.getElementById("description").value = "";