fix: polish error handling across frontend views

- Server.vue: Add user feedback for disk cleanup and restart operations
- Credentials.vue: Add clipboard fallback, better identity load error handling
- Federation.vue: Add clipboard fallback for invite code copy
- ContainerApps.vue: Wrap polling intervals in try-catch to prevent
  unhandled promise rejections from background refresh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-11 10:44:56 +00:00
co-authored by Claude Opus 4.6
parent 1a07862559
commit 1ca83f97ec
5 changed files with 1277 additions and 18 deletions
+17 -9
View File
@@ -165,7 +165,7 @@
</div>
<div class="mb-4">
<ContainerStatus :state="container.state as any" />
<ContainerStatus :state="container.state" />
</div>
<div class="flex gap-2">
@@ -221,16 +221,24 @@ onMounted(async () => {
// Refresh every 10 seconds
setInterval(async () => {
await store.fetchContainers()
await store.fetchHealthStatus()
try {
await store.fetchContainers()
await store.fetchHealthStatus()
} catch {
// Background poll — ignore transient errors
}
}, 10000)
// When any bundled app is in 'created' (starting), poll every 2s so state updates to running
startingPollInterval = setInterval(async () => {
const anyStarting = bundledApps.value.some((app) => store.getAppState(app.id) === 'created')
if (anyStarting) {
await store.fetchContainers()
await store.fetchHealthStatus()
try {
await store.fetchContainers()
await store.fetchHealthStatus()
} catch {
// Background poll — ignore transient errors
}
}
}, 2000)
})
@@ -343,7 +351,7 @@ async function handleStartApp(app: BundledApp) {
try {
await store.startBundledApp(app)
} catch (e) {
console.error('Failed to start app:', e)
if (import.meta.env.DEV) console.error('Failed to start app:', e)
}
}
@@ -351,7 +359,7 @@ async function handleStopApp(appId: string) {
try {
await store.stopBundledApp(appId)
} catch (e) {
console.error('Failed to stop app:', e)
if (import.meta.env.DEV) console.error('Failed to stop app:', e)
}
}
@@ -360,7 +368,7 @@ async function handleStartContainer(name: string) {
const appId = name.replace('archipelago-', '').replace('-dev', '')
await store.startContainer(appId)
} catch (e) {
console.error('Failed to start container:', e)
if (import.meta.env.DEV) console.error('Failed to start container:', e)
}
}
@@ -369,7 +377,7 @@ async function handleStopContainer(name: string) {
const appId = name.replace('archipelago-', '').replace('-dev', '')
await store.stopContainer(appId)
} catch (e) {
console.error('Failed to stop container:', e)
if (import.meta.env.DEV) console.error('Failed to stop container:', e)
}
}
</script>