Repository navigation
fix(export): make CSV null values consistent across export paths - #1176
Open
markankamaransheogarat-sys wants to merge 1 commit into
Open
markankamaransheogarat-sys wants to merge 1 commit into
markankamaransheogarat-sys wants to merge 1 commit into
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The frontend Files Reviewed (3 files)
Reviewed by claude-sonnet-5.5 · Input: 252 · Output: 1.8K · Cached: 227.1K Review guidance: REVIEW.md from base branch |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #1157. Previously,
csvValueinsrc/utils/resultExport.tsexportednullandundefinedas an empty field (""), whereasvalue_to_csv_stringin the streaming exporter (src-tauri/src/export/format.rs) emitted the sentinelNULL. As a result, exported CSV representations differed depending on whether file export was triggered through frontend loaded rows or the backend streaming path.Changes
Frontend
csvValueRepresentation (src/utils/resultExport.ts):csvValueto emitNULLwhenvalue === null || value === undefined, aligning directly withsrc-tauri/src/export/format.rs(value_to_csv_string).""preservation, numbers (e.g.0), booleans (e.g.false), objects, and quoting rules viacsvField.Frontend Test Suite (
tests/utils/resultExport.test.ts):NULLfor null fields.null, empty string"", literal"NULL",0, andfalseproduces"c_null,c_empty,c_literal_null,c_zero,c_false\nNULL,,NULL,0,false".Backend Test Suite (
src-tauri/src/export/tests.rs):csv_exports_null_empty_literal_zero_false_consistentlyasserting the identical fixture representation in the Rust streaming exporter.Verification
pnpm typecheck(tsc --noEmit): passed with 0 errors.pnpm lint: passed (ESLint and theme token check clean).vitest run tests/utils/resultExport.test.ts: all 10 tests passed.Closes #1157