CSV Rows-to-Columns retains blank records as empty output columns despite its documented examples

Author: MicroMiloCreated Jul 25, 2026Updated Jul 25, 2026

Summary

CSV rows-to-columns preserves blank input lines as empty fields even though its documentation and exact embedded example say blank lines are removed before transposition.

Validation source commit: 0337840e9ec0f26840252a658c1a6bf8c1b6dbf1.

Code path

  • public/locales/en/csv.json:7-11: User-facing contract says the tool cleans empty lines during conversion.
  • src/pages/tools/csv/csv-rows-to-columns/index.tsx:19-55: Embedded product example includes blank lines and specifies an output with those lines removed.
  • src/pages/tools/csv/csv-rows-to-columns/index.tsx:77-93: UI compute path directly invokes csvRowsToColumns with the displayed options.
  • src/pages/tools/csv/csv-rows-to-columns/service.ts:14-39: Implementation retains blank lines because splitting one produces [''], whose length passes the filter.
  • Repository-local validation artifact: Minimized executable witness.

Steps to reproduce

This report is based on a source-control-flow validation against the commit above.

  1. Check out the source commit listed in this report.
  2. Inspect the code path and contract anchors listed above.
  3. Exercise the described boundary/state path: CSV Rows-to-Columns retains blank records as empty output columns despite its documented examples.
  4. Compare the observed behavior with the expected contract below.

Validation note: The minimized input a,b\n\nc,d has contract-derived expected output a,c\nb,d, but the frozen service deterministically returns a,,c\nb,,d. The validation asserts that exact observed output and the contradiction, then exits successfully.

Expected behavior

The implementation should preserve the repository contract described by the documentation, public type, parser, serializer, or sibling implementation anchors above.

Actual behavior

CSV rows-to-columns preserves blank input lines as empty fields even though its documentation and exact embedded example say blank lines are removed before transposition.

Existing coverage

I did not find an existing issue or PR title that appears to cover this exact root cause in the pre-submission check.

Suggested fix

Remove genuinely blank input records before CSV rows-to-columns transposition.

Suggested tests

  • Add a regression test for: CSV Rows-to-Columns retains blank records as empty output columns despite its documented examples.
  • Include the boundary value or state transition described above so the old behavior fails before the fix.

Submitted with Codex.