Bug: Admin user management password reset hangs
Bug: Admin user management password reset hangs
Problem
On
/admin/users, clicking "Reset PW" disables the button (pending state) but the password banner never appears. The form action hangs indefinitely. No errors in browser console or server-side logs. Page load (listing users with roles) works correctly — the Keycloak Admin API is reachable from the pod.Root Cause
Suspected: the
use:enhance handler handleResetPassword() in +page.svelte (lines 81-91) is not receiving the form action result. The actionPending state never resets because the callback never fires. Possible causes:- SvelteKit
use:enhancemay not handle thenewPasswordfield in the action result properly with Svelte 5's$props()pattern - The server-side form action at
+page.server.js(lines 33-60) may be timing out on the Keycloak Admin API fetch without propagating the error - The
actionPendingstate blocks the UI permanently because it's set inonclickbut only cleared in the enhance callback
Fix
Debug the form action flow in
src/routes/admin/users/+page.svelte and +page.server.js. Likely need:- Add console.error logging in the server action's catch block
- Add a timeout or error fallback in the enhance callback to re-enable buttons
- Test if the form action returns data correctly by submitting without
use:enhance
Impact
Admin cannot reset user passwords via the UI. Workaround: use Keycloak admin console at
https://keycloak.tail5b443a.ts.net or reset via CLI/API (verified working — 204 response). User listing and search work fine. Role changes untested (may have same issue).Acceptance Criteria
- Clicking "Reset PW" on a user shows the new password in a green banner within 5 seconds
- The password banner has a working "Copy" button and "Dismiss" button
- The user row highlights green after reset
- The reset user can log in with the new password
Related
westside-basketball— projectplan-2026-03-08-tryout-prep→ Phase 5e-2forgejo_admin/westside-appPR #11 — code that introduced this page