[Repo Assist] refactor: share web-login result parsing while preserving API#728
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 4:13 AM ET / 08:13 UTC. Summary Reproducibility: not applicable. as a bug reproduction; this is a cleanup PR. Source and diff inspection confirm the branch preserves the existing API and only centralizes duplicated parsing. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the private parser helper only after the draft PR includes redacted real web-login or tray/API proof and continues preserving the public API. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction; this is a cleanup PR. Source and diff inspection confirm the branch preserves the existing API and only centralizes duplicated parsing. Is this the best way to solve the issue? Yes. The updated approach is the narrow maintainable solution for the cleanup because it keeps the public contract and shares parsing privately; the remaining gap is proof, not code shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 234fa8ff097f. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
… WebLoginResult WebLoginStartResult and WebLoginWaitResult were byte-for-byte identical: both had the same 5 properties (Message, QrDataUrl, Connected, Error, RawResponse). The method names (WebLoginStartAsync / WebLoginWaitAsync) already distinguish the two flows semantically, so maintaining two separate types added no value. Replace both with a single WebLoginResult class. Update IOperatorGatewayClient, OpenClawGatewayClient, and the FakeOperatorGatewayClient test stub accordingly. ChannelsPage.xaml.cs uses both via property access with inferred types and required no changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the public WebLoginStartResult and WebLoginWaitResult contract while keeping shared response parsing inside OpenClawGatewayClient. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f93bc66 to
7601cea
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
Closing this one as deprecated Repo Assist churn. It preserves behavior, but the repo-assist automation is being removed and this refactor does not materially improve user outcomes or maintenance risk enough to carry forward. |
🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.
Summary
WebLoginStartResultandWebLoginWaitResulthave the same gateway wire shape, but they are part of the publicOpenClaw.SharedAPI. This PR now preserves those public result types and the existingIOperatorGatewayClientsignatures while consolidating the duplicate JSON response parsing insideOpenClawGatewayClient.Changes
src/OpenClaw.Shared/ChannelsSnapshot.csWebLoginStartResultandWebLoginWaitResulttypessrc/OpenClaw.Shared/IOperatorGatewayClient.csWebLoginStartAsync/WebLoginWaitAsyncreturn typessrc/OpenClaw.Shared/OpenClawGatewayClient.csParseWebLoginResponsehelper used by both RPC methodstests/OpenClaw.Tray.Tests/OnboardingChatBootstrapperTests.csChannelsPage.xaml.cscontinues to use both methods through the existing result properties and required no changes.Rationale
web.login.start/web.login.waitresponse payload.After-fix proof
WebLoginStartResult,WebLoginWaitResult, and the originalIOperatorGatewayClientmethod signatures are present after the fix.OpenClawGatewayClienthandshake and the actualWebLoginStartAsync/WebLoginWaitAsyncmethods againstconnect.challenge,connect,web.login.start, andweb.login.waitframes. Output:./build.ps1: passed from a short NTFS junction (C:\oc728) pointing at this worktree; the direct long worktree path hit WinUI PRI path-sensitive tooling before the same build passed through the junction.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: passed, 2262 passed / 29 skipped.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: passed, 1088 passed.Add this agentic workflows to your repo
To install this agentic workflow, run