Skip to content

修复 Issue #120:粘贴导入空列导致字段错位 - #132

Closed
CC1227871 wants to merge 1 commit into
helsome:mainfrom
CC1227871:fix/issue-120-paste-import
Closed

CC1227871 wants to merge 1 commit into
helsome:mainfrom
CC1227871:fix/issue-120-paste-import

Conversation

@CC1227871

Copy link
Copy Markdown

变更说明

修复粘贴导入中逗号分隔空单元格被过滤、导致数量/成本/币种按压缩后的索引读取的问题。

  • 保留逗号分隔输入中的空列位置,并将空白单元格归一化为 undefined。
  • 保持现有的 symbol,cost 两列简写语义。
  • 缺失股票代码仍会被草稿校验拦截,不会把数量误当成股票代码。
  • 增加解析、草稿校验以及保存/重新加载回归测试。

Closes #120

验证结果

  • bun test packages/shared/src/portfolio-import:78 pass / 0 fail
  • bun test packages/shared --isolate:1003 pass / 0 fail
  • git diff --check:通过
  • shared 类型检查仍被 main 分支已有的 src/evaluation/experiment-service.ts:534 阻塞:返回值缺少 runtimeUnusable;与本 PR 无关。

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这份实现与已开放且已 APPROVE 的 #121 是同一修复,生产 diff 也等价:都是保留逗号分隔空列、parts[0] ?? '',并覆盖同一组 parse/draft/persist/reload 回归。#121 现在已经 clean rebase 到当前 main、GitHub 显示 mergeable=true,并且已有更完整的 Bun 1.4.2 / Windows 11 可复现报告;同时它早于本次 /claim 存在。因此不保留两份竞争实现,选择已有批准且验证材料更完整的 #121 作为落地 PR。本 PR 关闭为 superseded/duplicate,不代表实现方向有问题,也不要求你继续维护第二份相同改动。

@helsome helsome closed this Sep 20, 2026
@CC1227871
CC1227871 deleted the fix/issue-120-paste-import branch September 20, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Portfolio Import] 粘贴导入删除空列导致数量、成本和币种错位

2 participants