Summary
- Toast migration: Replaced the custom
showToast()JS function and client-side flash cookie reader with server-side rendering viahtmx-ext-remove-mefor auto-dismiss, HTMXresponseHandlingconfig for error-status OOB swaps, and a flash cookie middleware for full-page-load toasts. - Avatar update fix: Replaced
HX-Refresh: trueon avatar upload with OOB swaps for both the profile display and navbar avatar. This eliminates the visible flicker from full page reloads and ensures the "Profile updated successfully" toast always appears (previously lost during refresh). - Navbar avatar partial: Extracted the navbar avatar into a reusable partial (
navbar_avatar.html) with an OOB variant (navbar_avatar_oob.html) for HTMX responses.
Test plan
- All 362 non-browser unit/integration tests pass
- All 7 Playwright browser tests pass, including:
test_htmx_success_toast_appears— name-only profile update shows toasttest_avatar_update_toast_appears— avatar update shows toasttest_avatar_update_no_full_reload— avatar update uses OOB swaps, no page reloadtest_htmx_error_toast_appears— error responses show toast via OOBtest_flash_cookie_toast_appears— flash cookies render server-side on loadtest_toast_auto_dismisses— toasts auto-dismiss after 5s via remove-metest_toast_close_button— manual close button works
🤖 Generated with Claude Code