[Good first issue] 对比页显示行情源已提供的股息率
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in packages/shared/src/compare/service.ts around the row that produces Dividend Yield and see where it looks up the rate from dividend history only; then read packages/shared/src/capabilities/manifests/company-valuation.ts for the dpsRate contract, including how a zero value is represented. Add the valuation fallback so 0 still renders as a valid 0%, keep the missing state when neither source has a rate, and extend packages/shared/src/compare/compare.test.ts with both fixtures. Done is bun test --isolate packages/shared/src/compare/compare.test.ts passing with the new cases.
Written by the indexing model from the issue text.
Description
Compare displays a missing dividend yield even when the valuation capability returns one.
复现
让长桥估值行情的 fixture 返回 dps_rate: "2.5",同时让分红历史返回一条包含 ex_date 的 DividendRecord。解析和能力层输出已包含 company.valuation.data.dpsRate = 2.5,但离线调用 buildComparison() 后,Dividend Yield 单元格仍是 —,因为服务只在分红历史数据里查找股息率。
验收标准
- 有有效的
company.valuation.dpsRate时,对比页把2.5展示为2.5%。确认0也能作为有效值展示。 - 两种来源均缺少股息率时保留缺失态,并用已有的显式
dividendYieldfixture 做兼容回归。
源码与测试入口
- 核对对比表取值及估值能力的数据约定。 对比行取值 · 估值能力
bun test --isolate packages/shared/src/compare/compare.test.ts。 对比服务测试
欢迎评论 /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
-
area:desktop bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
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
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Similar issues
-
Diagram: Gantt qa-manually-tested Type: Bug / Error
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
mermaid-js/mermaid-v13#1255 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Name Option For /gifOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
BaseAdresseNationale/adresse.data.gouv.fr#2620 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day