diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-13 14:04:12 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-13 14:04:12 -1000 |
| commit | 0fda0e9e4b0c6a73be513987264329e4515170f1 (patch) | |
| tree | 046f9f903492d0a069c46b351479b652335e6fc2 /internal/models/types.go | |
| parent | 1c79f105c960ddab2265cbfd8dfd728630b1ebfb (diff) | |
Add Trello Lists support for UI dropdowns
Expose Trello Lists in Board model to enable card creation UI:
- Add List model struct (ID, Name) to types.go
- Add Lists []List field to Board model
- Add GetLists method to TrelloAPI interface
- Refactor private getLists to return []models.List
- Update GetCards to build list map from slice
- Add public GetLists method wrapping private implementation
- Update GetBoardsWithCards to populate Lists field concurrently
- Update mock Trello client in tests to implement GetLists
All tests pass. Boards now include their lists for UI rendering.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/models/types.go')
| -rw-r--r-- | internal/models/types.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/models/types.go b/internal/models/types.go index d39a1d6..31308fc 100644 --- a/internal/models/types.go +++ b/internal/models/types.go @@ -36,11 +36,18 @@ type Meal struct { RecipeURL string `json:"recipe_url"` } +// List represents a Trello list +type List struct { + ID string `json:"id"` + Name string `json:"name"` +} + // Board represents a Trello board type Board struct { ID string `json:"id"` Name string `json:"name"` Cards []Card `json:"cards"` + Lists []List `json:"lists"` } // Card represents a Trello card |
