Commit Graph

1741 Commits

Author SHA1 Message Date
Fringg
86d997d01d feat: custom broadcast buttons UI and fix stale mediaType bug
- Add inline custom button editor (no popups): label, type
  (callback/URL), action value with byte-level validation
- Frontend validates callback_data in UTF-8 bytes via TextEncoder
- URLs restricted to https:// and tg:// matching backend
- Form wrapped in <form> for Enter key submit support
- Fix pre-existing stale mediaType bug in file upload handler
- Translations added for ru, en, zh, fa locales
2026-03-22 01:54:38 +03:00
Fringg
3c034d2e70 fix: referral system — stop cabinet redirect to Telegram, fix deep link code handling
- Remove redirect to Telegram bot when email auth disabled + referral code present
  (cabinet links should stay on cabinet, bot links should go to bot)
- Remove referral_code from deep link auth (existing users can't get referrals)
- Don't consume referralCode in deep link path — leave it in localStorage for
  OIDC/widget auth methods that actually send it to the backend
- Consume campaign slug once into ref to survive retries (codesConsumedRef pattern)
- Update loginWithDeepLink to only accept (token, campaignSlug) — no referralCode
- Update pollDeepLinkToken API to match backend schema change
2026-03-22 01:54:38 +03:00
Egor
d2c2329d8b Merge pull request #335 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.39.1
2026-03-21 03:18:39 +03:00
github-actions[bot]
c0415082e2 chore(main): release 1.39.1 2026-03-21 00:18:12 +00:00
Egor
45bcc35b2d Merge pull request #334 from BEDOLAGA-DEV/dev
Dev
2026-03-21 03:17:47 +03:00
Egor
a87085e2b2 Merge pull request #333 from BEDOLAGA-DEV/main
w
2026-03-21 03:12:45 +03:00
Fringg
c34375e579 fix: infinite reload loop on login when Telegram widget unavailable
When the Telegram OIDC widget fails to load (ad blockers, DNS, CSP),
the deep link polling fallback caused an infinite page reload:

1. pollDeepLinkToken received 202 (pending) which axios treated as success
2. loginWithDeepLink stored undefined tokens with isAuthenticated=true
3. checkAdminStatus() fired with invalid token → 401
4. Response interceptor called safeRedirectToLogin() → page reload → loop

Fixes:
- pollDeepLinkToken: validateStatus rejects non-200 (202 now caught in poll loop)
- AUTH_ENDPOINTS: add /cabinet/auth/deeplink/ and /cabinet/auth/login/auto
- safeRedirectToLogin: guard against redirect when already on /login
- loginWithDeepLink: validate response tokens before storing
- setTokens: validate tokens in store method (protects AutoLogin, VerifyEmail, etc.)
2026-03-20 22:28:50 +03:00
Egor
9eebb76f8a Merge pull request #330 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.39.0
2026-03-20 07:24:01 +03:00
github-actions[bot]
e561b6ea40 chore(main): release 1.39.0 2026-03-20 04:21:56 +00:00
Egor
795a8983c5 Merge pull request #329 from BEDOLAGA-DEV/dev
Dev
2026-03-20 07:21:21 +03:00
Egor
accde7b720 Merge pull request #328 from BEDOLAGA-DEV/main
w
2026-03-20 07:19:36 +03:00
Fringg
d34f5e8559 fix: hide trial banner when subscription expired banner is active 2026-03-20 07:18:11 +03:00
Fringg
94c8e73787 fix: bottom nav overlap and safe area handling in referral network
- Raise portal z-index to z-50 so it covers MobileBottomNav
- Use TG SDK bottom safe area (JS) via CSS variable instead of unreliable env()
- Fix TicketNotificationBell regression: conditional inline style for fullscreen only
- Add bottom safe area padding to detail panel scroll areas
2026-03-20 05:02:47 +03:00
Fringg
33486a09d0 fix: adapt referral network for Telegram MiniApp safe areas
- Extract useHeaderHeight() hook — single source of truth for header
  height across AppShell, ReferralNetwork, and TicketNotificationBell
- Portal top offset now computed dynamically from TG safe area insets
  instead of hardcoded top-16 (fixes overlap with TG header bar)
- Two-row mobile layout: title + selector on separate rows so dropdown
  gets full width on small screens
- Add MOBILE_HEADER_HEIGHT_PX and DESKTOP_HEADER_HEIGHT_PX to constants
- Fix TicketNotificationBell using hardcoded 45px for all platforms
2026-03-20 04:23:45 +03:00
Fringg
2780898d1c fix: scope selector UX, ARIA, and code quality improvements
- removeScope preserves graph state when items remain (only resets on empty)
- Extract shared CheckIcon, CloseIcon, Spinner, ScopeListItem components
- Unify three handleSelect* into single handleToggle
- Fix shared mutable Set in reset state (factory function)
- Add MAX_SCOPE_ITEMS UI feedback (disabled button, warning banner)
- Correct ARIA: dialog > tablist + listbox > option structure
- Event listeners only attached when dropdown is open
- isSelected uses Set lookup via useMemo instead of O(n) scan
- Clear user search only on add, not on deselect
2026-03-20 02:44:29 +03:00
Fringg
db76cd0c64 feat: multi-select scope for referral network graph
Replace single-select scope with multi-select supporting multiple
campaigns, partners, and users simultaneously. Chips UI with remove
buttons, clear-all, sorted query keys for cache stability.
2026-03-20 02:31:11 +03:00
Fringg
a6faf702ec feat: redesign referral network with scope selector
- Replace full graph with scoped view (campaign/partner/user)
- ScopeSelector component with tabs and searchable dropdown
- Store resets all state on scope change (selection, hover, filters)
- Remove dead NetworkSearch component and graphInstance globals
- i18n keys for scope selector in all 4 locales
2026-03-20 01:50:09 +03:00
Fringg
2adb0047dd feat: add partner → campaign edges with distinct color to referral network 2026-03-20 01:17:01 +03:00
c0mrade
2b43a30ccc fix: referral network rendering — portal fix and visual tuning
Portal to document.body escapes main's contain:content which broke
fixed positioning (container had height:0 and was clipped to main).

Visual fixes for 662+ node graphs:
- labels only on large nodes (threshold 6→14, density 0.5→0.12)
- leaf nodes 5px, referrers 10px, campaigns 16px
- edge opacity reduced to prevent white starburst
- default edge color opacity lowered
2026-03-19 11:12:05 +03:00
c0mrade
b787726d1b fix: referral network graph rendering and layout
- fix top offset breakpoint: sm:top-14 → lg:top-14 to match AppShell
  header visibility (mobile header is lg:hidden with h-16)
- add gravity to FA2 layout to prevent disconnected nodes from flying
  to extreme positions, making auto-rescale shrink everything to dots
- clamp outlier node positions after FA2 finishes (3σ threshold)
- add ResizeObserver to sync sigma canvas with container size changes
- call sigma.resize() before camera reset after FA2
- increase node sizes: user min 8→12, max 40→50, campaign 18→24
- reduce FA2 duration 5s→3s and slowDown 5→2 for tighter layout
2026-03-19 10:24:47 +03:00
Fringg
7c0b8e571a fix: graph layout, node visibility and FA2 settings
- Switch to CSS Grid layout for reliable content area height
- Use inferSettings() for ForceAtlas2 auto-tuning based on graph structure
- Enable linLogMode and adjustSizes for better node clustering
- Fit camera after layout settles with animatedReset
- Increase node sizes for better visibility (MIN 8, MAX 40)
- Center controls at bottom, fix overlay positions
2026-03-19 09:18:11 +03:00
Fringg
fd9a47ecda fix: position page below AppShell header, wait for container size
- Page uses top-16/sm:top-14 to start below AppShell header (z-50)
  instead of inset-0 which renders behind the header
- Sigma init polls with RAF until container has real dimensions
  instead of allowInvalidContainer which creates broken canvas
- Removed overflow-hidden from content area (not needed)
2026-03-19 09:04:55 +03:00
Fringg
6f58a0ce5d fix: defer Sigma init with requestAnimationFrame to prevent no-height crash
Container has no computed height when useEffect fires immediately
after data arrives. Defer to next animation frame so browser layout
completes. Also add allowInvalidContainer as safety net.
2026-03-19 08:56:31 +03:00
Fringg
3434073d7c fix: resolve Sigma container height error on page load
Use absolute positioning for graph container instead of flex-1
to ensure explicit dimensions when Sigma initializes.
2026-03-19 08:51:45 +03:00
Fringg
4ebd85b65d fix: fullscreen layout and filter dropdown positioning
- Page now uses fixed inset-0 overlay to fill entire viewport
- Simplified top bar to single row (back + title + search + filter)
- Filter dropdown uses absolute positioning on desktop (no layout shift)
- Filter button always visible, toggles dropdown on click
2026-03-19 08:43:39 +03:00
Fringg
ea143fdbc9 fix: redesign top bar and filter panel for mobile
- Split top bar into two rows on mobile: title + filter icon, then
  full-width search below
- Desktop keeps single-row layout with search and filter inline
- Filter button: icon-only on mobile with active indicator dot
- Filter panel: full-screen overlay with backdrop on mobile,
  inline dropdown on desktop
- Outside-click closes filter panel
- Removed subtitle (only on desktop, saves space)
2026-03-19 08:30:32 +03:00
Fringg
818557f57d fix: improve graph spacing, mobile layout, and Telegram viewport
- Increase FA2 scalingRatio to 10 and decrease gravity to 0.5 for
  better node spacing (less cluttered graph)
- Use 100dvh instead of 100vh for Telegram Mini App viewport compat
- Hide legend on mobile to prevent overlay collision
- Move controls to bottom-right on mobile, bottom-center on desktop
- Make stats single-column on mobile for compact layout
2026-03-19 08:20:38 +03:00
Fringg
0f756d633d fix: remove dead store code and add search input maxLength
- Remove unused networkData, searchQuery, searchResults from zustand store
- Remove setNetworkData write in NetworkGraph
- Add maxLength={200} to search input
2026-03-19 08:08:18 +03:00
Fringg
235eaec85f feat: add referral network graph visualization page
Interactive Sigma.js + graphology graph with ForceAtlas2 web worker
layout, campaign/user node coloring, filters via nodeReducer pattern,
search highlighting, user/campaign detail side panels, and 4-locale
translations. Dependencies: sigma v3, graphology, graphology-layout-forceatlas2.
2026-03-19 07:56:01 +03:00
Fringg
84f0e4e9b4 feat: add media attachment support for admin ticket replies
Admin can now attach photos, videos, and documents when replying to
tickets. Upload happens on file selection via existing media upload
endpoint. Includes attachment preview with type-specific icons,
upload progress, error handling, race condition protection, and
proper blob URL lifecycle management.

Added video player rendering for video attachments in message thread.
Updated ticket list preview to show [media_type] for media-only messages.
2026-03-19 06:39:05 +03:00
Egor
65894d4e35 Merge pull request #327 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.38.0
2026-03-18 23:35:13 +03:00
github-actions[bot]
256fce9f98 chore(main): release 1.38.0 2026-03-18 20:34:52 +00:00
Egor
c885fedb72 Merge pull request #326 from BEDOLAGA-DEV/dev
Dev
2026-03-18 23:34:24 +03:00
Egor
6c3286abbe Merge pull request #325 from BEDOLAGA-DEV/main
w
2026-03-18 23:33:00 +03:00
Fringg
aa8fbd1e23 feat: clickable user link to user card in admin payments 2026-03-18 23:30:18 +03:00
Fringg
4a33a61641 fix: handle long promo group names with truncation and flex-wrap 2026-03-18 22:52:32 +03:00
Fringg
c579abe6a3 feat: display user promo group badge on dashboard 2026-03-18 22:49:24 +03:00
Fringg
a3a6fad9b7 feat: display manual admin top-ups in sales statistics 2026-03-18 22:41:02 +03:00
Egor
da29e523b9 Merge pull request #324 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.37.1
2026-03-18 18:25:42 +03:00
github-actions[bot]
cabab3ebfc chore(main): release 1.37.1 2026-03-18 15:25:22 +00:00
Egor
15d31c1457 Merge pull request #323 from BEDOLAGA-DEV/dev
Dev
2026-03-18 18:24:50 +03:00
Egor
6a32bf3590 Merge pull request #322 from BEDOLAGA-DEV/main
w
2026-03-18 18:22:05 +03:00
Fringg
18b860533c fix: add tooltip text color for dark theme in landing stats charts 2026-03-18 18:00:39 +03:00
Fringg
d640cc1a04 fix: add tooltip text color for dark theme in all charts
Added color and itemStyle to Recharts Tooltip so text is visible on dark backgrounds.
2026-03-18 17:59:12 +03:00
Fringg
c5f621b399 fix: load telegram-web-app.js asynchronously to prevent page blocking
When telegram.org is unreachable, the synchronous script tag blocks
DOM parsing for ~51 seconds (TCP timeout), preventing the React app
from rendering and the deep link auth fallback from activating.
2026-03-18 16:41:17 +03:00
Egor
e16ad91c17 Merge pull request #321 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.37.0
2026-03-18 06:08:37 +03:00
github-actions[bot]
4ce242114e chore(main): release 1.37.0 2026-03-18 03:08:18 +00:00
Fringg
a7831668c0 chore: trigger release-please 2026-03-18 06:07:50 +03:00
Egor
52162c6735 Merge pull request #319 from BEDOLAGA-DEV/dev
Dev
2026-03-18 05:57:41 +03:00
Egor
9d2490f635 Merge pull request #318 from BEDOLAGA-DEV/main
w
2026-03-18 05:54:35 +03:00