summaryrefslogtreecommitdiff
path: root/issues/009-keep-completed-tasks-visible.md
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-22 10:09:07 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-22 10:09:07 -1000
commit7fd381a242f68b7c6f10db4e3ae0bb3d06e36a16 (patch)
treeabff0af0a0f3b057d7b1ad6d95dbefdf30c553c3 /issues/009-keep-completed-tasks-visible.md
parent583f90c5dedf0235fa45557359b0e6e7dd62b0f0 (diff)
Fix background image CORS issue
Switch from Unsplash Source API to Lorem Picsum which has proper CORS headers for cross-origin image loading. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'issues/009-keep-completed-tasks-visible.md')
-rw-r--r--issues/009-keep-completed-tasks-visible.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/issues/009-keep-completed-tasks-visible.md b/issues/009-keep-completed-tasks-visible.md
new file mode 100644
index 0000000..b80eaca
--- /dev/null
+++ b/issues/009-keep-completed-tasks-visible.md
@@ -0,0 +1,54 @@
+# [FEATURE] Keep completed tasks visible until refresh
+
+## Description
+Leave completed tasks in view until refresh and don't confirm completion.
+
+## User Story
+As a user, I want completed tasks to stay visible (struck through) until I refresh so I can see my progress and undo mistakes.
+
+## Technical Context
+- Affects: `partials/todoist-tasks.html` (HTMX swap behavior), possibly JS state
+- Currently completion likely removes item via `hx-swap="delete"` or similar
+- Need to change to in-place update with completed styling
+
+## Test Strategy
+
+### E2E Test (Red)
+```
+1. Load tasks page with uncompleted task
+2. Click complete button on task
+3. Assert task still visible with .completed class (strikethrough)
+4. Assert no confirmation dialog appeared
+5. Refresh page
+6. Assert completed task no longer visible
+```
+
+## Proposed Approach
+
+1. **Change completion endpoint response:**
+ - Instead of empty response (for delete), return updated task HTML
+ - Task HTML includes completed styling (strikethrough, muted colors)
+
+2. **Update HTMX swap:**
+ - Change from `hx-swap="delete"` or `hx-swap="outerHTML"` with empty
+ - To `hx-swap="outerHTML"` with completed task HTML
+
+3. **Remove confirmation:**
+ - Remove any `hx-confirm` attribute on complete button
+ - Or remove JS confirmation dialog if present
+
+4. **Completed task styling:**
+ - Add `.completed` class with `line-through text-gray-400`
+ - Optionally add "undo" button that appears on completed tasks
+
+## Affected Components
+- `internal/handlers/handlers.go` (completion endpoint response)
+- `web/templates/partials/todoist-tasks.html`
+- `web/templates/partials/task-item.html` (if exists, for completed variant)
+
+## Definition of Done
+- [ ] Completing a task keeps it visible with strikethrough
+- [ ] No confirmation dialog on completion
+- [ ] Task disappears on page refresh
+- [ ] Optional: Undo button on completed tasks
+- [ ] E2E test confirms behavior