Commit Graph

9 Commits

Author SHA1 Message Date
Ai
87c6d7f82f fix: message sending fallback + iOS zoom on input + openOrCreatePrivate
- MessageInput: HTTP fallback when WebSocket not OPEN (prevents silent failures)
- WsClient: add trySend() returning bool to detect WS availability
- Backend: POST /api/messages/chat/:chatId endpoint for HTTP message send
- openOrCreatePrivate: use openChat() for consistency after refreshing chat list
- iOS fix: inputs get font-size:16px on mobile to prevent Safari auto-zoom

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:44:42 +03:00
Ai
2a4b7d5abc fix: open private chat from sidebar search
- openOrCreatePrivate: load chat by ID directly (skip stale list lookup)
- GET /api/chats/🆔 resolve title/avatar/privateUserId for private chats
  (was returning null title, causing chat area to behave unexpectedly)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:32:06 +03:00
Ai
5d3be2a628 fix: private chat creation and search in NewChatModal
- Fix: onOpen now async, MainLayout fetches fresh chats before opening
  (was using stale closure, chat wasn't found after creation)
- Fix: search null-safety in user list filter (displayName/username could be undefined)
- Fix: search also matches by phone number

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:22:32 +03:00
Ai
8e5c4cd67d feat: phone login, position badge, logout in profile, global search, admin chats
- Login: by phone number instead of username
- Position field: shown as badge next to name in members list, search, admin panel
- Logout: moved from sidebar to profile modal settings
- Sidebar search: global — shows matching users with one-click private chat
- Admin panel: new Чаты tab showing all chats with delete, position/phone in user form
- Backend: /api/admin/chats endpoint, position column migration, phone login support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:17:46 +03:00
Ai
8993a9f6ce feat: diamond app icon + fix login page vertical centering on mobile
- New diamond gem icon (blue gradient background, white faceted gem)
- Replaces all PWA icons: icon-192.png, icon-512.png, apple-touch-icon.png
- Login page uses icon-192.png as logo
- Fix vertical centering with 100dvh to account for mobile browser chrome

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:03:27 +03:00
Ai
3f54dbf375 feat: avatar upload for profile/chats, fix session persistence on refresh
- Profile modal: upload/remove user avatar, edit name/bio/phone, change password
- Chat info panel: upload/remove chat photo (owner/admin only)
- Avatar component: render photo when available, fallback to initials
- Session fix: initialize Zustand store from localStorage to prevent redirect on refresh
- Backend: avatar upload endpoints for users and chats, migration adds avatar columns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 11:55:11 +03:00
Ai
01331d0263 fix: error boundary, fix MessageInput import order, fix favicon SVG->PNG 2026-05-22 11:38:50 +03:00
Ai
7f80e0310c fix: vite-env.d.ts for import.meta.env types, fix isOnline boolean cast 2026-05-22 11:19:36 +03:00
Ai
1cabe9d04f feat: initial JaniChat messenger — PWA, WebSocket, admin panel 2026-05-22 11:06:43 +03:00