Sign out never recovers when the logout request stalls

オープン
#864 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, rust

調査の方向性

Start in web/app.js at accountUpdatePending() and the lobby's /api/logout handler. Trace the session check and existing browser tests for logout, then reproduce a stalled POST /api/logout. Done when the wait is bounded, the page can report or check whether sign-out succeeded, and pending controls recover so the user can retry.

索引モデルが issue の本文から書いたものです。

説明

Observed behavior

The lobby's Sign out button posts to /api/logout and reloads the page only after that request settles. The request has no timeout, so when the server accepts the connection and never answers, the page never reloads and Sign out stays disabled. Nothing tells the candidate what happened, and the only way out is to reload by hand. Once #782 lands, Your recordings is inert for as long as the request is pending as well.

While the request is pending, Start interview and Delete saved reports stay enabled, because accountUpdatePending() in web/app.js does not cover a pending sign-out. Whether a click then succeeds depends on whether it reaches the server before the session row is deleted.

Expected behavior
  • The wait for /api/logout is bounded, for example with AbortSignal.timeout(requestTimeoutMs).
  • When the wait ends without a response, the lobby does not reload blindly: the browser has not received the Set-Cookie that clears the session, so a reload can come back signed in. It re-checks /api/session or shows that sign-out could not be confirmed, and Sign out can be pressed again.
  • The pending sign-out state is cleared on that path, so no control stays disabled or inert for good.
Reproduction
  1. Run a browser test (or devtools request blocking) that never answers POST /api/logout.
  2. Sign in, open the lobby and click Sign out.
  3. Wait past the timeout you expect. The page does not reload and Sign out stays disabled.
Notes

Raised in the review of #782, where the author kept the pull request to recording-link visibility. A timeout alone is not the fix, since an aborted request does not say whether the server finished the logout: the recovery path above is the part that needs a decision.

主要言語
Rust
スター
236
フォーク
153
平均マージ
1日 9時間
マージ済み PR(30日)
187

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。