feat: human-like typing, Arabic locale, auto-reconnect, WebSocket real-time UI#119
Open
abdelrahmanmegaly-jpg wants to merge 11 commits into
Open
Conversation
Add a Simplified Chinese locale to the dashboard, following the i18n pattern introduced in rmyndharis#64. Chinese is now available alongside English and Hebrew via the existing sidebar language switcher. What's included: - New `src/i18n/locales/zh.json` mirroring the structure of `en.json`, covering all pages, components, and toast messages (404 keys + a new `common.chinese` label, identical hierarchy to `en.json`) - `zh` registered in `src/i18n/index.ts` (`supportedLanguages`, `resources`) so the language detector picks up `zh-*` browsers automatically and the cycle-language button rotates through it - Language label in `Layout.tsx` switched from a binary `he`/EN ternary to a `SupportedLanguage` lookup, so adding more languages later only requires extending the map; `zh` shows as `中文` - `common.chinese` key added to `en.json` for parity with the existing `common.english` / `common.hebrew` entries No code, API, schema, or styling changes outside i18n. RTL list is unchanged (Chinese is LTR). Existing users see no behavior change unless their browser is set to `zh-*` or they pick 中文 from the sidebar. Verified: - `npm run build` passes (tsc -b clean, vite build succeeds) - `npm run lint` reports no new errors (3 pre-existing warnings) - Key parity check: `en.json` and `zh.json` have identical key sets apart from the intentional new `common.chinese` - Chinese strings present in the production bundle (verified via grep on `dist/assets/index-*.js`)
The Swagger document defined the X-API-Key scheme via addApiKey() but never applied it, so no operation declared a security requirement and Swagger UI never sent the key. Requests reached the global ApiKeyGuard with no key and got 401 Unauthorized. Extract the config into createSwaggerConfig(), apply the scheme globally with addSecurityRequirements, and remove 5 stray @ApiBearerAuth() decorators that referenced an undefined bearer scheme. Fixes rmyndharis#104
- Add HumanizeService with configurable typing speeds (slow/normal/fast) - Add simulateTyping/simulateRecording to WhatsApp engine interface - Integrate humanize into sendText, reply, and bulk message services - Add dashboard UI toggle and speed selector with i18n support - Add periodic typing indicator refresh to prevent fade-out
- Add full Arabic translation (ar.json) across all sections - Add Arabic to rtlLanguages alongside Hebrew - Improve language selector UI (button + dropdown matching sidebar buttons) - Update language labels to show full names (English, العربية, etc.)
…ents - Add SessionStatus.FAILED to startup reset + auto-start sessions with credentials - Clean up stale SingletonLock files before auto-start - Add hasCredentials() to engine interface, adapter, and factory - Fix WebSocket events: broadcast to dashboard, map event names for frontend - Fix WebSocket payload adapter for flat/nested events - Dev: direct WebSocket to API (localhost:2785); Prod: add /events to nginx.conf - Fix duplicate disconnect notifications (onDisconnected + onStateChanged dedup) - Don't auto-show QR after Start; show spinner for initializing/connecting - Fix getQRCode to return empty when session already connected (no error)
- Replace fetchSessions() in handleStart with optimistic status update - Add useEffect to auto-show QR when status changes to qr_ready - Use ref to prevent duplicate QR modal openings - FetchSessions was setting loading=true which hid the UI cards
…age to prevent re-open on refresh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Features
Human-like Typing Simulation (
feat(message))HumanizeServiceintegrated intosendText,reply, and bulk messagingArabic Locale + RTL (
feat(dashboard))ar.json) across all sectionsCommunity PRs Merged
zh.json)es.json) + dashboard updatesSession Management Fixes (
fix(session))getQRCodereturns gracefullyTechnical Details
hasCredentials()added to engine interface for pre-flight checksSingletonLockcleanup during auto-start to prevent browser conflictssession.status → session:statusfor frontend/eventsnginx proxyFiles Changed
46 files, +3,482 / -2,262