波次0-P3 前端卫生:壳拆分 + 死代码清理 + 手机登出(#83) - #86
Merged
Merged
Conversation
…Skeleton(#83) - input:type 联合加 email,Math.random 换 useId,删死变量 shakeTimer - button:loading 时 :aria-busy(无障碍补齐) - error-card:hover 裸 rgb(0 0 0 / 0.05) 换 --color-surface-hover - skeleton.vue:收编壳内两处手写骨架(行数/末行缩短 + shimmer 公共样式),index 导出 - ui.test:SSR 行为断言增补(aria-busy / email / useId for-id 一致 / skeleton 行数) Signed-off-by: HandyWote <huangyinghui01@corp.netease.com>
- 新增 lib/use-module-frame:iframe 生命周期状态机(idle/handshaking/ready/failed, 15s 超时、retry 重挂、等 frameEl 就位),FrameState 去 disabled 死成员 - 新增 ModuleHost.vue:骨架/异常卡/iframe(key 重挂),停用判定改 err.status===403 禁 message.includes 字符串嗅探;死接口 403 单测覆盖 - App.vue:清 8 处死代码(void route.query.m、moduleHref、void fetchModuleToken、 useRoute/useRouter/UButton 未用导入、shell-empty 死绑定、disabled 成员) - 落地规则换调 lib/resolveLanding(删 nav.firstEnabledModule 双实现,单一真值) - 手机端底部标签栏加「我的」(Lucide User)→ 动作单显示用户名+退出(复用 onLogout); tokens.css 增 --color-scrim - 引导阶段骨架/握手骨架改用 USkeleton;清单失败卡重试改调 loadModules(原 phase 直 赋值永不重拉,顺带修复) - #75 getComputedStyle 类断言按规约改行为断言(退出可点 + logout 触发 + 跳 /login), 新增手机登出/遮罩关闭用例;vite.config 去 css:true Signed-off-by: HandyWote <huangyinghui01@corp.netease.com>
- SetupView:删 onMounted 内 getSetupStatus+/api/me+/router.replace 重复判定与 ACTIVATED_KEY/sealed 分支,phase 由 token 直接导出;保留表单草稿恢复 - LoginView:route.query.error 改走 lib/humanizeLoginError——oidc_state_mismatch / oidc_token_expired / oidc_provider_error / oidc_failed 各有专属人话,未知码回退通用 文案不泄露原始值;对应纯函数单测 Signed-off-by: HandyWote <huangyinghui01@corp.netease.com>
- tsconfig.base.json:noUnusedLocals: true(全仓未用变量零报错) - deploy/cloudflare:provisionAll 弃解构 dbIds/wrangler、steps 删未用 execFile 导入与 CORE_MIGRATIONS_DIR 常量(noUnusedLocals 波及,均为死代码) - apps/shell/src/styles.css:补 SPDX 头 Signed-off-by: HandyWote <huangyinghui01@corp.netease.com>
HandyWote
force-pushed
the
m1/issue-83
branch
from
September 9, 2026 07:18
81ae826 to
4d3714f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
1. 壳拆分(App.vue 635 → App/ModuleHost/composable 三分)
lib/use-module-frame.ts(~160 行):iframe 生命周期状态机(idle/handshaking/ready/failed),含 15s 握手超时、retry 重挂(B 方案真机缺陷修复:模块验签公钥注入(B)+ 壳桥挂载时机 #71 根因 2)、等 frameEl 就位、桥管理;FrameState删'disabled'死成员ModuleHost.vue:骨架 / 异常卡 / iframe(key 重挂),只管装载视图App.vue只剩壳布局 + nav 双渲染器 + 会话/清单引导(骨架/失败卡/空态)2. 死代码清理(8 处)
void route.query.m、moduleHref、void fetchModuleToken删shell-empty死类绑定删tsconfig.base.json开noUnusedLocals: true(全仓零报错;波及 deploy/cloudflare 4 处死代码,同为死码一并清)3. landing 单一真值
lib/resolveLanding(原 6 条测试零生产引用);删nav.firstEnabledModule双实现4. SetupView 只信路由守卫
5. 手机登出
--color-scrim6. 停用判定:
err.status === 403(token-api 已带 status),删 message.includes('停用') 嗅探7. 基元补齐:UInput type:'email' + useId(替 Math.random);UButton loading 加 aria-busy;error-card 裸 rgb(0 0 0 / 0.05) → token;USkeleton 收编(壳两处手写骨架共用)
8. 登录错误码人话:
lib/login-error.ts按 oidc_state_mismatch / oidc_token_expired / oidc_provider_error / oidc_failed 分档文案(验收 3 前置)杂项
#75getComputedStyle 类断言按开发纪律改行为断言(本 PR 触碰 App.vue);vite.config 去 css:true验收对照表
测试
pnpm -r typecheck && pnpm -r test && pnpm -r build:发现(未修,供后续)
packages/ui/src/input.vue:shaking从无赋值时机——错误抖动动画当前实际不触发(beUI 抖动语义名存实亡),疑为早前清理误删;本次未动避免范围外改动