feat(cmd/csvpp/internal/tui): add interactive filter to view command#12
Merged
feat(cmd/csvpp/internal/tui): add interactive filter to view command#12
Conversation
- Add "/" key to enter filter mode with real-time row filtering - Support "column:value" syntax for column-specific search - Add case-insensitive substring matching across all columns - Preserve row selection state using original record indices - Extract color palette to package-level variables for readability - Add FilterPrompt and FilterActive styles - Add textinput dependency for filter input widget - Add TestParseFilterQuery and TestMatchesFilter test cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove silent default to JSON when input format is ambiguous - Return explicit error message guiding user to specify --from flag - Keep CSVPP as default input format when converting to JSON/YAML Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…parsing - Add keyOrderInfo type for tracking ordered keys with nested structure - Extract JSON key order using token-based decoder on first record - Extract YAML key order using yaml.MapSlice for order-preserving decode - Add reorderComponents to fix structured field component ordering - Remove non-deterministic collectKeyOrder function - Strengthen tests with cmp.Diff for exact header and record comparison Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t variable declarations - Remove shadow.Analyzer from csvppvet as err shadowing is idiomatic Go - Replace `if err = ` with `if err := ` in golden_test.go for consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
/filter mode tocsvpp viewTUI with real-time row filtering andcolumn:valuesyntax support--fromflag when converting stdin to CSVPP to avoid ambiguous format inferenceChanges
Filter feature (
cmd/csvpp/internal/tui)/key enters filter mode withtextinputwidget for real-time filteringcolumn:valueEntercommits filter,Esccancels, selection state preserved across filter changesTestParseFilterQuery(10 cases) andTestMatchesFilter(11 cases)Key order preservation (
cmd/csvpp/internal/converter)yaml.MapSlicepreserves original key orderreorderComponentsfixes structured field component orderingcmp.Difffor exact order verificationstdin format inference (
cmd/csvpp)--fromis unspecifiedTest plan
GOEXPERIMENT=jsonv2 go test ./cmd/csvpp/...passesGOEXPERIMENT=jsonv2 go vet ./cmd/csvpp/...passesgofumpt -l .reports no changescsvpp view testdata/validate/valid.csvpp→/filter works