Commit Graph

22 Commits

Author SHA1 Message Date
parsa aghaei
c57f775cb4 fix(otp): support WebOTP sms pattern with {0} and {1} and robust code extraction
Some checks failed
Deploy Canina / deploy (push) Successful in 3m53s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 0s
2026-09-05 19:36:49 +03:30
parsa aghaei
1fd9a92dd0 fix: restore WebOTP with root-cause fix for code not filling into OTP inputs
Some checks failed
Deploy Canina / deploy (push) Successful in 2m23s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 0s
The original bug was that the WebOTP effect had [subView, triggerVerifyOtp]
as its dependency array. triggerVerifyOtp is a useCallback that depends on
[fetchProfile, onClose] - both of which can change reference during normal
re-renders. Each reference change caused React to re-run the effect, which
called AbortController.abort() on the still-pending OTP Promise. The user
would see the 'Allow' modal, click Allow, but the Promise was already aborted
so nothing happened.

Fix: use triggerVerifyOtpRef (a stable ref) so the WebOTP effect only depends
on [subView] / [step]. The ref is kept up-to-date via a dedicated sync effect.

Additional improvements:
- 400ms delay before auto-verify so user can see the filled boxes
- toEnglishDigits on otp.code to handle Persian numerals in the response
- Same fix applied to LoginModal (handleVerifyOtpWithCode -> verifyOtpRef)
2026-09-05 18:41:05 +03:30
parsa aghaei
86e8101d8c fix: mobile UX improvements - scroll restoration, OTP autofill, swipe direction, back button
Some checks failed
Deploy Canina / deploy (push) Successful in 2m27s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 0s
- ClientLayout: implement proper manual scroll restoration using module-level
  _wasPopNavigation flag and sessionStorage. Fixes scroll jumping to top/bottom
  on Back navigation. Scroll position saved on scroll (debounced) and cleanup,
  restored via double-rAF on popstate navigation.

- AuthModal/LoginModal: fix Android back button to push only ONE history sentinel
  on modal open (not on every subView/step change). Prevents stacking of extra
  history entries. Back in sub-views re-pushes sentinel for next back press.

- AuthModal/LoginModal: remove navigator.credentials.get (WebOTP API) which was
  showing an intrusive permission modal. The native autoComplete=one-time-code
  on the first OTP input provides the suggestion bar above the keyboard instead.

- AuthModal/LoginModal: add isVerifyingRef guard to prevent double toast on
  successful login. Both onComplete callback and form submit were calling
  triggerVerifyOtp/handleVerifyOtpWithCode simultaneously.

- AuthModal: remove triggerVerifyOtp from handleOtpChange to eliminate the second
  duplicate call (only onComplete now triggers verification).

- OtpInput5: remove maxLength=1 restriction from first input so browser can
  inject the full 5-digit OTP code. Multi-char input is already handled by
  handleDigitChange which distributes digits across all boxes.

- ProductPage: fix swipe gesture direction in media gallery. Swipe right -> next
  item, swipe left -> previous item (matches RTL intuition for Persian users).
2026-09-05 18:19:11 +03:30
parsa aghaei
1d2d141514 fix(mobile): improve scroll restoration, media gesture swipe, 5-digit otp, persistent cooldown and modal android back navigation
Some checks failed
Deploy Canina / deploy (push) Successful in 2m6s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 0s
2026-09-05 17:53:29 +03:30
parsa aghaei
63e10449ad fix(auth): unify typography to Vazir and set password login as default
Some checks failed
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s
Deploy Canina / deploy (push) Has been cancelled
2026-08-26 14:23:07 +03:30
parsa aghaei
9294e89712 feat(auth): redesign AuthModal with structured tabs, clean login/signup separation, clear OTP/password switch and polished UX
Some checks failed
Deploy Canina / deploy (push) Successful in 1m32s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s
2026-08-26 13:51:16 +03:30
parsa aghaei
753b3dd7ec merge: resolve merge conflicts in ArchivePage.tsx and graphify-out from develop 2026-08-26 10:17:09 +03:30
cf9ae234b9 feat: add charity reporting & financial breakdowns in admin, fix mobile scroll restoration and OTP numeric keyboard
All checks were successful
Deploy Canina / deploy (push) Successful in 1m44s
2026-08-26 00:12:33 +03:30
parsa aghaei
e6018f3a37 test(e2e): complete and verify 11 E2E test suites with strict mutation testing and CI integration 2026-08-25 17:10:53 +03:30
parsa aghaei
b527befe4a fix: resolve wallet topup callback and verify flow, fix admin orders BigInt serialization 500 error, and fix reactive B2B settings toggle
All checks were successful
Deploy Canina / deploy (push) Successful in 1m41s
2026-08-16 18:20:46 +03:30
parsa aghaei
42707c04cf feat: complete tickets & vet consultation, fix wallet balance overflow, b2b toggle, and transaction manual verification
All checks were successful
Deploy Canina / deploy (push) Successful in 1m51s
2026-08-16 18:01:43 +03:30
parsa aghaei
2e217ebe3d fix(auth): improve OTP autofill DOM binding, event listeners, and WebOTP compatibility
All checks were successful
Deploy Canina / deploy (push) Successful in 1m31s
2026-08-16 16:58:51 +03:30
parsa aghaei
cbd7e1a24d feat(auth): implement WebOTP SMS auto-fill, auto-submit, password setup in dashboard, and password visibility toggle 2026-08-16 16:37:59 +03:30
9f11d8fb2d chore(workspace): eradicate all tsc errors and eslint warnings across frontend, admin, and backend
Some checks failed
Deploy Canina / deploy (push) Failing after 29s
2026-08-07 07:39:26 +03:30
parsa aghaei
9122035784 feat(wholesale): add wholesale buyer authentication & license document upload form [TASK-103] 2026-07-26 14:35:27 +03:30
parsa aghaei
20a1b225c8 feat: Mobile header redesign, shop breadcrumbs fix, checkout address/wallet/contrast improvements and forgot password flow 2026-07-25 11:39:01 +03:30
parsa aghaei
7615aa0e51 fix: resolve seed encoding, search param, and wiki data source issues
- Fix seed-products.ts TS error (implicit any) and BOM handling
- Re-run full seed to restore correct Persian encoding in DB
- Fix productService query→search param mismatch
- Fix IngredientWiki hardcoded port 4000→use settingsStore
- Restore seed-products-data.json from git after accidental corruption
2026-07-11 15:40:49 +03:30
parsa aghaei
3dedc89ee1 تغییرات کلی در backend و frontend 2026-07-11 12:30:17 +03:30
f69537a688 feat: rename brand from canina to canino across codebase 2026-07-10 16:32:31 +03:30
6027e635db feat: implement backend auth and fix pet profile payload 2026-06-12 22:37:35 +03:30
c4966136d7 fix: update import paths for lib folders in components 2026-06-12 01:32:10 +03:30
72d2a5600a feat: layout and overlays migrated to Next.js 2026-06-12 01:04:03 +03:30