fix(whatsapp): keep QR login state in sync

Keep WhatsApp QR login state synced across gateway, macOS, and UI wait flows.

- Preserve the latest QR data URL/version while login polling rotates codes.
- Keep the wait-result protocol bounded to current QR metadata.
- Stabilize QR rendering and media fixture coverage after rebasing on main.

Validation:
- pnpm test extensions/whatsapp/src/login-qr.test.ts extensions/whatsapp/src/media.test.ts extensions/whatsapp/src/agent-tools-login.test.ts src/gateway/protocol/channels.schema.test.ts src/gateway/server-methods/web.start.test.ts ui/src/ui/controllers/channels.test.ts
- pnpm test:extension whatsapp
- cd apps/macos && swift test --filter ChannelsSettingsSmokeTests
- GitHub PR checks: 62 success, 5 skipped
This commit is contained in:
Val Alexander
2026-04-24 15:37:16 -05:00
committed by GitHub
parent 86099ec62a
commit 245451b6a9
20 changed files with 948 additions and 76 deletions

View File

@@ -2610,18 +2610,22 @@ public struct WebLoginStartParams: Codable, Sendable {
public struct WebLoginWaitParams: Codable, Sendable {
public let timeoutms: Int?
public let accountid: String?
public let currentqrdataurl: String?
public init(
timeoutms: Int?,
accountid: String?)
accountid: String?,
currentqrdataurl: String?)
{
self.timeoutms = timeoutms
self.accountid = accountid
self.currentqrdataurl = currentqrdataurl
}
private enum CodingKeys: String, CodingKey {
case timeoutms = "timeoutMs"
case accountid = "accountId"
case currentqrdataurl = "currentQrDataUrl"
}
}