getappmap / appmap-intellij-plugin

MIT License
38 stars 9 forks source link

Links within Navie conversations open in the active editor and browser #753

Open dustinbyrne opened 3 months ago

dustinbyrne commented 3 months ago

Given the following prompt:

@help I'm using the AppMap agent for Java. My web framework is Spring. How do I record HTTP requests to my application?

Navie is likely to respond with links to documentation. Upon clicking those links, the active panel navigates to the link as well as an external browser.

The expected behavior is that links should only be opened in the browser.

dustinbyrne commented 3 months ago

I'm not sure if we'd need to just modify the link attributes to contain target="_blank". If that's the case, this issue can be fixed in the frontend.

Daniel-Warner-X commented 3 months ago

I didn't see this when I opened my issue. Adding my report for context:

When a Navie response contains a link, the link opens the destination in an external browser AND in an embedded browser. The embedded browser would be handy but in it's current form it destroys data. Once the embeddee browser opens my Navie conversation is over and inaccessible because there is no 'back' functionality. The fact that there is no conversational history compounds the loss... once a link is clicked, the conversation is effectively over.

image

jansorg commented 3 months ago

@dustinbyrne I was able to replicate this. I don't think this can be fixed in the plugin. Even though we already have code to open the link in the external browser and to suppress the local navigation, it's still doing it. I wasn't able to completely suppress this navigation. Is there perhaps a JS handler attached to the link?

When I added a target="_blank" attribute using the web inspector, it worked as expected.

This bug should be fixed as soon as the webview frontend adds target="_blank" attributes.