Skip to content

Conversation

@novemberde
Copy link
Contributor

Summary

Adds comprehensive interactive mode support with enhanced CLI UX,
improved code architecture, and complete development tooling setup.

Key Features

Interactive Mode

  • 📋 List and select DynamoDB tables with arrow keys
  • 🎯 Interactive prompts for all commands (copy, dump, rename)
  • ⚙️ Billing configuration prompts (ON_DEMAND/PROVISIONED) when creating
    new tables
  • ✅ Input validation for RCU/WCU values with range checking

Enhanced UX

  • Colorful terminal output with icons (✓, ✗, ℹ, ⚠)
  • Beautiful prompts with default value hints
  • Multi-select support for future features
  • Spinner animations during operations
  • Clear error messages and confirmations

Code Architecture

  • Separated CLI interaction (cmd) from business logic (pkg)
  • New packages: prompt, display, awsutil
  • Improved error handling and validation
  • Comprehensive test coverage

Development Tooling

  • make setup - Install dependencies (golangci-lint, etc.)
  • make lint - Run 30+ linters (gofmt, govet, golangci-lint)
  • make test - Run all tests including integration tests
  • make build - Build binary
  • Comprehensive .golangci.yml configuration

Changes

  • Add interactive table selection using AWS ListTables API
  • Add billing mode configuration for new tables
  • Refactor architecture to separate concerns (cmd/pkg)
  • Add comprehensive test coverage for new packages
  • Replace archived survey library with promptui
  • Enable 30+ golangci-lint rules for code quality
  • Simplify and compact README documentation

Testing

  • Added unit tests for prompt, display, and awsutil packages
  • Integration tests pass with DynamoDB Local
  • All linters pass

Breaking Changes

None - all changes are backward compatible. Existing CLI arguments and
config files continue to work.

This PR tells the story of what was accomplished without being overly
verbose, highlights the key improvements, and makes it clear that there
are no breaking changes.

novemberde and others added 3 commits September 30, 2025 16:35
Major improvements to user experience and developer workflow:

## Interactive UI Enhancements
- Replace archived survey library with promptui for all prompts
- Add enhanced Input function with default value hints and validation
- Implement improved Select with arrow key navigation and help text
- Create feature-rich MultiSelect with:
  - Visual checkboxes (✓/○)
  - Multi-selection support (1,3,5)
  - Special commands (all/none)
  - Real-time selection counter
- Add validation helpers: InputWithValidation, InputInt, InputRequired
- Simplify Summary display for better readability

## Code Organization
- Refactor UI package into focused modules:
  - pkg/prompt: User input functions
  - pkg/display: Output formatting and styling
  - pkg/awsutil: AWS utility functions (table listing/selection)
- Move CLI logic from pkg/db to cmd package for better separation
- Add TableBillingConfig to support interactive table creation

## Interactive Mode Features
- Add table listing and selection in interactive mode for all commands
- Implement billing mode selection (ON_DEMAND/PROVISIONED) with validation
- Add RCU/WCU input with automatic range validation
- Enable graceful fallback to manual input if AWS connection fails

## Development Environment
- Add Makefile with comprehensive targets:
  - make setup: Install dependencies (golangci-lint, etc.)
  - make lint: Run go fmt, go vet, and golangci-lint
  - make test/test-integration: Run unit and integration tests
  - make dynamo-start/stop/clean: Manage DynamoDB Local
- Add .golangci.yml with 30+ linters enabled
- Fix DynamoDB Local compatibility (alphanumeric-only credentials)
- Add proper endpoint resolver with SigningRegion

## Testing
- Add comprehensive test coverage for new packages
- Create integration tests for copy, dump, and db operations
- Add display output capture tests
- Include function signature validation tests

## Bug Fixes
- Fix nil pointer dereference in BillingModeSummary
- Fix copy command to handle both billing modes correctly
- Ensure proper error handling and validation throughout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Reduced verbose sections to focus on essential information
- Condensed installation, usage, and configuration examples
- Removed redundant explanations and repetitive content
- Simplified Authors and Contributing sections
- Added Development section with Makefile commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant