I think it's pretty common to modify sketches (to behave differently) while keeping both old and new sketches under different filenames. At least I do it frequently. To do this, one would copy an existing sketch in Web Editor, modify it, give it a new filename, upload it to the Arduino and run/test it. When it's an IoT Cloud application using the IoT Cloud Dashboard widgets, one goes to the IoT Cloud website Dashboard to see if the new sketch operates as planned. If it doesn't, ideally the new sketch code would be displayed in the Arduino IoT Cloud Things Thing Sketch. Just like the Web Editor, you can compile and upload code to the Arduino from the Arduino IoT Cloud webpage. (This is a handy feature for quickly modifying and uploading new code). But the sketch code displayed in the Arduino IoT Cloud Things Thing Sketch tab isn't necessarily the sketch that's running in the Arduino and the one that was just uploaded from Web Editor. Why not?
Copy an existing sketch in Web Editor, modify it, give it a new filename and upload it to an Arduino using the serial port. All straight forward and works great. Web Editor gives confirmation of a successful upload of the new file and you know the Arduino is running the new sketch by observing the different behavior of my Arduino. Then go to the IoT Cloud from Web Editor using the 9 dots link in the upper right hand side of the page, (or call up the IoT Cloud from Bookmarks). The Things menu item shows the old sketch and the Sketch Tab in the Things menu shows the old sketch. I know the Arduino is not running this sketch. When I open Full Editor, it takes me back to the old file/sketch. But I don't want to edit the old file/sketch, I want to edit the new one - the one the Arduino is currently running.
How does one get the Sketch Tab in the Things menu to show the sketch which is actually running? And I assume if the Sketch Tab in the Things menu shows the new sketch which is actually running, when I open Full Editor, it'll take me to the new file/sketch in Web Editor.
Yes, I agree with you. I would like to know why the Cloud dashboard doesn't update with the sketch that was last loaded onto the device via the web editor.
And if we are doing it wrong, how do we update the Cloud dashboard to show the sketch running. I hope its not a cut 'n paste solution.