Skip to content

fix: use closest attachment index for context menu download#1834

Open
fresh3nough wants to merge 1 commit intosession-foundation:devfrom
fresh3nough:fix/issue-1828-video-download
Open

fix: use closest attachment index for context menu download#1834
fresh3nough wants to merge 1 commit intosession-foundation:devfrom
fresh3nough:fix/issue-1828-video-download

Conversation

@fresh3nough
Copy link

First time contributor checklist:

  • I have read the README and Contributor Guidelines

Contributor checklist:

  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest dev branch
  • A yarn ready run passes successfully (ran pnpm ready)
  • My changes are ready to be shipped to users

Description

Fixes #1828

Summary:

  • Use the nearest data-attachmentindex ancestor when opening the message context menu so nested targets (e.g., the play icon) map to the correct attachment.
  • Add a unit test that exercises nested attachment targets.

Repro steps (pre-fix):

  1. Open Session Desktop 1.17.8 on Ubuntu.
  2. Receive a message with multiple video attachments.
  3. Right-click the play icon on the second video and choose Save.
  4. The downloaded file is the first video.

Test plan:

  • Pre-fix: pnpm exec mocha --require jsdom-global/register app/ts/test/components/MessageContextMenu_test.js (fails: expected 0 to equal 2)
  • Post-fix: pnpm exec mocha --require jsdom-global/register app/ts/test/components/MessageContextMenu_test.js
  • pnpm ready

Manual testing:

  • Not run (CLI-only environment).

Co-Authored-By: Warp agent@warp.dev

@Bilb Bilb force-pushed the dev branch 4 times, most recently from 9482711 to 0e508e6 Compare February 19, 2026 06:25
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.

[BUG] Downloading second video in message by right click downloads first video instead

1 participant

Comments