feat: 0.11.7 — Stale data cleanup + FileBrowser sync after migration + deploy title fix

- Detect stale data on non-active storage paths after migration; show on
  deploy/settings page with size info and two-step delete confirmation
- Add POST /api/storage/stale-cleanup handler with safety checks (active
  path protection, registered-path validation, ProtectedHDDPaths guard)
- Export ProtectedHDDPaths() from stacks package for reuse in web handlers
- Sync FileBrowser mounts after successful app data migration
- Deploy page title/h2 now shows "Beállítások" for already-deployed apps
  instead of always showing "Telepítés"
- Also add delete-old-data button on migration-done card in migrate.html

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 12:45:08 +01:00
parent 264855fb0d
commit fba2eb3631
7 changed files with 376 additions and 8 deletions
+4 -4
View File
@@ -33,8 +33,8 @@ type HDDPath struct {
Exists bool `json:"exists"`
}
// protectedHDDPaths returns the set of top-level HDD directories that must never be deleted.
func protectedHDDPaths(hddPath string) map[string]bool {
// ProtectedHDDPaths returns the set of top-level HDD directories that must never be deleted.
func ProtectedHDDPaths(hddPath string) map[string]bool {
if hddPath == "" {
return nil
}
@@ -100,7 +100,7 @@ func (m *Manager) DeleteStack(name string, removeHDDData bool) (*DeleteResponse,
}
// Step 4: Handle HDD data
protected := protectedHDDPaths(hddPath)
protected := ProtectedHDDPaths(hddPath)
for _, mount := range hddMounts {
// Safety: never delete protected top-level dirs
cleanPath := filepath.Clean(mount)
@@ -165,7 +165,7 @@ func (m *Manager) GetStackHDDData(name string) (*HDDDataResponse, error) {
}
mounts := ParseComposeHDDMounts(stack.ComposePath, hddPath)
protected := protectedHDDPaths(hddPath)
protected := ProtectedHDDPaths(hddPath)
for _, mount := range mounts {
cleanPath := filepath.Clean(mount)