I asked ChatGPT to make me a little Issue Management Shiny App. Here’s how it went! Some of the resulting code is in this repo.

image

Prompt 1: make me an R shiny app that implements a basic issue management system

Made an app that runs (code) but, didn’t actually populate the UI :(

image

image

Prompt 2: update the app so that i can edit existing issues

This triggered updates in the UI code!

0837a7a8-ae53-468e-b402-f992107d15d2 5991868a-5334-49d6-a85f-1242ba79da3f

And it added some javascript in datatables to make that table editable. b9137b11-4616-477e-b592-db0d924fc5da c175c225-ed25-4114-ac46-ae881c2136ee

At this point we’ve got a functional little prototype. Let’s see if we can do more …

Prompt 3: implement a simple database store the issues

This one only gave a partial server function so I went with …

Prompt 4: The server function doesn’t have a closing curly bracket. fix that please.

Code still doesn’t run. Looks like the onStartup function has syntax issues.

image Screen Shot 2023-03-29 at 3 36 42 PM

Let’s see if it can fix it …

Prompt 5-8: Issues with executing code when the app starts …

image

Seems like it’s looking for some session functions here, but I’m not sure they actually exist. I just copied a few error messages in to chatGPT a few times to see if it could figure it out, but no luck. Then I tried googling a little which brought me to the onStart parameter in shinyApp(), so I tried to convince it to use that. After a few tries we got this Code which does run, but bombs when you click submit.

image

Seems like this is close, but it isn’t my area of exprtise (and I’m here to play with ChatGPT not debug it’s work) so going to leave it here for now.


<
Blog Archive
Archive of all previous blog posts
>
Next Post
Website refactor with GPT4