Skip to content

fix(ui): size and center OpenClaw ID sign-in popup - #194397

Merged
jalehman merged 2 commits into
mainfrom
ocid-popup-86d/sign-in-geometry
Nov 8, 2026
Merged

jalehman merged 2 commits into
mainfrom
ocid-popup-86d/sign-in-geometry

Conversation

@jalehman

@jalehman jalehman commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Reproduced the previous headless CI failure (35px content-height difference), then repaired the test to account for measured browser chrome and screen capping. The one-pixel tolerance is unchanged; the test additionally checks that the sign-in form fits.
  • Default headless account-menu browser test passed: available screen 800×600, popup content 520×565, outer height 600, opener detached.
  • Headed Chromium account-menu browser test passed: available screen 1920×1080, popup content 520×719 at (480,130), outer height 754, opener detached. Both browser runs build the production UI and exercise its actual account-menu button with a mocked Gateway and synthetic issuer.
  • 38 focused external-URL/account-menu/browser-sign-out tests passed again. Geometry regressions failed against the original helper before implementation.
  • The separate chat-transcript end-follow suite passed all 29 tests locally. Its earlier CI failure did not reproduce; this is not proof of a fix or baseline attribution. The chat code is unchanged by this PR; fresh CI must establish the new head's outcome.
  • Formatting and git diff --check passed.
  • Fresh independent OpenClaw subagent review covered the full six-file candidate from merge base 11a9e5668b4aac5593cdc96227d689e6763e0533, including the repair: no verified actionable P0–P2 findings. This was static review, not a second test run. Local ClawSweeper was not run.
  • Exact-head CI passed on 76e208fa2bc32ee1eaf1c528e8e4778bcfdb2671: 46 successful checks including openclaw/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.

Control UI account-menu entry point

Resulting popup in headed Chromium

Resulting popup on the smaller headless screen

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.

Before: browser-default popup geometry

After: explicitly sized and centered popup

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

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
@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@jalehman
jalehman marked this pull request as ready for review November 7, 2026 01:29
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 7, 2026
@clawsweeper

clawsweeper Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This 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.

  • Before: Sign-in requests only the popup feature, leaving size and placement to the browser.
  • After: Sign-in requests width=520,height=720,left=480,top=130.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The production change is focused and useful, but the new browser test demonstrably fails and the inspected visual evidence stops at the helper boundary.
Proof confidence 🦐 gold shrimp (3/6) Under the supplied maintainer-authored classification, the ordinary contributor proof gate does not apply; inspected screenshots demonstrate helper geometry, while the reported headed account-menu run has no attached runtime artifact.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The OpenClaw ID sign-in window can have an unreadable size or inconvenient placement.
Reason: The feature author's direction supports explicit readable geometry, and the implementation reuses the existing owner without changing authentication, configuration, or persistence.

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
Reviewed head: 57e3a3ecc14ed3dbd0bc270581abbac844a48eca

Before merge

  • Make the height assertion work in the default headless lane (P2) - The suite launches headless unless OCID_POPUP_HEADED is set, but this assertion assumes the one-pixel difference observed in headed Chromium. The exact-head checks-ui-e2e job already fails here with “expected 35 to be less than or equal to 1.” This newly introduced test therefore blocks the normal lane despite the reported headed pass. Measure the relevant inner and outer geometry and account for the browser's actual chrome behavior, retaining a meaningful usable-size assertion rather than broadly relaxing the tolerance.

Findings

  • [P2] Make the height assertion work in the default headless lane — ui/src/e2e/openclaw-id-popup.e2e.test.ts:119-122

Tests

  • Missing end-to-end proof: The supplied images exercise a standalone helper page; no inspectable artifact shows the changed popup opened from the actual Control UI account menu.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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:

  • [P2] Make the height assertion work in the default headless lane — ui/src/e2e/openclaw-id-popup.e2e.test.ts:119-122
    The suite launches headless unless OCID_POPUP_HEADED is set, but this assertion assumes the one-pixel difference observed in headed Chromium. The exact-head checks-ui-e2e job already fails here with “expected 35 to be less than or equal to 1.” This newly introduced test therefore blocks the normal lane despite the reported headed pass. Measure the relevant inner and outer geometry and account for the browser's actual chrome behavior, retaining a meaningful usable-size assertion rather than broadly relaxing the tolerance.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 751785ce76d3.

Provenance checked

  • Deferred window reservation keeps the original intent (4610168: Reserve an inert window during user activation and detach its opener before deferred navigation; later session navigation added boolean popup selection.)
  • OpenClaw ID account sign-in keeps the original intent (e29577b: Provide account sign-in through the Control UI using a popup and same-origin storage callback without retaining an opener.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • 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 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
  • 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
  • pnpm tsgo:test:ui
  • git diff --check

What I checked:

PR surface

Source +17, Tests +180, Other +2. Total +199 across 6 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 20 3 +17
Tests 3 180 0 +180
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 6 202 3 +199

Preflight source

Source 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

Metric Value Why it matters
Production versus test growth Production +20/-3 lines; tests +180/-0 lines Production growth stays within the existing owner; tests cover requested geometry, screen limits, opener isolation, and the account-menu boundary, although the browser assertion needs repair.

Labels

Label changes:

  • add P2: This is a bounded sign-in window usability improvement with a concrete new browser-test failure, without evidence of a widespread blocked onboarding flow.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is a bounded sign-in window usability improvement with a concrete new browser-test failure, without evidence of a widespread blocked onboarding flow.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

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
@jalehman
jalehman merged commit 50a1577 into main Nov 8, 2026
99 of 100 checks passed
@jalehman
jalehman deleted the ocid-popup-86d/sign-in-geometry branch November 8, 2026 17:10
@jalehman

jalehman commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant