Skip to content

Conversation

@ka215
Copy link
Contributor

@ka215 ka215 commented Sep 18, 2025

変更内容

  • CSVエクスポート/インポート時に freeText (アクティビティ)が空の場合に文字列 "null" が挿入されてしまう不具合を修正。

Closes #8

@ka215 ka215 merged commit 7be9be3 into main Sep 18, 2025
1 check passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +185 to +193
const text = await file.text()
const rows = parseCsv(text)
if (rows.length === 0) throw new Error("CSV_EMPTY")
const header = rows[0]
if (
header.length !== CSV_HEADERS.length ||
!header.every((h, i) => h === CSV_HEADERS[i])
) {
throw new Error("CSV_HEADER_MISMATCH")

Choose a reason for hiding this comment

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

[P1] Strip BOM before validating CSV headers

The new prepareCsvForUpload rejects any CSV whose header array does not exactly match CSV_HEADERS. parseCsv leaves UTF‑8 BOM characters intact, so a file saved by Excel or other editors that emit a BOM yields a first header value of "\ufeffdate". The subsequent equality check throws CSV_HEADER_MISMATCH and aborts the import even though the column names are otherwise correct and were previously accepted. Removing the BOM before comparing (or trimming the header values) avoids breaking imports for BOM-encoded CSV files.

Useful? React with 👍 / 👎.

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.

CSV形式でのエクスポート/インポートでfreeText列が空だった場合に文字列の"null"が値になってしまう

1 participant