Vitron-Front/app
fazli 0b18438a97 fix(notif+auth): camelCase badge fields, seller push prompt, only 401 signs out
- app/components/MyLayout.tsx / app/components/home/HomePageTopBar.tsx /
  app/routes/profile._index.tsx: the BadgeCounts type was declared with
  snake_case fields (order_updates, seller_orders) while the API's global
  camelCase renderer sends orderUpdates / sellerOrders on the wire — every
  read went to undefined, so the "buyer activity" dot on the profile icon
  and the order-badge on the store dashboard were silently stuck at 0.
  Fixed by renaming the interface to match the wire and adding sellerChat
  (per-store roll-up) so the store dashboard sidebar reads
  badges.sellerChat[storeId] instead of the buyer-side chat count.
- app/hooks/useBadgeCounts.ts: interface + EMPTY constant updated to
  camelCase + new sellerChat map.
- app/utils/api-error-handler.ts: 403 no longer force-redirects to /logout.
  It used to force-log-out on ANY 403/401, so an approved-but-unbadged
  owner (Ehsan / Noelabel) whose store dashboard fired the Instagram-tab
  query got a 403 → forced logout → the store page vanished mid-load
  and the seller landed on the home screen convinced they'd been kicked
  off their own store. Only 401 signs the session out now.
- app/components/store/StorePushPromptCard.tsx: new dashboard-level card
  that nudges the store owner/staff to enable browser push. Unlike the
  global buyer banner it's not dismissible-forever; "بعداً یادآوری کن"
  hides for 24h and it comes back until the user actually subscribes.
  Handles the permission="denied" path with an in-browser-settings hint.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-18 13:18:08 +00:00
..
assets first 2026-04-29 01:44:16 +03:30
components fix(notif+auth): camelCase badge fields, seller push prompt, only 401 signs out 2026-07-18 13:18:08 +00:00
data first 2026-04-29 01:44:16 +03:30
hooks fix(notif+auth): camelCase badge fields, seller push prompt, only 401 signs out 2026-07-18 13:18:08 +00:00
lib feat(seller): size chart editor + buyer size guide (راهنمای سایز) 2026-07-13 13:21:23 +03:30
requestHandler feat(chat): share the product into the chat + fix empty-thread preview 2026-07-13 15:09:01 +03:30
routes fix(notif+auth): camelCase badge fields, seller push prompt, only 401 signs out 2026-07-18 13:18:08 +00:00
styles first 2026-04-29 01:44:16 +03:30
types first 2026-04-29 01:44:16 +03:30
utils fix(notif+auth): camelCase badge fields, seller push prompt, only 401 signs out 2026-07-18 13:18:08 +00:00
auth.server.ts first 2026-04-29 01:44:16 +03:30
cookie.ts first 2026-04-29 01:44:16 +03:30
entry.client.tsx first 2026-04-29 01:44:16 +03:30
entry.server.tsx first 2026-04-29 01:44:16 +03:30
i18n.ts first 2026-04-29 01:44:16 +03:30
root.tsx fix(pwa): add apple-mobile-web-app-capable so iOS applies safe-area insets 2026-07-09 11:35:12 +03:30
sessions.server.ts Security fixes: session hardening, open redirect, SSR path injection 2026-06-14 19:02:11 +03:30
tailwind.css first 2026-04-29 01:44:16 +03:30