From 7fd381a242f68b7c6f10db4e3ae0bb3d06e36a16 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 22 Jan 2026 10:09:07 -1000 Subject: 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 --- issues/003-fix-tap-to-expand.md | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 issues/003-fix-tap-to-expand.md (limited to 'issues/003-fix-tap-to-expand.md') diff --git a/issues/003-fix-tap-to-expand.md b/issues/003-fix-tap-to-expand.md new file mode 100644 index 0000000..a1cfd8c --- /dev/null +++ b/issues/003-fix-tap-to-expand.md @@ -0,0 +1,48 @@ +# [BUG] Tap to expand doesn't work + +## Description +Tap to expand doesn't work on task items. + +## Technical Context +- Likely a JS/HTMX event binding issue in task list items +- Affects: `partials/todoist-tasks.html` or `tasks-tab.html`, possibly JS in `web/static/` +- May be related to event delegation on dynamically-loaded content + +## Test Strategy + +### E2E Test (Red) +Playwright/browser test: click task row -> assert expanded content visible. + +``` +1. Load tasks page +2. Click on a task row +3. Assert expanded details section becomes visible +4. Assert expanded content contains expected task details +``` + +## Proposed Approach + +1. Inspect current expand trigger mechanism: + - Is it `hx-get` with `hx-trigger="click"`? + - Is it a JS click handler? + - Is it a `
` element? +2. Check for missing `hx-trigger` or event delegation issues on dynamically-loaded content +3. Ensure `htmx:afterSwap` rebinds event listeners if needed +4. Test on both desktop (click) and mobile (tap) + +## Debugging Steps +1. Open browser dev tools -> check for JS errors on click +2. Inspect element -> verify HTMX attributes present +3. Check Network tab -> see if request fires on click +4. If using JS handlers, verify they're attached after HTMX swaps + +## Affected Components +- `web/templates/partials/todoist-tasks.html` +- `web/templates/partials/tasks-tab.html` +- `web/static/` (if JS-based) + +## Definition of Done +- [ ] Clicking/tapping a task expands its details +- [ ] Works on desktop and mobile +- [ ] Works on initial load and after HTMX swaps +- [ ] E2E test confirms behavior -- cgit v1.2.3