blob: a1cfd8cc0a1960f562d3de6785be3bad08722f31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 `<details>` 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
|