major-domo-v2/commands
Cal Corum 5f69d495ab CLAUDE: Fix draft list operations and improve add success display
Multiple fixes for draft list functionality:

1. **Model Fix (draft_list.py):**
   - API returns nested Team and Player objects, not just IDs
   - Changed team_id/player_id from fields to @property methods
   - Extract IDs from nested objects via properties
   - Fixes Pydantic validation errors on GET operations

2. **Service Fix (draft_list_service.py):**
   - Override _extract_items_and_count_from_response() for API quirk
   - GET returns items under 'picks' key (not 'draftlist')
   - Changed add_to_list() return type from single entry to full list
   - Return verification list instead of trying to create new DraftList
   - Fixes "Failed to add" error from validation issues

3. **Command Enhancement (list.py):**
   - Display full draft list on successful add (not just confirmation)
   - Show position where player was added
   - Reuse existing create_draft_list_embed() for consistency
   - Better UX - user sees complete context after adding player

API Response Format:
GET: {"count": N, "picks": [{team: {...}, player: {...}}]}
POST: {"count": N, "draft_list": [{team_id: X, player_id: Y}]}

This resolves:
- Empty list after adding player (Pydantic validation)
- "Add Failed" error despite successful operation
- Poor UX with minimal success feedback

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 19:35:50 -05:00
..
admin CLAUDE: Add /admin-clear-scorecards command for manual channel management 2025-10-22 17:03:43 -05:00
custom_commands CLAUDE: Remove duplicate emojis from EmbedTemplate method calls 2025-10-14 00:43:05 -05:00
dice Add pitcher injury numbers to AB rolls 2025-10-23 23:47:45 -05:00
draft CLAUDE: Fix draft list operations and improve add success display 2025-10-25 19:35:50 -05:00
examples CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00
gameplay Make /scorebug ephemeral 2025-10-23 19:51:51 -05:00
help CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
injuries Clear Injury bug fix 2025-10-22 19:20:43 -05:00
league Add sba_logo_url to the config and update /standings formatting 2025-10-21 14:40:03 -05:00
players Allow any user to toggle player stats 2025-10-21 13:06:03 -05:00
profile CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
soak Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
spoiler Refactored listener logic and added SpoilerListener 2025-10-22 14:59:19 -05:00
teams CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
transactions CLAUDE: Change transaction diagnostic logging from INFO to DEBUG 2025-10-23 16:09:12 -05:00
utilities CLAUDE: Add multi-image support for charts 2025-10-20 22:00:19 -05:00
voice CLAUDE: Refactor voice cleanup service to use @tasks.loop pattern 2025-10-24 00:05:35 -05:00
__init__.py CLAUDE: Initial commit for discord-app-v2 rebuild 2025-08-15 00:04:50 -05:00
CLAUDE.md CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00