[Bug] 财务页切换标的时只显示当前标的数据
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, react, typescript
- Domain
- frontend
Research direction
Start in packages/ui/src/components/workspace/FinancialsView.tsx around lines 26-55, where the new request keeps the previous symbol's state; make displayed metrics keyed to the current symbol and show loading/placeholder values while requests are pending. Read NewsView.test.tsx for the installHappyDom, TestI18n and mock-client patterns, then run bun test --isolate packages/ui/src/components/workspace. Cover valuation and profile resolving in either order, failure of the new symbol's request, and rapid consecutive switches; done means no metric from a prior symbol remains visible.
Written by the indexing model from the issue text.
Description
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。 财务页面加载逻辑- 可参照同目录的
installHappyDom、TestI18n和 mock 客户端,使用bun test --isolate packages/ui/src/components/workspace验证。 工作台组件测试示例
欢迎评论 /claim 认领。PR 请关联本 Issue,并附上实际执行的测试命令和结果。 贡献指南
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 37
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ydflow/Trail
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
volcengine/OpenViking#8432 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
jupyterlab/eslint-plugin#178 · 2 comments ·
-
bug from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nightly-labs/openbot#16303 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100