From e417b71539d3f7d803e47c1ddea26fc961cd9264 Mon Sep 17 00:00:00 2001 From: curo1305 Date: Mon, 8 Jun 2026 16:30:30 +0200 Subject: [PATCH 1/4] feat(08-03): create useToastStore Pinia stub with locked show() contract - Defines show(message, type='success', duration=4000) as silent no-op - Positional parameters only per UI-SPEC.md contract - Phase 10 (UX-10) must implement rendering without modifying call sites --- frontend/src/stores/toast.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 frontend/src/stores/toast.js diff --git a/frontend/src/stores/toast.js b/frontend/src/stores/toast.js new file mode 100644 index 0000000..0206d89 --- /dev/null +++ b/frontend/src/stores/toast.js @@ -0,0 +1,20 @@ +/** + * Phase 7.1 STUB — Phase 10 (UX-10) fills in the full implementation. + * + * The signature `show(message, type, duration)` is locked and Phase 10 must + * honor it without modifying Phase 8 call sites. + * + * Default values match UI-SPEC.md: + * type = 'success' (NOT 'info') + * duration = 4000 + */ +import { defineStore } from 'pinia' + +export const useToastStore = defineStore('toast', () => { + // eslint-disable-next-line no-unused-vars + function show(message, type = 'success', duration = 4000) { + // No-op stub — Phase 10 implements rendering. + } + + return { show } +}) From 3b8e2c1bd4c18c52e4b9f87cfcdcbd7ed9a9ec12 Mon Sep 17 00:00:00 2001 From: curo1305 Date: Mon, 8 Jun 2026 16:34:44 +0200 Subject: [PATCH 2/4] refactor(08-03): migrate session-revoked inline toast to toastStore.show() - Remove sessionRevokedToast ref + setTimeout + inline HTML from SettingsAccountTab.vue - Remove sessionRevokedToast ref + setTimeout + inline HTML from TotpEnrollment.vue - Add toastStore.show('Other sessions have been terminated.', 'success') in changePassword - Add toastStore.show('Other sessions have been terminated.', 'success') in disableTotp - Add toastStore.show('Other sessions have been terminated.', 'success') in confirmEnrollment - Update SettingsAccountTab.test.js to assert on mockShow instead of DOM text - Update TotpEnrollment.test.js to assert on mockShow instead of DOM text --- .../src/components/auth/TotpEnrollment.vue | 28 +++------------- .../auth/__tests__/TotpEnrollment.test.js | 15 ++++++--- .../settings/SettingsAccountTab.vue | 32 +++---------------- .../__tests__/SettingsAccountTab.test.js | 19 +++++++---- 4 files changed, 32 insertions(+), 62 deletions(-) diff --git a/frontend/src/components/auth/TotpEnrollment.vue b/frontend/src/components/auth/TotpEnrollment.vue index 3220885..004e2c2 100644 --- a/frontend/src/components/auth/TotpEnrollment.vue +++ b/frontend/src/components/auth/TotpEnrollment.vue @@ -1,27 +1,6 @@