feat(FOUR-32025): LOGIN SCREEN >> Review performance: DB access and queries in login can be cached into redis, images#8923
feat(FOUR-32025): LOGIN SCREEN >> Review performance: DB access and queries in login can be cached into redis, images#8923rodriquelca wants to merge 3 commits into
Conversation
…ueries in login can be cached into redis, images
|
|
QA server K8S was successfully deployed https://ci-cc2673d695.engk8s.processmaker.net |
gproly
left a comment
There was a problem hiding this comment.
1. Password visibility toggle — JS out of sync with markup
Issue: newLogin.blade.php and passwords/reset.blade.php still toggle fa-eye-slash on the click target, but the markup now uses a <button class="password-toggle"> with two SVGs (password-toggle-eye / password-toggle-eye-slash).
Impact: Input type toggles correctly, but the icon does not update and aria-pressed stays false.
Fix: Update the inline toggle handlers to:
- Toggle visibility via the SVG
hiddenattribute (or a CSS class) - Set
aria-pressedto match visibility state - Remove all Font Awesome class toggling (
fa-eye-slash)
Files:
resources/views/auth/newLogin.blade.phpresources/views/auth/passwords/reset.blade.php
2. Language selector broken on /login after script bundle reduction
Issue: newLogin.blade.php now includes auth-language-scripts-minimal instead of auth-language-scripts. That drops app-login.js, which initializes dependencies required by package-translations' LanguageSelectorButton:
VueCookies(this.$cookiesinLanguageSelectorButton.vue)VueI18Next/ i18next ($t()inLanguageSelectorModal.vue)window.bootstrap.Modal(modal lifecycle inLanguageSelectorModal.vue)
Impact: Language selector fails on the login page when translations are enabled.
Fix (choose one):
- A (safer): Restore
@include('auth.partials.auth-language-scripts')onnewLogin.blade.php - B (perf-oriented): Extend the minimal bundle to explicitly load only the required deps above, preserving script order relative to
GlobalScripts(webhook.js) andtranslations/index.js
Files:
resources/views/auth/newLogin.blade.php- optionally
resources/views/auth/partials/auth-language-scripts-minimal.blade.php
3. Auth layout regression — Bootstrap utilities removed from non-login pages
Issue: Replacing mix('css/app.css') with login-base-styles in auth.layouts.auth affects all auth pages, not just login. login-base-styles only defines a minimal subset (e.g. .alert-danger, .mb-0, .mb-3) and omits classes used elsewhere:
| Page | Missing classes |
|---|---|
passwords/email.blade.php |
.alert-success, .mb-4 |
passwords/change.blade.php |
.alert-primary, .text-center, .pb-4, .mt-3, .h5, .text-danger, .d-block, .ml-1, .small |
Impact: Forgot password, change password, and related auth screens render with broken or unstyled UI.
Fix (choose one):
- A (scoped): Apply
login-base-stylesonly innewLogin.blade.php; keepmix('css/app.css')inauth.layouts.auth - B (complete): Extend
login-base-styles.blade.phpwith all required utility and alert variants used by auth views
Files:
resources/views/auth/layouts/auth.blade.phpresources/views/auth/partials/login-base-styles.blade.php
4. Hardcoded logo dimensions applied to custom logos
Issue: components/logo.blade.php always sets width="440" height="80" fetchpriority="high", including custom logos uploaded via css-override.
Impact: Custom logos with non-default aspect ratios may distort or cause unexpected layout/CLS behavior despite CSS height: auto.
Fix: Apply fixed dimensions and fetchpriority="high" only for the default logo:
<img
src="{{ $loginLogo }}"
alt="{{ config('logo-alt-text', 'ProcessMaker') }}"
class="{{ $class }}"
@if($isDefault) width="440" height="80" fetchpriority="high" @endif
>Files:
resources/views/components/logo.blade.php
5. Cache busting key may not invalidate on media-only updates
Issue: Setting::getLogin(), getIcon(), and getFavicon() append ?v={$setting->updated_at->timestamp} when a custom asset exists. Uploading/replacing media via Spatie Media Library may not update the parent Setting record's updated_at.
Impact: Browsers may serve stale logo/favicon/icon after an admin upload until the Setting row is touched separately.
Fix: Derive the cache key from the media record instead of the Setting:
return $url . '?v=' . ($media->updated_at?->timestamp ?? $media->id);Alternatively, explicitly touch the Setting model on media upload in CssOverrideController::uploadFile().
Files:
ProcessMaker/Models/Setting.php- optionally
ProcessMaker/Http/Controllers/Api/CssOverrideController.php





Issue & Reproduction Steps
Describe the issue this ticket solves and describe how to reproduce the issue (please attach any fixtures used to reproduce the issue).
Solution
Guest-safe ProcessMaker bootstrap on login (EventBus no-op stub + packages list) so package scripts do not throw $emit errors.
performance.mov
How to Test
Related Tickets & Packages
Code Review Checklist
ci:deploy