Skip to content

fe: cancel a login that waits on the server, the spinner over the page left no way out - #209

Merged
landsman merged 4 commits into
mainfrom
cancel-login
Oct 25, 2026
Merged

landsman merged 4 commits into
mainfrom
cancel-login

Conversation

@landsman

@landsman landsman commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

A login to a host that never answers covered the page with a spinner, and nothing could stop it before the connection timed out, minutes later on some networks.

While a login waits now, the modal's fields are dimmed and Login turns into a spinning Cancel. The page-wide indicator is gone. Cancel, Escape or × stops the request with window.stop().

Cancelling in the browser alone would not have helped. Adminer kept the PHP session locked through Driver::connect(), so after a cancel, every other page in the window still waited for the stuck connect. patches/adminer-connect-without-session-lock.patch closes the session before connecting and reopens it only to write the token or a failed login. Upstream: vrana/adminer#1369 The connect itself keeps running on its server thread until libpq gives up; PHP cannot interrupt it.

The new scenario logs in to the silent test server, presses Cancel and checks two things: the form still holds what was typed, and the next page in the session answers within 1 s. Without the patch that page takes ~2 s and the scenario fails. Cancel is pressed with a raw mouse click, because Playwright's click(), evaluate() and waitForFunction() all wait until a pending navigation ends.

make qa, make check and the full make e2e (162 + 40 + 3 scenarios) pass. Checked in Chromium only, not yet in WKWebView.

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Login now waits inside the modal instead of covering the page.

  • A waiting login can be cancelled from its own modal.
  • Other pages answer while a login connection is still running.

The unnumbered previous finding is addressed: the queued submit now checks that the form is still waiting before sending it. No new actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Login submitted] --> B[Show Cancel in modal]
  B --> C[Wait two animation frames]
  C --> D{Still waiting?}
  D -->|No| E[Skip submit]
  D -->|Yes| F[Send login]
  F --> G[Release session before connecting]
  B --> H[Cancel, Escape, or close]
  H --> I[Stop browser request and clear waiting]
Loading

Reviews (4) · Last reviewed commit: "fe: keep a login cancelled within its fi..." · Reviewed by Greptile

…answers held every other page

Adminer kept the session locked through Driver::connect(), so while a login waited on a silent server, every other request in the window waited on the lock. The patch closes the session first and reopens it only to write the token or a failed login.
…e left no way out

While a login waits, Login turns into a turning Cancel inside the modal, in place of the indicator over the whole page. Cancel, Escape or the close button stops the request with window.stop().
busy.js sends the form two frames after the click. A Cancel in between took the wait down, but the login was still sent, with no Cancel left to stop it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant