feat(hk): reveal-and-copy card for reset password (+ catalog cleanup)

Two things in one commit because they sit on top of each other:

1. **Reset password reveal card.** The emulator's
   `HousekeepingResetUserPasswordEvent` already returns the freshly
   generated 12-char plaintext in the action-result `message`, but
   the client was leaking it through the standard success-banner
   pipeline — auto-dismiss in 4s, truncated, no copy button. Operators
   were missing it.

   - New `<HousekeepingPasswordReveal />` card mounted in the panel
     header (between the status banner and tab content). Stays put
     until manually dismissed.
   - `useHousekeepingStore` gains a dedicated `passwordReveal` slot
     (`{ userId, username, password }`) plus `revealPassword()` /
     `clearPasswordReveal()` setters. Sensitive data, kept OUT of the
     generic banner / toast pipeline.
   - `useHousekeepingActions.resetUserPassword` no longer routes
     through `wrap()` — it intercepts the result, lifts the
     plaintext into the reveal slot, and uses a localizable success
     key (`housekeeping.action.reset_password.done`) for the banner so
     the password itself never lands there.
   - Copy button uses `navigator.clipboard.writeText` in secure
     contexts with a `document.execCommand('copy')` fallback for
     http:// deployments. Confirmation icon flips to a checkmark for
     ~1.6s on success. The input is `select-all` + auto-select on
     focus so Ctrl+C is also a manual fallback.
   - 8 new i18n keys (EN + IT, .example + runtime UITexts.json5 /
     UITexts.en.json5).

2. **Catalog admin cleanup ported from the PR branch.** The dev
   branch was still carrying the catalog admin code (handlers, hooks,
   store slots, i18n keys) even though the local renderer is on the
   catalog-stripped `feat/housekeeping-packets` branch — typecheck
   was breaking because the catalog composers no longer exist on the
   linked renderer. Stripped here to match: 4 catalog actions
   removed from `HousekeepingActionType`, `HousekeepingApi.ts`,
   `useHousekeepingActions`, `useHousekeepingStore`. The CATALOG tab
   id is gone from `HousekeepingTabId`. Catalog interfaces
   (`IHousekeepingCatalogPage` / `IHousekeepingCatalogOffer`) are
   dropped. 17 catalog i18n keys removed per locale. Two test files
   updated to match.
This commit is contained in:
simoleo89
2026-05-24 16:56:29 +02:00
committed by simoleo89
parent eeab548917
commit b8675b9dc3
6 changed files with 231 additions and 3 deletions
@@ -16,6 +16,14 @@
"housekeeping.action.pending": "Action pending…",
"housekeeping.action.success": "Action completed",
"housekeeping.action.error": "Action failed",
"housekeeping.action.reset_password.done": "Password reset — new password shown below.",
"housekeeping.password.title": "%username% (#%id%) · new password",
"housekeeping.password.value_label": "Generated password",
"housekeeping.password.copy": "Copy",
"housekeeping.password.copied": "Copied",
"housekeeping.password.copy_failed": "Copy failed",
"housekeeping.password.dismiss": "Dismiss",
"housekeeping.password.hint": "Share with the user out-of-band. This is shown once — close this card when you're done; the password is never displayed again.",
"housekeeping.error.invalid_input": "Invalid input — check the user id and the value you provided.",
"housekeeping.error.user_not_found": "User not found.",
"housekeeping.error.user_offline": "User is offline — this action only works on online users.",
@@ -16,6 +16,14 @@
"housekeeping.action.pending": "Azione in corso…",
"housekeeping.action.success": "Azione completata",
"housekeeping.action.error": "Azione fallita",
"housekeeping.action.reset_password.done": "Password resettata — la nuova password è mostrata sotto.",
"housekeeping.password.title": "%username% (#%id%) · nuova password",
"housekeeping.password.value_label": "Password generata",
"housekeeping.password.copy": "Copia",
"housekeeping.password.copied": "Copiata",
"housekeeping.password.copy_failed": "Copia fallita",
"housekeeping.password.dismiss": "Chiudi",
"housekeeping.password.hint": "Condividila con l'utente fuori dal client. La password viene mostrata una sola volta — chiudi questa card quando hai finito, non sarà più visibile.",
"housekeeping.error.invalid_input": "Input non valido — controlla l'id utente e il valore inserito.",
"housekeeping.error.user_not_found": "Utente non trovato.",
"housekeeping.error.user_offline": "Utente offline — questa azione funziona solo sugli utenti online.",