Open
Conversation
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.
Problem Description
This PR addresses three critical issues that currently prevent the application from running successfully out-of-the-box:
1. WhatsApp QR Code Not Generating (405 Forbidden & Infinite Loop)
When starting the backend or CLI, WhatsApp rejects the connection and returns a
405 Forbiddenerror. This happens because the default browser signature (['DeviceTracker', ...]) is flagged by WhatsApp's anti-spam systems, and the hardcoded WhatsApp Web version in the Baileys library is outdated. Furthermore, the connection logic treats the 405 error as a temporary drop and attempts to reconnect immediately, causing an infinite loop that prevents the QR code from ever being generated.2. Frontend TypeScript Build Error
When attempting to start the React frontend (
npm run start:client), the build fails with aTS2322error insrc/components/ContactCard.tsx. ThelabelFormatterproperty in the Recharts<Tooltip />component is strictly typed as(t: number), which conflicts with Recharts' internal expectation ofReactNode, breaking the frontend compilation process.3. Unnecessary Docker Dependency for WhatsApp-only tracking
The default
npm run start:servercommand is chained with thestart:signal-apiscript (npx tsx src/scripts/init-signal.ts). This script requires Docker to be running to initialize the Signal API container. If a user only wants to use the WhatsApp tracking feature (which does not require Docker) and doesn't have Docker running, the entire Node.js backend fails to start and crashes.Proposed Changes
Commit: fix(frontend): resolve TS2322 type error in Recharts Tooltip
numbertoanyinlabelFormatterReactNodetype expectation, allowing the frontend to build successfully.Commit: fix(cli): update browser signature, WhatsApp version to fix 405 error and connection loop
Commit: feat: add separate start scripts for WhatsApp and Signal