Skip to content

Fix WhatsApp phone autofill - #851

Merged
defangdevs merged 1 commit into
masterfrom
fix/820-phone-autofill
Oct 13, 2026
Merged

defangdevs merged 1 commit into
masterfrom
fix/820-phone-autofill

Conversation

@defangdevs

@defangdevs defangdevs commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • split WhatsApp pairing into country calling-code and national-number controls
  • use the standards-defined tel-country-code and tel-national autocomplete hints so Safari can offer a phone picker without overwriting the country prefix
  • keep the legacy full phone=+... POST contract for Station and older clients
  • preserve the blank saved-secret fallback and reject incomplete or malformed split input before changing state
  • retain the AAAA-BBBB visual pairing-code format landed in Fix WhatsApp delivery to Codex sessions #850

Refs #820.

Validation

  • python3 tests/test-connect-card.py (42 passed)
  • python3 tests/test_agentbox.py (157 passed, 1 skipped)
  • nix build -L --keep-going .#ci-native
  • git diff --check
  • mobile rendering at 390 px without horizontal overflow
  • hotpatched and checksum-verified commit 9640b90 on the Azure box; the settings service is active on the exact tested binary

Compatibility

Station's current single-field international request remains supported and has regression coverage. The defanglabs/station repository is not visible to the authenticated GitHub account, so its own form change must follow once repository access is available.

Mobile screenshot

WhatsApp pairing form with separate country code and national number fields at a 390 px viewport

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8db0cd31-59bb-4576-ae62-e5e9a3917c01
📥 Commits

Reviewing files that changed from the base of the PR and between 59a5c67 and 9640b90.

📒 Files selected for processing (5)
  • modules/agent-box.nix
  • modules/src/settings-daemon.py
  • modules/src/settings.css
  • tests/golden/web/payloads/agent-box-settings/bin/agent-box-settings
  • tests/test-connect-card.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The WhatsApp pairing form now separates the country calling code from the national number. The handler validates the combined number, retains support for legacy full international numbers, and uses the saved number when both fields are blank.

Changes: WhatsApp pairing

Layer / File(s) Summary
Split-number form
modules/agent-box.nix, modules/src/settings-daemon.py, modules/src/settings.css, tests/golden/web/payloads/agent-box-settings/bin/agent-box-settings, tests/test-connect-card.py
The pairing forms use separate country-code and national-number inputs with distinct autocomplete hints and updated guidance. CSS sizes the fields, and the form tests check the new inputs.
Number validation and compatibility
modules/agent-box.nix, modules/src/settings-daemon.py, tests/golden/web/payloads/agent-box-settings/bin/agent-box-settings, tests/test-connect-card.py
The handlers combine and validate split input, accept a legacy full international number, and retain the saved-number fallback. Tests cover valid split input and reject malformed or incomplete input without replacing the saved number.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: lionello

Merge Risk: ⚪ Minimal · up to 9640b

No actionable merge-blocking issue was established for the WhatsApp phone-input change.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 2 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title accurately identifies the WhatsApp phone autofill fix, which is a central part of the changes. It is concise and specific.
Description check Passed The description directly explains the split phone fields, autocomplete behavior, validation, compatibility, testing, and mobile rendering changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 2 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@lionello

Copy link
Copy Markdown
Collaborator

@coderabbitai review
@defangdevs include screenshot

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@defangdevs

Copy link
Copy Markdown
Owner Author

Added the 390 px mobile rendering to the PR description.

@defangdevs
defangdevs merged commit ac19e7e into master Oct 13, 2026
8 checks passed
@defangdevs
defangdevs deleted the fix/820-phone-autofill branch October 13, 2026 11:19
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Agent-Box Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants