[Repo Assist] refactor: consolidate WebLoginStartResult and WebLoginWaitResult into WebLoginResult#728
Conversation
… 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>
|
Codex review: found issues before merge. Reviewed June 8, 2026, 9:44 PM ET / 01:44 UTC. Summary Reproducibility: yes. for the review blocker: source inspection shows current main exposes the old result types and the PR removes them from the shared API. A downstream consumer naming those types or implementing the current interface would fail to compile against the PR head. 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 findings
Review detailsBest possible solution: Keep the existing public web-login result type names and interface signatures, and consolidate duplicate parsing behind a private or internal helper only after clean required validation. Do we have a high-confidence way to reproduce the issue? Yes for the review blocker: source inspection shows current main exposes the old result types and the PR removes them from the shared API. A downstream consumer naming those types or implementing the current interface would fail to compile against the PR head. Is this the best way to solve the issue? No. Public type removal is not the safest way to reduce duplication; a private helper or mapper can share the identical parsing while preserving the existing API. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 71d249711d63. 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
|
🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.
Summary
WebLoginStartResultandWebLoginWaitResultinChannelsSnapshot.cswere byte-for-byte identical — bothsealedclasses with the same five properties (Message,QrDataUrl,Connected,Error,RawResponse) and identical XML doc comments. Maintaining two types that carry the same data adds maintenance burden without any semantic benefit, since the method names (WebLoginStartAsync/WebLoginWaitAsync) already distinguish the two flows.This PR replaces both classes with a single
WebLoginResultclass.Changes
src/OpenClaw.Shared/ChannelsSnapshot.csWebLoginStartResult+WebLoginWaitResultwith singleWebLoginResultsrc/OpenClaw.Shared/IOperatorGatewayClient.csWebLoginResult?src/OpenClaw.Shared/OpenClawGatewayClient.csnew WebLoginResult {...})tests/OpenClaw.Tray.Tests/OnboardingChatBootstrapperTests.csFakeOperatorGatewayClientstubChannelsPage.xaml.csuses both methods via property access with inferred types and required no changes.Rationale
WebLoginStartAsync/WebLoginWaitAsyncby name — the type consolidation is transparent to themTrade-offs
None significant. The two types were identical. If they diverge in future they can be split again, but that would be a deliberate design choice rather than an accidental duplication.
Test Status
mainbefore this PR)./build.ps1requires Windows; build validated viadotnet teston Linux CI which exercises the compilation pathAdd this agentic workflows to your repo
To install this agentic workflow, run