Skip to content

feat(web): beforeLoad中の白画面対策としてローディング表示を追加#235

Merged
hirokisakabe merged 2 commits into
mainfrom
feature/pending-component-loading-screen
May 20, 2026
Merged

feat(web): beforeLoad中の白画面対策としてローディング表示を追加#235
hirokisakabe merged 2 commits into
mainfrom
feature/pending-component-loading-screen

Conversation

@hirokisakabe
Copy link
Copy Markdown
Owner

close #221

目的

TanStack Router の beforeLoad でセッション確認 API を呼び出している間、画面が真っ白になる問題を解消する。

Cloud Run のコールドスタート時など authClient.getSession() に数秒かかるケースで、白画面の代わりにスピナーを表示する。

変更内容

  • apps/web/src/components/LoadingScreen.tsx — スピナーを表示する共通ローディングコンポーネントを追加(アクセシビリティ属性 role="status" / aria-live="polite" / sr-only テキスト付き)
  • apps/web/src/routes/login.tsxpendingComponent: LoadingScreen を設定
  • apps/web/src/routes/signup.tsxpendingComponent: LoadingScreen を設定
  • apps/web/src/routes/app.tsxpendingComponent: LoadingScreen を設定

ローカル検証手順

  1. pnpm dev で開発サーバーを起動
  2. Chrome DevTools の Network タブで「Slow 3G」に throttle
  3. /login / /signup / /app にアクセスし、セッション確認中にスピナーが表示されることを確認
  4. 白画面が表示されないことを確認

hirokisakabe and others added 2 commits May 20, 2026 20:56
TanStack Router の pendingComponent を使い、セッション確認 API 呼び出し中に
スピナーを表示して白画面を防ぐ。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
role="status" / aria-live="polite" と sr-only テキストを付与し、
スクリーンリーダーにローディング状態が伝わるようにする。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🚀 プレビュー環境がデプロイされました!

URL: https://tascal-pr-235-197260822086.asia-northeast1.run.app

@hirokisakabe hirokisakabe merged commit ae82fa7 into main May 20, 2026
6 checks passed
@hirokisakabe hirokisakabe deleted the feature/pending-component-loading-screen branch May 20, 2026 12:05
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.

ページ遷移時のローディング表示を追加(beforeLoad の白画面対策)

1 participant