Repository navigation
fix(ui): size and center OpenClaw ID sign-in popup - #194397
Conversation
Reserve a 520x720 popup centered over the opener while retaining opener isolation and existing boolean callers. Cover screen sizing and the account-menu browser entry point. Refs: ocid-popup-86d
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR requests a centered, screen-capped 520×720 sign-in popup through the existing window reservation helper. Example: An opener is 1280×900 pixels at screen position (100,40) on a 1920×1080 display.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR: the focused popup improvement remains useful on current main, but its new browser regression fails in the default CI lane and needs a narrow repair. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI account menu reserves an isolated popup during the click, obtains the authorization URL from the Gateway, and navigates the popup; the existing storage callback completes sign-in. flowchart LR
A[Account menu click] --> B[Account sign in]
B --> C[Window reservation helper]
C --> D[Detached centered popup]
B --> E[Gateway authorization URL]
E --> D
D --> F[Storage callback]
Technical reviewBest possible solution: Keep geometry in the existing reservation helper and repair the browser assertion to handle measured browser chrome while still detecting unusable popup sizing. Do we have a high-confidence way to reproduce the issue? Current main demonstrably leaves popup geometry unspecified, but the original tiny clipped window was not reproduced; the supplied before screenshot shows a large default window. Is this the best way to solve the issue? Explicit dimensions in the existing reservation owner are a small, coherent solution that preserves its security and lifecycle contracts; browser placement remains best effort. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 751785ce76d3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +17, Tests +180, Other +2. Total +199 across 6 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 6, 2026, 8:45 PM ET / November 7, 2026, 01:45 UTC. |
Keep a one-pixel sizing tolerance, measure browser chrome, and verify the synthetic sign-in form remains visible in headed and headless Chromium. Refs: ocid-popup-77b
|
Merged via squash.
|
* fix(ui): size and center OpenClaw ID sign-in popup Reserve a 520x720 popup centered over the opener while retaining opener isolation and existing boolean callers. Cover screen sizing and the account-menu browser entry point. Refs: ocid-popup-86d * test(ui): account for screen-capped sign-in popup chrome Keep a one-pixel sizing tolerance, measure browser chrome, and verify the synthetic sign-in form remains visible in headed and headless Chromium. Refs: ocid-popup-77b
What Problem This Solves
Fixes: “Sign in with OpenClaw ID” can open a tiny, clipped popup near the desktop's upper-left corner.
User Impact
User impact: sign-in requests a readable 520×720 CSS-pixel window centered over the opener, capped to the available screen. Browser window management still determines final placement. No migration or configuration change is required.
Why This Change Was Made
The existing reservation helper supplied only
popup, leaving geometry to browser defaults. This adds explicit sizing for account sign-in while preserving synchronous reservation, opener isolation, deferred navigation, the storage callback, and other callers' existing behavior.Simplification pass: keep geometry in the existing reservation helper; no new lifecycle owner, state, retry, or dependency. Necessary production delta: +20/-3 lines. Tests: +190 lines for normal/negative-monitor/small-screen geometry, blocked-popup behavior, the existing sign-out fixture, and the account-menu browser regression; a dedicated allocation accounts for that growth.
Evidence
Latest candidate:
76e208fa2bc32ee1eaf1c528e8e4778bcfdb2671.git diff --checkpassed.11a9e5668b4aac5593cdc96227d689e6763e0533, including the repair: no verified actionable P0–P2 findings. This was static review, not a second test run. Local ClawSweeper was not run.76e208fa2bc32ee1eaf1c528e8e4778bcfdb2671: 46 successful checks includingopenclaw/ci-gate, popup E2E, all UI shards, lint/typechecks and security. CI run. The superseded PR-context run was cancelled; it is not reported as a passed check.Limits: the original user's browser and live issuer remain untested. Exact requested geometry is checked by the unit contract; the browser regression checks native dimensions, visible form, opener isolation, and horizontal displacement rather than exact centering. Local type-aware lint is still limited by shared dependency symlinks.
Actual account-menu browser proof
These captures are from the passing revised E2E test, not the standalone helper harness.
Before/after helper geometry comparison
The following earlier captures use the production reservation helper and a synthetic page. They demonstrate browser-default versus explicit geometry, not the user's exact browser-specific clipping.
Validation commands
node scripts/run-vitest.mjs ui/src/lib/open-external-url.test.ts ui/src/components/openclaw-id/account-menu.test.tsx ui/src/lib/openclaw-id/browser-sign-out.test.ts --maxWorkers=1 node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-transcript-end-follow.browser.test.ts --maxWorkers=1 OCID_POPUP_EVIDENCE=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/openclaw-id-popup.e2e.test.ts --maxWorkers=1 OCID_POPUP_HEADED=1 OCID_POPUP_EVIDENCE=1 xvfb-run -a -s '-screen 0 1920x1080x24' node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/openclaw-id-popup.e2e.test.ts --maxWorkers=1