The audience picker closes on the click past it, not the press (#918) #948

Merged
claude-bot merged 1 commit from fix/918-audience-click into main 2026-09-30 04:58:07 +00:00
Collaborator

Closes #918.

Cause: the "Chosen people" picker sits in the Show it dialog's flow, so while it's open the dialog is taller. It closed on the outside press, so the dialog re-laid out before the release. The click aimed at "Send it to them on Discord" then landed on empty space and was lost.

Fix: useOnClickOutside takes { on: "click" }, and AudienceControl uses it. The click has found its target before the panel closes, so one click both closes the picker and toggles the box. Menu and every other caller keep the press, for the drag reasons in the hook's docstring.

Tests:

  • a hook test for on: "click";
  • an AudienceControl test: a press alone leaves it open, then one click closes it and checks the box. It fails on main.
  • The ui, wiki and discussions vitest suites pass (586).

Real-browser check (seeded e2e stack, Playwright, one real mouse click after ticking a person):

  • 390×844: Discord true → false, picker closed. PASS
  • 1440×900: Discord true → false, picker closed. PASS

The screenshots show the dialog growing around the open picker (the cause) and collapsing after the single click.

Changelog: changelog.d/918-audience-click.fixed.md.

🤖 Generated with Claude Code

Closes #918. **Cause:** the "Chosen people" picker sits in the Show it dialog's flow, so while it's open the dialog is taller. It closed on the outside **press**, so the dialog re-laid out before the release. The click aimed at "Send it to them on Discord" then landed on empty space and was lost. **Fix:** `useOnClickOutside` takes `{ on: "click" }`, and `AudienceControl` uses it. The click has found its target before the panel closes, so one click both closes the picker and toggles the box. Menu and every other caller keep the press, for the drag reasons in the hook's docstring. **Tests:** - a hook test for `on: "click"`; - an `AudienceControl` test: a press alone leaves it open, then one click closes it *and* checks the box. It fails on main. - The ui, wiki and discussions vitest suites pass (586). **Real-browser check** (seeded e2e stack, Playwright, one real mouse click after ticking a person): - 390×844: Discord true → false, picker closed. **PASS** - 1440×900: Discord true → false, picker closed. **PASS** The screenshots show the dialog growing around the open picker (the cause) and collapsing after the single click. Changelog: `changelog.d/918-audience-click.fixed.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ui): the audience picker closes on the click past it, not the press (#918)
All checks were successful
CI / Bot/backend version sync (pull_request) Successful in 35s
CI / Bot tests and audit (pull_request) Successful in 2m0s
CI / Feedback site tests (pull_request) Successful in 54s
CI / Backend lint (ruff) (pull_request) Successful in 1m28s
CI / Docker image build (pull_request) Successful in 32s
CI / Does this change touch the recording path? (pull_request) Successful in 35s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 2m45s
CI / Frontend (shard 2/2) (pull_request) Successful in 5m45s
CI / Frontend (shard 1/2) (pull_request) Successful in 7m48s
CI / End-to-end journeys (desktop) (pull_request) Successful in 7m13s
CI / End-to-end journeys (phone) (pull_request) Successful in 6m19s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 6m51s
CI / Backend migration, tests, and audit (pull_request) Successful in 17m26s
8998e21506
Closed on the press, the Show it dialog re-laid out before the release, so
the click aimed at "Send it to them on Discord" landed on empty space and
was lost. useOnClickOutside takes { on: "click" }; AudienceControl uses it,
so the click has found its target before the panel closes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.