diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-22 11:15:08 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-22 11:15:08 -1000 |
| commit | b41d38e0161d49fac23c1d552622e7b8310b1c68 (patch) | |
| tree | cef7af2b1b0a5586082121965639ae947c7b54ad /issues/016-click-task-edit-details.md | |
| parent | 7fd381a242f68b7c6f10db4e3ae0bb3d06e36a16 (diff) | |
Add deploy script and remove resolved issues
- Add deployment/deploy script for server-side deploys
- Remove 10 completed issue files (001-016 batch)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'issues/016-click-task-edit-details.md')
| -rw-r--r-- | issues/016-click-task-edit-details.md | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/issues/016-click-task-edit-details.md b/issues/016-click-task-edit-details.md deleted file mode 100644 index a1687c9..0000000 --- a/issues/016-click-task-edit-details.md +++ /dev/null @@ -1,80 +0,0 @@ -# [FEATURE] Click task to open editable details - -## Description -When I click a task, open details and let me update description. - -## User Story -As a user, I want to click a task to view and edit its description inline. - -## Technical Context -- Extends existing task display with detail view -- Requires new endpoints for fetching and updating task details -- HTMX-powered modal or slide-out panel - -## Test Strategy - -### Unit Test (Red) -**File:** `internal/handlers/handlers_test.go` - -```go -func TestUpdateTaskDescription(t *testing.T) { - // Setup mock Todoist client - mockClient := &MockTodoistClient{} - handler := NewHandler(mockClient) - - // Call update endpoint - req := httptest.NewRequest("PUT", "/tasks/123", - strings.NewReader(`{"description": "Updated desc"}`)) - - // Assert Todoist API called with correct params - mockClient.AssertCalled(t, "UpdateTask", "123", "Updated desc") -} -``` - -### E2E Test (Red) -``` -1. Click on a task row -2. Assert modal/drawer opens with task details -3. Assert description field is editable -4. Edit description and save -5. Assert modal closes -6. Assert description persisted (re-open to verify) -``` - -## Proposed Approach - -1. **Endpoints:** - - `GET /tasks/{id}/detail` — fetch task with full details - - `PUT /tasks/{id}` — update task (description, etc.) - -2. **UI Flow:** - - Click task row triggers `hx-get="/tasks/{id}/detail"` - - Response loads into modal or slide-out panel - - Form with editable description (textarea) - - Save button triggers `hx-put="/tasks/{id}"` - - On success, close modal and optionally update task row - -3. **Template:** - - New partial: `partials/task-detail.html` - - Contains: title (read-only or editable), description (editable), due date, labels, save/cancel buttons - -4. **API Integration:** - - Update Todoist via API when saving - - Update local cache - -## Affected Components -- `internal/handlers/handlers.go` (new endpoints) -- `internal/handlers/handlers_test.go` -- `internal/api/todoist.go` (UpdateTask method if not exists) -- `web/templates/partials/task-detail.html` (new) -- `web/templates/partials/todoist-tasks.html` (add click handler) -- `web/templates/index.html` (modal container if needed) - -## Definition of Done -- [ ] Clicking task opens detail view -- [ ] Description field is editable -- [ ] Save persists to Todoist -- [ ] Local cache updated -- [ ] Modal/drawer closes on save -- [ ] Unit tests for update handler -- [ ] E2E test for full flow |
