chore: clean up migration comments and unused params
Remove obsolete Dart migration notes and route handling comments from splash-button.tsx and auth-machine.ts, and drop the unused `self` parameter from `chatWebSocketActor` callback signature.
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
/**
|
||||
* Auth 状态机(XState v5)
|
||||
*
|
||||
* 原始 Dart: lib/ui/auth/bloc/auth_bloc.dart + auth_state.dart + auth_event.dart
|
||||
*
|
||||
* 本轮迁移:所有认证登录调用(含 OAuth 社交登录)统一收口到状态机内。
|
||||
* 业务层只派发事件(`AuthEmailLoginSubmitted` / `AuthGoogleLoginSubmitted` / 等),
|
||||
* 状态机通过 actors 调 `authRepository`(邮箱 / OAuth token sync)或
|
||||
* `next-auth/react.signIn`(OAuth 跳转)。
|
||||
*
|
||||
* 异步服务(actors)已抽到 `./auth-actors`,小工具抽到 `./auth-helpers`。
|
||||
*/
|
||||
import { setup, assign } from "xstate";
|
||||
|
||||
@@ -35,8 +26,6 @@ export type { AuthEvent } from "./auth-events";
|
||||
// Machine
|
||||
//
|
||||
// 设计:所有登录/同步流跑完都回 `idle`(带正确 `loginStatus`)。
|
||||
// **不**再设 `success` state —— 之前曾用 "success" 当"刚成功"信号,
|
||||
// 但 status check 流也会误入 success,触发 splash-button 误跳 /chat。
|
||||
//
|
||||
// `pendingRedirect: boolean`("用户**显式**触发了登录"信号)——
|
||||
// **在登录成功的 onDone 里自动置 true**:
|
||||
@@ -100,6 +89,7 @@ export const authMachine = setup({
|
||||
AuthEmailRegisterSubmitted: "loadingEmailRegister",
|
||||
AuthGoogleLoginSubmitted: "loadingOAuth",
|
||||
AuthFacebookLoginSubmitted: "loadingOAuth",
|
||||
|
||||
// OAuth 回调后 sync 入口 —— 由 <OAuthSessionSync /> 派发
|
||||
AuthGoogleSyncSubmitted: "syncingGoogleBackend",
|
||||
AuthFacebookSyncSubmitted: "syncingFacebookBackend",
|
||||
|
||||
Reference in New Issue
Block a user