Skip to content

fix(mobile): comment kebab menu desyncs after close#14342

Merged
dylanjeffers merged 1 commit into
mainfrom
claude/fix-mobile-comment-kebab
May 15, 2026
Merged

fix(mobile): comment kebab menu desyncs after close#14342
dylanjeffers merged 1 commit into
mainfrom
claude/fix-mobile-comment-kebab

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

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

…taps

The kebab handler toggled isOpen and isVisible together, but these
two pieces of state are intentionally separated: isOpen drives the
open/close animation while isVisible controls when the drawer is
mounted (kept around during the close animation, then unmounted in
onClosed). Toggling both in lock-step lets a tap during the close
animation flip them out of sync, leaving the drawer unmounted while
state thinks it is open — subsequent taps then need two presses
before the menu visibly appears.

Make handlePress explicitly open the menu. Dismissal is already
handled by onClose/onClosed (row tap, backdrop tap, or swipe down).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: 4973ac4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit 2a4dd72 into main May 15, 2026
3 checks passed
@dylanjeffers dylanjeffers deleted the claude/fix-mobile-comment-kebab branch May 15, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant