Skip to content

Fix dead quick-action chips: capture pointer lazily in MarqueeWall dragScroll#1503

Merged
michaelassraf merged 1 commit into
mainfrom
claude/embedded-chat-quick-actions-01c804
Jul 20, 2026
Merged

Fix dead quick-action chips: capture pointer lazily in MarqueeWall dragScroll#1503
michaelassraf merged 1 commit into
mainfrom
claude/embedded-chat-quick-actions-01c804

Conversation

@michaelassraf

@michaelassraf michaelassraf commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Problem

Quick-action chips in the embeddable chat (GlobalAskAIClientGuideWelcomeQuickActionWall rows={4} dragScroll) stopped responding to clicks entirely.

Root cause

#1502 added dragScroll and called containerRef.setPointerCapture(e.pointerId) on every pointerdown. Pointer capture also retargets the compatibility mouse events, so mouseup — and therefore click, which fires at the nearest common ancestor of the down/up targets — landed on the wall container instead of the pressed chip. QuickActionChipFromData renders a <button onClick={onSelect}>, so its handler never ran and the whole wall read as dead.

Fix

Capture lazily: only once the press crosses the existing 3px drag threshold in onPointerMove.

  • A tap never captures, so its click reaches the chip.
  • A real drag still captures and keeps tracking after the pointer leaves the wall; its trailing synthetic click is still swallowed by onDragClickCapture.
  • Release is conditional on having captured.
  • onPointerLeave now ends a pre-threshold press, so draggingRef can't stick true and freeze the marquee when a press escapes the wall without a capture-guaranteed pointerup.

No consumer/hub change required.

Verification

  • tsc --noEmit clean for the touched file.
  • Needs a device/browser check of tap-to-send vs drag-to-browse on the chat quick-action wall before merge.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved manual marquee dragging by capturing pointer input only after a drag begins.
    • Fixed cases where incomplete drag gestures could leave the marquee stuck and prevent motion from continuing.
    • Improved pointer-leave handling for more reliable drag interactions.

@michaelassraf
michaelassraf merged commit 27a4219 into main Jul 20, 2026
4 of 5 checks passed
@michaelassraf
michaelassraf deleted the claude/embedded-chat-quick-actions-01c804 branch July 20, 2026 00:24
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ed3489c1-add6-4f31-b730-99085b5d0b04

📥 Commits

Reviewing files that changed from the base of the PR and between 8a96ca8 and fc74f85.

📒 Files selected for processing (1)
  • openframe-frontend-core/src/components/ui/marquee-wall.tsx

📝 Walkthrough

Walkthrough

MarqueeWall now delays pointer capture until a drag threshold is crossed, releases capture only for active drags, clears pre-drag state on pointer leave, and conditionally uses the drag-aware leave handler when dragScroll is enabled.

Changes

Marquee drag handling

Layer / File(s) Summary
Threshold-gated drag lifecycle
openframe-frontend-core/src/components/ui/marquee-wall.tsx
Pointer capture is deferred until movement exceeds the drag threshold, drag termination releases capture only for actual drags, and pointer leave clears pre-threshold dragging state when manual drag scrolling is enabled.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/embedded-chat-quick-actions-01c804

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant