codemod icon indicating copy to clipboard operation
codemod copied to clipboard

[studio] It's easy to forget to click "Copy to Codemod panel" button when having a conversation that generates updated versions of a Codemod

Open with-heart opened this issue 1 year ago • 3 comments

Issue Description

Select one of: [ ] Generated codemod is not correct [ ] Bug in Codemod Studio [x] UI/UX improvement request [ ] Feature request

It's easy to forget to click "Copy to Codemod panel" button when having a conversation that generates updated versions of a Codemod.

Steps to Reproduce

  1. Fill out Before and After
  2. Click "Autogenerate with Codemod AI"
  3. Notice that generated code is now in the Codemod panel
  4. Send a message to Codemod AI that causes it to generate an updated version of the existing Codemod
  5. Notice that the updated version's code isn't in the Codemod panel
  6. Find the "Copy to Codemod panel" button (typically by scrolling up)
  7. Click "Copy to Codemod panel" button
  8. Notice that the updated version's code is now in the Codemod panel

Or if you're me, the reason you're opening this issue is because your steps are 1-4 and then

  1. Fail to notice that the updated version's code isn't in the Codemod panel
  2. Get frustrated that the "updated" Codemod still isn't working
  3. Repeat 4-6 with increasing frustration until you notice that the updated version's code isn't in the Codemod panel
  4. Weep

Actual Results

  • it's easy to forget that updated versions of the Codemod aren't automatically copied
  • the "Copy to Codemod panel" button is typically not even in view once the AI is done responding
  • the "Copy to Codemod panel" button has no visual indication that if I've just generated an updated version of the codemod, clicking it might be the thing I want to do next

Expected Results

The application helps make sure that the updated version's code is copied to the Codemod panel if that's what I failed but otherwise intended to do.

Intentionally left this vague because I think there are a lot of ways the app could do that.

with-heart avatar Aug 17 '24 16:08 with-heart

I can see where you're coming from with this one, copying the generated/updated codemod to the codemod panel should happen automatically in case it succeeds. Putting this in our Backlog.

r4zendev avatar Aug 19 '24 14:08 r4zendev

That sounds great! I can't think of a time where it generated an update that I didn't want to try right away.

One thought that popped in my head with that solution is related to a question I just saw in Slack:

Since there's no "history" for the codemod code as it's being generated and updated, copying the code automatically would be a destructive action. I'm imagining a situation where an update causes codemod functionality that worked previously to stop working, and I'd have no way to get back to it or figure out what changed to break it.

with-heart avatar Aug 19 '24 16:08 with-heart

cc @mohebifar

alexbit-codemod avatar Aug 23 '24 18:08 alexbit-codemod