[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
- bun, typescript
Research direction
Start with the numeric conversion in packages/shared/src/portfolio-import/parsers.ts around lines 86-108, which currently strips every comma, then check the row-level quantity and cost hint logic around lines 268-308. Add a parser test in parsers.test.ts for 12,34, 1,234.50 and 1234.50, and run bun test packages/shared/src/portfolio-import/parsers.test.ts. Done means 12,34 yields a review hint on the cost field while the two valid formats keep their current values.
Written by the indexing model from the issue text.
Description
最小复现
用下面的合成数据调用 parseCsv。解析结果把成本 12,34 记为 1234,confidence 为 1,issues 为空。当前数值转换会直接删除所有逗号。
Symbol,Quantity,Cost,Currency
AAPL.US,10,"12,34",USD
验证环境为 Windows、Bun 1.4.2,基于 main 的 579395e。
验收标准
- 逗号分组不符合千分位格式时,在数量或成本对应的字段上生成可审阅的格式提示,保留原值供用户核对。
- 用离线数据覆盖
12,34、有效的1,234.50和普通小数1234.50。有效格式的解析结果保持一致。
源码起点
验证入口 bun test packages/shared/src/portfolio-import/parsers.test.ts。
可以先在本条说明准备完成的范围,再评论 /claim。贡献入口见 #7。
- 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
-
area:desktop bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
bug triage:in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
redhat-developer/rhdh-plugin-export-overlays#4845 · 1 comment ·
Maintainers usually reply within 1 day
-
chore kaizen ui-rewrite
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
IBM/mcp-context-forge#7681 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cloudflare/workers-sdk#17159 ·
Maintainers usually reply within 1 day