Repository navigation
fix: apply cliff_duration from CSV batch uploads - #259
Merged
Merged
Conversation
cliff_duration was parsed but never consumed, so cliffs specified as a relative duration silently vanished. Add parseDuration() (plain seconds or 30d/12h/90m/2w/45s suffixes) and derive cliff_time = start_time + duration when no absolute cliff_time is given. Invalid cliff_time/ cliff_duration values now surface as row errors instead of being dropped. Fixes FlowwStar#234
This branch had an error being 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.
Summary
cliff_durationwas parsed bylib/csv-parser.tsbut never read inapp/app/create/batch/page.tsx, so cliffs specified as a relative duration silently didn't apply.parseDuration()(plain seconds or30d/12h/90m/2w/45ssuffixes) and derivecliff_time = start_time + durationwhen no absolutecliff_timeis given (absolute still takes precedence).cliff_time/cliff_durationvalues now show as a row validation error instead of being dropped with no feedback.Test plan
vitest run __tests__/lib/csv-parser.test.ts— 26/26 pass, 12 new cases coveringparseDurationand thecliff_duration/cliff_periodcolumnsupstream/main)tsc --noEmitcleancloses #234