The financials tab can mix the previous stock's metrics with the newly selected stock's data. ## 复现 先为 `AAPL.US` 返回 `PE = 43.21` 和 `EPS = 6.78`。切换至 `MSFT.US`,用两个可控 Promise 暂停财务请求。在离线组件复现中,两组旧值仍在表格里。先完成新标的估值请求后,表格继续把 `MSFT.US` 的 `PE = 25.00` 与上一标的的 `EPS = 6.78` 显示在一起。 ## 验收标准 - [ ] 标的切换后,等待中的字段显示加载或占位状态。部分结果先到时,每个已显示的财务值仍与当前标的对应。 - [ ] 用模拟客户端测试估值和资料先后返回,并覆盖新标的请求失败、快速连续切换的情形。 ## 源码与测试入口 - `FinancialsView` 发起新请求时仍保留上一组 state。 [财务页面加载逻辑](https://github.com/ydflow/Trail/blob/579395e1ca863f8c522d9f3b24de0877ee62318d/packages/ui/src/components/workspace/FinancialsView.tsx#L26-L55) - 可参照同目录的 `installHappyDom`、`TestI18n` 和 mock 客户端,使用 `bun test --isolate packages/ui/src/components/workspace` 验证。 [工作台组件测试示例](https://github.com/ydflow/Trail/blob/579395e1ca863f8c522d9f3b24de0877ee62318d/packages/ui/src/components/workspace/NewsView.test.tsx) 欢迎评论 `/claim` 认领。PR 请关联本 Issue,并附上实际执行的测试命令和结果。 [贡献指南](https://github.com/ydflow/Trail/blob/main/CONTRIBUTING.md)
Activity