Add CSV export functionality for setlists#66
Open
johnrobertdelinila wants to merge 2 commits intoeugenecp:mainfrom
Open
Add CSV export functionality for setlists#66johnrobertdelinila wants to merge 2 commits intoeugenecp:mainfrom
johnrobertdelinila wants to merge 2 commits intoeugenecp:mainfrom
Conversation
This commit implements a new CSV export feature that allows musicians to export their setlists for sharing with band members and venue coordinators.
Changes:
- Added ISetlistExportService interface in Core layer
- Implemented SetlistExportService with CSV generation logic
- Created SetlistExportController with /api/SetlistExport/{id}/csv endpoint
- Added Export button to Setlists.razor UI
- Included comprehensive test suites for both service and controller
- Proper CSV escaping for special characters (commas, quotes, newlines)
- Authorization checks ensuring users can only export their own setlists
Features:
- Exports setlist metadata (name, venue, date, duration, notes)
- Exports all songs with details (title, artist, key, BPM, duration, genre, difficulty)
- Includes performance-specific data (custom BPM/key, notes, encore/optional flags)
- Maintains song order from setlist
- Generates sanitized filenames with setlist name and date
- Proper error handling and logging throughout
Test Coverage:
- 26 unit tests for SetlistExportService
- 17 unit tests for SetlistExportController
- Tests cover authorization, CSV formatting, edge cases, and error handling
- Targets 80%+ line and branch coverage requirement
Generated with Claude Code (claude.ai/code)
Co-Authored-By: Claude <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
Implements CSV export functionality allowing musicians to export setlists
for sharing with band members and venue coordinators.
Changes Made
Core Layer
ISetlistExportServiceinterfaceInfrastructure Layer
SetlistExportServicewith CSV generationWeb Layer
SetlistExportControllerwith/api/SetlistExport/{id}/csvendpoint
Features
Setlist Metadata:
timestamp
Song Details:
Technical Implementation:
Testing
43 comprehensive unit tests:
SetlistExportServiceSetlistExportControllerCoverage includes:
Run tests: