style: remove markdown bold syntax from code comments
Remove `**...**` emphasis markers from inline comments and JSDoc blocks across auth and chat components, machine mappers, and quota helpers. These are plain code comments, not rendered markdown, so the bold syntax was noise. Files touched: - src/app/auth/components/auth-screen.tsx - src/app/chat/components/chat-header.tsx - src/app/chat/components/chat-screen.tsx - chat machine mapper / quota helpers No functional or behavioral changes.
This commit is contained in:
@@ -27,13 +27,13 @@ export type { AuthEvent } from "./auth-events";
|
||||
//
|
||||
// 设计:所有登录/同步流跑完都回 `idle`(带正确 `loginStatus`)。
|
||||
//
|
||||
// `pendingRedirect: boolean`("用户**显式**触发了登录"信号)——
|
||||
// **在登录成功的 onDone 里自动置 true**:
|
||||
// `pendingRedirect: boolean`("用户显式触发了登录"信号)——
|
||||
// 在登录成功的 onDone 里自动置 true:
|
||||
// splash / auth screen 看到 `pendingRedirect && loginStatus !== "notLoggedIn"` 跳 /chat
|
||||
// 跳完派 `AuthClearPendingRedirect` 置 false
|
||||
// checkingAuthStatus **不**设 flag —— 被动查 token 不算"用户意图"。
|
||||
// checkingAuthStatus 不设 flag —— 被动查 token 不算"用户意图"。
|
||||
//
|
||||
// 注:onDone 用了**内联**assign(不是 helper function)—— XState v5 的 TypeScript
|
||||
// 注:onDone 用了内联assign(不是 helper function)—— XState v5 的 TypeScript
|
||||
// 推断对 helper return type 不友好;内联能保留 `state.matches("loadingXxx")` 的类型。
|
||||
// ============================================================
|
||||
export const authMachine = setup({
|
||||
@@ -83,7 +83,7 @@ export const authMachine = setup({
|
||||
},
|
||||
// 启动 / 恢复时检查登录态 —— 由 <AuthStatusChecker /> 派发
|
||||
AuthStatusCheckSubmitted: "checkingAuthStatus",
|
||||
// 显式游客登录 —— 由 splash UI 派发(**不**自动)
|
||||
// 显式游客登录 —— 由 splash UI 派发(不自动)
|
||||
AuthGuestLoginSubmitted: "loadingGuestLogin",
|
||||
AuthEmailLoginSubmitted: "loadingEmailLogin",
|
||||
AuthEmailRegisterSubmitted: "loadingEmailRegister",
|
||||
@@ -98,7 +98,7 @@ export const authMachine = setup({
|
||||
errorMessage: "Apple login not implemented",
|
||||
}),
|
||||
},
|
||||
// splash / auth screen 跳完 /chat 后**清**flag
|
||||
// splash / auth screen 跳完 /chat 后清flag
|
||||
AuthClearPendingRedirect: {
|
||||
actions: assign({ pendingRedirect: false }),
|
||||
},
|
||||
@@ -110,10 +110,10 @@ export const authMachine = setup({
|
||||
invoke: {
|
||||
src: "checkAuthStatus",
|
||||
onDone: {
|
||||
target: "idle", // ← status check 完回 idle(**不**再假冒 success)
|
||||
target: "idle", // ← status check 完回 idle(不再假冒 success)
|
||||
actions: assign({
|
||||
loginStatus: ({ event }) => event.output,
|
||||
// **不**置 pendingRedirect —— 状态查询是**被动**读 token,不算"用户意图"
|
||||
// 不置 pendingRedirect —— 状态查询是被动读 token,不算"用户意图"
|
||||
errorMessage: null,
|
||||
}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user