fix: 默认开启已有账号自动回看并修复启动跳转 - #146
Merged
2977094657 merged 1 commit intoSep 16, 2026
Merged
Conversation
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.
改动说明
已有可用账号时,启动应用默认自动进入聊天回看页,继续使用现有的账号记忆逻辑恢复账号。将「有数据时默认进入聊天页」在设置界面和启动逻辑中的默认值统一改为开启;用户已手动关闭的设置仍然有效。
同时修复已有的自动跳转问题:账号请求结束后调用
navigateTo可能丢失 Nuxt 上下文,异常又被空catch吞掉,导致开关开启但仍停留在首页。现在在组件初始化时获取路由实例,通过router.replace('/chat')跳转,并记录失败原因。无账号、未同意首次使用协议或账号请求失败时仍停留在首页。验证
node --test tests/startup-navigation.test.mjs tests/first-use-bootstrap.test.mjs:7 项通过。新增回归测试覆盖异步账号请求后的路由上下文、手动关闭、无账号、首次使用协议及请求失败场景。