- 14 Jun, 2026 1 commit
-
-
Mahmoud Aglan authored
- Guest mode: play vs bots without account, locked multiplayer/social tabs - Google OAuth sign-in/sign-up via Supabase with auto-profile creation - Delete account flow (password verify for email, confirm for OAuth) - Privacy policy + Terms of Service pages (bilingual AR/EN) - PWA manifest with app icons - Age confirmation checkbox on registration - Legal links in login, register, and settings Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 06 Jun, 2026 32 commits
-
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- friends.php: create domino invites in domino_matches table (not chess matches) - friends.php: check-invites scans domino_matches + ludo_matches tables - friends.php: accept/decline route to correct game table by game_key - domino-match.php: merge hands on move (preserve other player's hand data) - game.js: host deals and syncs both hands; guest waits for deal via polling - game.js: new rounds in live mode dealt by host only - lobby.js: pass playerIndex from accept response - chat.js: add domino option to in-chat challenge dialog - friends.js: pass game_key on accept/decline calls Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Snap radius 45→60 for easier endpoint tapping - hitTestEndpoints only checks currently active (highlighted) endpoints - Empty board returns hit on any canvas tap when endpoint is active - Simplified pointerdown handler (no early endpoint intercept) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Layout engine: - Non-doubles are landscape (w=48, h=24) in horizontal chains - Doubles are portrait (w=24, h=48) perpendicular to horizontal chains - Tiles positioned touching each other with GAP=3px between - Properly computes half-extents for advance distance - Endpoints positioned beyond last tile in chain direction Tile renderer: - Uses w>h to detect landscape orientation (no rotation param needed) - Left/right pips in landscape, top/bottom pips in portrait - Doubles get accent background Board: - Ghost and animate tiles compute orientation from layout dirIdx - No rotation applied (dimensions are pre-computed correctly) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Empty board now returns hit on any board tap when active endpoint set - Status text updates immediately when tile is selected/deselected Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Theme: - Replace green felt table with dark navy (#0f1623) matching app identity - Gold accent (#E4AC38) replaces green for highlights and UI elements - Tiles have warm ivory (#F5F0E8) with subtle shadows on dark bg - All UI bars/controls use app's #0f0f1e background Layout engine rewrite: - Chain starts from center, grows outward naturally - Proper double placement (perpendicular to chain direction) - Non-doubles align correctly with chain direction - Snake path with smooth turns at virtual bounds Interaction (tap-to-confirm): - Tap tile → highlights valid endpoints on board - Tap highlighted endpoint → confirms placement - NEVER auto-places on tap — always requires explicit destination - Tap same tile again → deselects it - Status shows "اختر مكان الوضع" when tile is selected Board improvements: - Pan gesture: drag on empty board area to scroll - Auto-zoom: smoothly zooms out as chain grows large - Endpoint glow uses gold dashed-ring indicator Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
When touchend fires without updating pointer coordinates (common in headless environments and some mobile browsers), the proxy position is used to re-check endpoint hit test before deciding placement. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Previously, tapping a tile that could play on both ends would highlight board endpoints and require a separate canvas tap. Now a second tap on the same tile auto-places it on the right end, matching mobile UX expectations. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Added touchend listener as fallback in DominoDrag for browsers/envs where pointerup doesn't fire after touch events - Added auto-pass (1.5s timeout) when player is blocked and boneyard is empty — prevents game from stalling Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Styles were injected before hand/drag were instantiated, resulting in zero-dimension tiles (CSS classes never added to page). Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Full mobile domino implementation with all 6 phases: - Canvas board with snake-path layout, endpoint glow, ghost preview - HTML fan hand with drag-and-snap + tap-to-play controls - 3-level bot AI (beginner/intermediate/expert) with server records - Live multiplayer via polling (match-live.js integration) - Emote system, resign sync, disconnect handling - Multi-round scoring (first to 100), round overlays - Server API (domino-match.php) with Elo, coins, XP rewards - Bot difficulty picker, friend challenge flow, lobby integration Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- match-live.js: always forward poll data to game (not only on move_count change) This was the root cause — resign/draw don't increment move_count, so the game never processed the status change or game_state update - game.php: all match operations now use supabaseService() to bypass RLS (handleGameMove, handleResign, handleComplete all failed silently with user token) - Add dedicated 'draw' action in game.php that atomically marks match completed - Draw acceptance now calls action:'draw' instead of writing game_state only - handleResign validates match isn't already completed (prevents double-resign) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Add friend_messages table + chat.php API (send, history, unread) - Add chat scene with real-time polling, day dividers, invite from chat - Add game lobby scene (waiting room before match starts) - Add "Challenge Friend" button on play home screen - Add challenge-friend scene with friend picker + game/time selector - Remove ad banner from chess, polish layout for all screen sizes - Fix Ludo layout (broken #ludo-wrap div, board now fills space properly) - Route invite acceptance through lobby instead of direct game push - Add
💬 chat button on friend cards in social scene Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
- Add friend button shows success/already-sent/already-friends status - Profile button navigates to player profile view - Report button shows confirmation before dismissing Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Friendship bugs fixed: - Accept now uses service key (bypasses RLS that blocked updates) - Duplicate request prevention (checks both directions) - Reject uses proper POST action instead of broken DELETE call - Cleaned up stale duplicate rows in DB New features: - Friend invite system: challenge dialog with game/time selection - Match created as 'friendly' with status 'waiting' - Opponent sees invite banner (polls every 5s), can accept/decline - Accept starts the match, both players enter the game - 2-minute invite expiry Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Daily rewards: - Server now tracks streak, prevents double-claim, resets on missed day - GET endpoint returns current state (streak, claimed status, today's reward) - Updates profile daily_streak + last_daily_reward columns - Frontend fetches state from server instead of relying on local store Achievements: - New scene with category filters, progress bars, tier badges - POST check action recalculates all progress from player stats - game.php now tracks win_streak and checks achievements on game end - Rewards (coins/XP) auto-granted when achievement completes Challenges: - Claim tracking via economy_transactions prevents double-claims - Fixed column name (reason, not description) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Players can now fill all profile fields (bio, country, city, FIDE info) from their profile tab and apply for organizations with document proof. Also fixes avatar.php to use SERVICE_KEY for storage uploads. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Eliminate double polling: removed game.js own poller, use match-session's single 2s poll via handleLivePollData callback (halves network requests) - Send last_move (from/to/san/promotion) in game_state so opponent gets exact move data — fixes castling, en passant, promotion animations - Opponent moves now animate (piece slides) instead of board snap - Capture particles now fire on opponent's captures too - Castling sound+haptic plays for opponent's castles - Draw flow: sender sees "sent" confirmation, receiver sees accept/deny dialog (30s timeout), both sides see result via game_state merge - Emote dedup: timestamp tracking prevents repeated display on same emote - Emotes use correct emoji lookup (getEmojiForKey) instead of 3 hardcoded - Polling runs even during player's turn (emotes + draws must arrive anytime) - Game end detection covers draw result ('draw' + 'aborted') Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Draw offer now syncs: sender sees confirmation, receiver sees accept/deny dialog with 30s timeout - Emotes now show the correct emoji (was hardcoded to 3 mappings, now uses actual emote key lookup) - Emote dedup via timestamp tracking — no repeated display - game_state is now MERGED server-side instead of overwritten, so emotes don't wipe draw offers and vice versa - Polling runs regardless of whose turn it is (emotes/draws need to arrive during your own turn too) - Draw accept/decline response properly detected by offerer Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Apply radial-gradient mask for smooth vignette fade on all edges. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Replace shop tab with tournaments hub. Players can browse all tournaments, filter by status, register, and launch pending matches directly from the hub. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Add chess piece upload UI to admin/branding.php (12 slots: white + black) - Fix loadPieceImages race condition in board renderer - Add tournament system module (Swiss, knockout, arena) - Add promo banner (1m×3m display) and video assets - Add 2-min display video script Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Fix: clicking friends tab now always shows friends scene (not notifications). Tab click resets to root when already active. - Friends list: sorted online-first, shows count, retry on error - Pending requests: fetches requester profiles (name, avatar, level) instead of showing raw UUIDs - Search: searches both username and display_name, debounced input - Online tab: auto-refreshes every 15s - Activity feed: timeAgo formatting, action icons - API: added 'profiles' action for batch profile lookups, search now matches display_name too Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The matches table requires these NOT NULL columns. Set match_type to 'tournament' and parse time_control string for clock values. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
PostgREST auto-decodes JSONB columns, so json_decode() fails when the value is already an array. Added is_array() checks before decoding. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- HUD badge on rank tab for pending tournament matches - Bracket API + horizontal scrollable bracket visualization (RTL) - Arena mode: join/seek/pair/play loop with live standings - Tournament lobby with countdown timer + player grid - Live tournament spectating with auto-refresh pairings - Format-specific tabs in tournament detail (bracket/arena) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Players can now play tournament matches from the app. Adds create-or-join API, realtime pairing notifications, auto-result reporting to Swiss API, and tournament-aware chess result screen. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 05 Jun, 2026 7 commits
-
-
Mahmoud Aglan authored
Categorized into Bullet, Blitz, Rapid, and Classical with Arabic labels: - Bullet: 1+0, 1+1, 2+1 - Blitz: 3+0, 3+2, 5+0, 5+3, 5+5 - Rapid: 10+0, 10+5, 15+10, 20+0, 30+0 - Classical: 45+45, 60+0, 90+30 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Ad area now flex:1 (absorbs all dead space above the board). Hidden by default — only shown when an active campaign is loaded. Game UI pushed further down for thumb reach. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Add ad banner slot in the dead space above the board - Move emote toggle button inline with player profile data - Emote panel now opens below player bar (no more fixed overlay) - Reduce top spacer to flex:0.4 so game sits near-center (slightly bottom-biased) - Add api/ads.php endpoint to serve active campaigns from ad_campaigns table - Ad system tracks impressions and filters by slot/game targeting Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Uses a flex:1 spacer div at the top of the layout instead of manipulating board container flex. On tall screens, dead space goes above the opponent bar — everything else stays packed at the bottom within thumb reach. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The justify-content:flex-end approach left dead space at top. Instead: keep flex:1 on board container (fills screen), use align-items:flex-end so the canvas sits at the bottom of its container. Emote button stays at fixed position off the board. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-