Skip to content

feat: improve config listing to show session names from YAML files#283

Merged
ck3mp3r merged 4 commits intomainfrom
feature/improve-config-listing-with-session-names
Oct 23, 2025
Merged

feat: improve config listing to show session names from YAML files#283
ck3mp3r merged 4 commits intomainfrom
feature/improve-config-listing-with-session-names

Conversation

@ck3mp3r
Copy link
Owner

@ck3mp3r ck3mp3r commented Oct 23, 2025

Summary

This PR improves the user experience when listing configurations by showing the actual session names from YAML files instead of just the filenames.

Changes

Core Feature

  • Modified list() function in ConfigManager to parse YAML files and extract actual session names
  • Added graceful error handling for malformed YAML files with informative warnings
  • Users now see meaningful session names (e.g., "my-project", "development-env") instead of filenames

Related Improvements

  • Updated session manager to handle spaces in session names by converting them to dashes
  • Refined tmux client by removing unnecessary quotes from session name display
  • Updated tests to match tmux client changes
  • Added .devenv to VSCode exclusions for better development environment

Benefits

  • ✅ More intuitive config listing with actual session names
  • ✅ Better error handling that doesn't break the entire listing
  • ✅ Improved robustness when dealing with malformed config files
  • ✅ Consistent session name handling across the application

Testing

  • The function maintains the same interface (Result<Vec<String>>)
  • Gracefully handles parsing errors by showing warnings and continuing
  • Maintains alphabetical sorting of results

- Modified list() function to parse YAML files and extract actual session names
- Added graceful error handling for malformed YAML files with warnings
- Updated session manager to handle spaces in session names by converting to dashes
- Removed unnecessary quotes from tmux session name display
- Added .devenv to VSCode exclusions
- Updated related tests to match tmux client changes
- Update config file path construction to replace spaces in names with hyphens
- Adjust edit and delete operations to use normalized file names for consistency
- Ensure all config file interactions handle names with spaces correctly
- Replace array creation with from_ref to pass single error reference
- Improve error handling in build_error_tree for array field errors
@ck3mp3r ck3mp3r force-pushed the feature/improve-config-listing-with-session-names branch 3 times, most recently from dd4a7eb to 42d804a Compare October 23, 2025 19:17
- Introduce ConfigNameExt trait with sanitize method for consistent config name formatting
- Replace ad-hoc string replacements with sanitize method in config and session managers
- Extend sanitization to replace spaces and underscores with hyphens, enforce lowercase, and filter non-alphanumeric characters except hyphens
- Update imports to include ConfigNameExt where required
@ck3mp3r ck3mp3r force-pushed the feature/improve-config-listing-with-session-names branch from 42d804a to ac0032f Compare October 23, 2025 19:25
@ck3mp3r ck3mp3r merged commit 7d0ae6c into main Oct 23, 2025
2 checks passed
@ck3mp3r ck3mp3r deleted the feature/improve-config-listing-with-session-names branch October 23, 2025 19:30
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