Automattic / studio

Studio by WordPress.com, a free desktop app that helps developers streamline their local WordPress development workflow.
https://developer.wordpress.com/studio/
GNU General Public License v2.0
138 stars 12 forks source link

feat: Open assistant-generated links in a browser #261

Closed dcalhoun closed 1 week ago

dcalhoun commented 1 week ago

Fixes https://github.com/Automattic/dotcom-forge/issues/7772.

Proposed Changes

Enable users to navigate with links included in assistant responses, opening the URL in the user's default browser.

Testing Instructions

  1. Navigate to the Assistant tab.
  2. Request documentation on a subject; e.g., "How do I install a plugin?"
  3. Verify clicking links within the assistant response open the link destination in the default browser.

Pre-merge Checklist

dcalhoun commented 1 week ago

The proposed changes do not include automated tests as we currently mock react-markdown due to the fact that it is an ESM-only library, for which Jest's support is experimental and unstable. Until we configure Jest for ESM and remove the mock, testing the proposed changes is only possible in the form of asserting props passed to react-markdown and/or unit testing Message and Anchor independently, which does not seem all that valuable.

dcalhoun commented 1 week ago

My understanding is the failing Windows E2E tests are unrelated to these changes and currently under investigation (p1718622040527389-slack-C06DRMD6VPZ).

fluiddot commented 1 week ago

My understanding is the failing Windows E2E tests are unrelated to these changes and currently under investigation (p1718622040527389-slack-C06DRMD6VPZ).

Yes, in fact, we've disabled temporarily E2E tests on Windows until it's solved. Sorry for the inconvenience 🙇 .