認証エラーの日本語化とチャットUX機能追加#4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f55f3da31d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| text:msgInput.value, | ||
| text:msgInput.value.trim(), | ||
| image:imageBase64, | ||
| name:auth.currentUser.displayName || emailInput.value || "匿名", |
There was a problem hiding this comment.
Derive sender name from auth user instead of form state
Using emailInput.value as the fallback sender name causes incorrect metadata once the auth form is no longer the source of truth: on a persisted session reload (user already signed in), the email field is empty so messages are stored as 匿名, and after account switches the field can hold stale input from a prior login. This makes the new message attribution feature unreliable in normal usage; the fallback should come from authenticated user data (e.g., auth.currentUser.email) rather than an editable form control.
Useful? React with 👍 / 👎.
Motivation
Description
alertの代わりに認証エラーや状態を表示するようにした(#statusBar、スタイルと制御関数setStatusを追加)。authErrorMessagesとshowAuthError)。createUserWithEmailAndPassword後にupdateProfileで表示名を保存するようにした。allMessagesにまとめてrenderMessagesで描画するように変更した。index.html(認証・チャット関連の全機能をこのファイルに実装)。Testing
python3 -m http.server ...による起動)。index.htmlを開いてフォームに値を入力し、スクリーンショットを取得する自動チェックを実行して成功(スクリーンショットを生成)。git diff相当の静的確認)を行い差分を確認済み。Codex Task