From 302288e62f850b39a7ad58b99cb4d792f7d1cd90 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 23:54:44 +0000 Subject: [PATCH] fix(v2): use correct route name when navigating after delete Deleting a platform or collection in the v2 UI showed "Failed to delete: unknown error" even though the deletion succeeded. The success handler navigated to a non-existent route name ("platforms" / "collections"), and Vue Router threw on the unknown name, which the catch block surfaced as a generic error. Navigate to the real index routes (PLATFORMS_INDEX / COLLECTIONS_INDEX) instead. Fixes #3598 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Cv77VUJgPe1H7ipSRitjpH --- frontend/src/v2/views/Gallery/Collection.vue | 3 ++- frontend/src/v2/views/Gallery/Platform.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/v2/views/Gallery/Collection.vue b/frontend/src/v2/views/Gallery/Collection.vue index b6258a2cf..748b15406 100644 --- a/frontend/src/v2/views/Gallery/Collection.vue +++ b/frontend/src/v2/views/Gallery/Collection.vue @@ -18,6 +18,7 @@ import { RDivider, type RTabNavItem } from "@v2/lib"; import { computed, nextTick, onMounted, ref, watch } from "vue"; import { useI18n } from "vue-i18n"; import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router"; +import { ROUTES } from "@/plugins/router"; import collectionApi from "@/services/api/collection"; import storeAuth from "@/stores/auth"; import storeCollections, { @@ -267,7 +268,7 @@ async function onDelete() { snackbar.success(`Collection "${c.name}" deleted`, { icon: "mdi-check-bold", }); - router.push({ name: "collections" }); + router.push({ name: ROUTES.COLLECTIONS_INDEX }); } catch (err) { const e = err as { response?: { data?: { msg?: string; detail?: string } }; diff --git a/frontend/src/v2/views/Gallery/Platform.vue b/frontend/src/v2/views/Gallery/Platform.vue index f43cbb66f..16a7310b5 100644 --- a/frontend/src/v2/views/Gallery/Platform.vue +++ b/frontend/src/v2/views/Gallery/Platform.vue @@ -372,7 +372,7 @@ async function onDelete() { snackbar.success(`Platform "${p.display_name}" deleted`, { icon: "mdi-check-bold", }); - router.push({ name: "platforms" }); + router.push({ name: ROUTES.PLATFORMS_INDEX }); } catch (err) { const e = err as { response?: { data?: { msg?: string } };