Skip to content

Conversation

yzhangok
Copy link
Contributor

@yzhangok yzhangok commented Jul 15, 2025

…added to pinned context from drag&drop

Fix the bugs

  1. Dragging an image sometimes adds it to pinned context instead of in the prompt
  2. Drag overlay is not rendered

Depends on aws/mynah-ui#397

Types of changes

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

  1. Images added via drag & drop are incorrectly routing to pinned contexts due to the topBarClicked signal not resetting properly. This occurs after interacting with the @Pinned Context menu and dismissing it, as the signal remains in a true state instead of resetting.
  2. Handling the dragEnter/dragover/dragExit by calling Mynah UI public method to show/hide overlay
Screen.Recording.2025-07-15.at.3.25.34.PM.mov

Checklist

  • [ x ] My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yzhangok yzhangok requested a review from a team as a code owner July 15, 2025 22:19
@yzhangok yzhangok requested a review from a team as a code owner July 15, 2025 22:23
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Fix the issue that sometime image added via drag & drop are incorrectly routing to pinned contexts and drag overlay is not rendered"
Copy link
Contributor

@manodnyab manodnyab Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description" : "Fix the issue that sometime image added via drag & drop are incorrectly routing to pinned contexts and drag overlay is not rendered"
"description" : "Fix the issue that sometime images added via drag & drop are incorrectly routed to pinned context"

val dropTarget = object : DropTarget() {
override fun dragEnter(dtde: DropTargetDragEvent) {
try {
browserInstance.jcefBrowser.cefBrowser.executeJavaScript(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we extract this code out to a function since its the same code with one parameter changed?

@samgst-amazon samgst-amazon enabled auto-merge (squash) July 31, 2025 17:46
@samgst-amazon samgst-amazon merged commit 781f173 into aws:main Jul 31, 2025
12 of 15 checks passed
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.

3 participants