Skip to content

[Feature] 新旧工作区渲染矛盾逻辑,承接 #390 PR的适配性改动 #398

Description

@xiaoyumuxi

Problem to solve / 要解决的问题

因为当前工作区同时存在两种渲染的逻辑,一种是基于SwiftUI的粗粒度渲染逻辑,一种是 #390 新引入的细粒度的渲染控制,前者会引发用户体验上的卡顿,尤其是在展示内容多的Git Log界面,因此这个改动需要适配到其他相关的页面

Proposed solution / 建议方案

进行适配,这个方案使用 contentIdentity 决定 equatable 是否复用工具内容,但目前内置的 Maven、Run、Tests、Debug renderer 都没有传入 identity,都会落到默认值 0(见 WorkbenchModuleUIComposition.swift)。复现时打开 Run 或 Debug 工具窗口,切换到会重建 feature 的另一个工作区,再执行一次操作;新旧 renderer ID 相同且 identity 都为 0,旧的 RunView 或 GenericDebugView 可能被保留,表现为显示旧工作区数据或操作落到旧 feature。建议在各内置 renderer 上传入 Renderer.featureIdentity,并为 loading 到 ready 与工作区切换补等价性测试。

Target platform / 目标平台

macOS

Alternatives considered / 已考虑的替代方案

No response

Additional context / 补充信息

No response

Checklist / 提交前检查

  • I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复建议。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededmacossomething related to macos strongly

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions