fix: Send sourceFrameId to correctly target clipboard events

Description

Adds sourceFrameId when posting clipboard event data to the child iframes so that correct iframe could get the the event. It is important for the nested iframes like two-tabbed Duo where Chat and Workflow apps render in third level iframes

Related Issues

gitlab-org/editor-extensions/gitlab-lsp#1217 (closed)

How has this been tested?

  1. Link related LS MR to the extension from this MR
  2. Run extension
  3. Enable the FF in settings.json "gitlab.featureFlags.agenticTabs": true. The sidebar will show a robot icon that renders two tabs with 2 apps - chat and workflow

Screenshot_2025-07-06_at_15.56.45

4. In each tab in the textarea trigger clipboard events: run <kbd>Cmd + A</kbd>, <kbd>Cmd + C</kbd> and <kbd>Cmd + V</kbd>. 5. Make sure that copy/paste functionality works both inside the tabbed app and in non-tabbed app (Agentic Chat that's not in the tab - separate sidebar item).

If the old LS is used with this extension version ot vice versa - new LS version with the old extension, it will work as before (clipboard works in 2nd level iframes but not 3rd). So its ok to merge these MRs independently not waiting for LS release.

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Olena Horal-Koretska

Merge request reports

Loading
Loading