## Implementation Plan: Fix Poll Options Unresponsive on Mobile (Android/Chrome) ### Files to Change **1. `devplacepy/static/css/engagement.css`** (lines 159–175, `.poll-option` block) - Add `touch-action: manipulation` to the existing rule. - Add a new rule immediately after: `.poll-option:not([disabled]):active { background-color: #e0e0e0; }` for immediate tactile feedback. **2. `devplacepy/static/js/PollManager.js`** - Replace the click-only listener at line 8 with a `pointerdown` listener (fires for both mouse and touch before synthetic click retargeting). Prevent double fire by checking event pointer type or using a one-shot guard. - In `vote()` at line 45, change the `errorTarget` argument from `null` to `this.container` (the poll container element). This ensures `OptimisticAction.submit()` shows an error toast on fetch failure. - If the above change causes the `errorTarget` to be referenced before assignment, initialize `this.container` in the constructor by querying the poll element from the DOM. **3. (Optional but recommended) Add a `touchend` fallback** if `pointerdown` is deemed insufficient: listen for `touchend` on `.poll-option` elements and dispatch a synthetic `click` to the closest button. However, `pointerdown` alone should suffice given the `touch-action` fix. ### Order of Changes 1. Modify JS first (add `pointerdown` handler and errorTarget). 2. Modify CSS (add `touch-action` and `:active`). 3. Run verification commands. ### Verification / Definition of Done - [ ] The file `engagement.css` contains `touch-action: manipulation;` in the `.poll-option` rule block. - [ ] The file `engagement.css` contains a new `.poll-option:not([disabled]):active` rule with a non‑transparent background colour. - [ ] The file `PollManager.js` binds `pointerdown` instead of (or in addition to) `click` on the document. - [ ] The file `PollManager.js` passes a non‑null `errorTarget` (e.g. `this.container`) to `this.submit()` in `vote()`. - [ ] The project's unit tests pass: `pip install --break-system-packages -e '.[dev]' -q && make test-unit` exits with code 0. - [ ] The project's lint passes: `pip install --break-system-packages -q ruff && ruff check .` exits with code 0. *(Note: The `--break-system-packages` flag is added to work around PEP 668 restrictions in the current environment. If the environment already uses a virtual environment, this flag is harmless.)* - [ ] (Optional manual check) Poll option taps register on Android/Chrome – not required for automated definition of done but confirms the fix resolves the ticket.