Commit 2a4dd72
fix(mobile): comment kebab menu desyncs after close (#14342)
## Summary
The kebab handler on mobile comments toggled `isOpen` and `isVisible`
together, but those two pieces of state intentionally serve different
roles:
- `isOpen` drives the open/close **animation**
- `isVisible` controls whether the drawer is **mounted** (kept true
during the close animation, set to false in `onClosed`)
Because `onClose` and `onClosed` flip them on separate ticks, there is a
brief window during the close animation where `isOpen=false` but
`isVisible=true`. A tap on the kebab during that window inverts both via
the toggle, leaving the drawer **unmounted while state thinks it's
open**. The next tap then has to dig itself out of the broken state, so
the kebab appears not to respond.
The fix is to make `handlePress` explicitly **open** the menu. Closing
is already fully owned by the drawer's `onClose` / `onClosed` callbacks
(row tap, backdrop tap, or swipe-down).
## Test plan
- [ ] Tap kebab on your own comment → drawer appears with Edit / Delete
options
- [ ] Tap kebab on another user's comment → drawer appears with Flag,
Mute User, etc.
- [ ] Tap a row → drawer closes; tap kebab again → drawer reopens on the
first tap
- [ ] Tap backdrop to dismiss; tap kebab → drawer reopens on the first
tap
- [ ] Tap kebab rapidly while drawer is animating closed → drawer always
opens cleanly, never stuck
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 18a1aab commit 2a4dd72
1 file changed
Lines changed: 3 additions & 3 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
| 241 | + | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
0 commit comments