fix(desktop): 跳过登录时停止 Device Link 缓存令牌补读 - #3325
Merged
Merged
Conversation
Signed-off-by: DavidShen <david@xd.com>
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/features/device-link/useDeviceLinkRemoteProjects.ts | 登录态门禁与依赖更新正确阻止本地模式补读,并保留账号边界变化后的启动、清理和重启行为。 |
| apps/desktop/src/renderer/tests/deviceLinkRemoteProjectsAuth.test.tsx | 新测试通过模拟本地 owner 和未登录状态,覆盖了跳过登录后不启动 session-list 补读的回归场景。 |
Reviews (1): Last reviewed commit: "fix(desktop): gate mirror cache refresh ..." | Re-trigger Greptile
Contributor
|
命中 UI 路径(useDeviceLinkRemoteProjects.ts)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面,便于确认界面符合 DESIGN.md 设计规范。本条不阻断合并。 |
Collaborator
Author
反馈已处理已处理:
变更:
验证:
备注:
|
Contributor
|
合了。跳过登录不再去补读 Device Link 会话缓存令牌,本地模式也不会再对着权限错误空转。 |
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.
这次改了什么
摘要
跳过 Cindy 登录进入本地模式时,Renderer 仍会因为本地数据 owner 存在而启动 Device Link 镜像缓存令牌补读;Main 会按权限边界拒绝这些请求,形成持续的
PERMISSION_DENIED日志。本 PR 将补读循环同时受 Cindy 登录态和数据 owner 约束。本地模式不再启动该循环,登录或切换 Cindy 账号后仍会按账号边界重新启动。
变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
UI 变化
怎么验证的
自动验证
补充:对两个改动文件执行 ESLint 时,源文件命中 origin/main 已存在的未使用导入
requestRemoteSessionStatus;未在本 PR 中扩大范围处理。新增测试文件单独 ESLint 已通过。手工验证
未执行 Desktop 实机复现:当前会话位于独立 worktree,运行中的宿主不会加载该 worktree 改动。
未执行的验证
风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)