diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-19 09:11:04 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-19 09:11:04 -1000 |
| commit | 2215aaa458b318edb16337ab56cf658117023eb4 (patch) | |
| tree | 73dc62cb8ed385e8ab5d255825b03ffb8845b27e /issues/phase3_step1_trello_write.md | |
| parent | 791034f1b588bf679f45a0f89168515fcbde66d5 (diff) | |
Implement Unified Quick Add for Tasks tab (Phase 3 Step 8)
Add Quick Add form to create Todoist tasks or Trello cards directly
from the Tasks tab with optional due date support.
Features:
- HandleUnifiedAdd handler with due date parsing
- HandleGetListsOptions for dynamic Trello list loading
- Quick Add form with source toggle (Todoist/Trello)
- Date picker for due dates
- HX-Trigger refresh after successful creation
- Pass boards to tasks-tab template for board selector
Cleanup:
- Remove resolved issue tracking files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'issues/phase3_step1_trello_write.md')
| -rw-r--r-- | issues/phase3_step1_trello_write.md | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/issues/phase3_step1_trello_write.md b/issues/phase3_step1_trello_write.md deleted file mode 100644 index 8f13e47..0000000 --- a/issues/phase3_step1_trello_write.md +++ /dev/null @@ -1,78 +0,0 @@ -# Phase 3 Step 1: Trello Write Operations - -**Status:** Active -**Priority:** High -**Feature:** Interactive Dashboard (Write Ops) - -## Description -Currently, the Trello client is read-only. We need to implement `CreateCard` and `UpdateCard` to enable interactivity (adding tasks, moving cards, completing items). - -## Requirements -1. **CreateCard:** - * Method: `POST /1/cards` - * Parameters: `name`, `idList`, `desc` (optional), `due` (optional). - * Returns: Created `models.Card`. - -2. **UpdateCard:** - * Method: `PUT /1/cards/{id}` - * Parameters: Flexible map of updates (e.g., `idList` to move, `closed=true` to archive). - * Returns: Updated `models.Card` (or just error). - -## Reproduction / Test Plan -Since we cannot hit the real Trello API in tests, we will use `httptest.Server` to mock the API responses. - -### `internal/api/trello_test.go` -```go -package api - -import ( - "encoding/json" - "net/http" - "net/http/httptest" - "testing" - "time" - - "task-dashboard/internal/models" -) - -func TestTrelloClient_CreateCard(t *testing.T) { - // Mock Server - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != "POST" { - t.Errorf("Expected POST, got %s", r.Method) - } - if r.URL.Path != "/1/cards" { - t.Errorf("Expected /1/cards, got %s", r.URL.Path) - } - - // Verify params - r.ParseForm() - if r.Form.Get("name") != "New Task" { - t.Errorf("Expected name='New Task', got %s", r.Form.Get("name")) - } - - // Return mock response - card := models.Card{ - ID: "new-card-id", - Name: "New Task", - } - json.NewEncoder(w).Encode(card) - })) - defer server.Close() - - client := &TrelloClient{ - BaseURL: server.URL, - Key: "test-key", - Token: "test-token", - Client: server.Client(), - } - - card, err := client.CreateCard("list-id", "New Task", "Description", nil) - if err != nil { - t.Fatalf("CreateCard failed: %v", err) - } - if card.ID != "new-card-id" { - t.Errorf("Expected ID 'new-card-id', got %s", card.ID) - } -} -``` |
