Open
Description
Describe the bug
When you do a "Pull" on a file in your Remote Sketchbook, the content of the sketch from Arduino Cloud is downloaded to your computer and the sketch updated accordingly.
Arduino sketches may consist of multiple files, which are always shown in the Arduino IDE as tabs when that sketch is open.
🐛 If you do a "Pull" on a sketch in the IDE's Remote Sketchbook after a new file was added to the sketch via Arduino Web Editor, the new file is downloaded, but not opened in Arduino IDE as a tab, and often some of the existing tabs are even closed.
To Reproduce
- Create a sketch in Arduino Web Editor. I'll call it "Foo".
- Sync Remote Sketchbook in the IDE.
- Pull the "Foo" sketch you created.
- Open the "Foo" sketch.
🙂 The expected two files (Foo.ino
,ReadMe.adoc
) are shown in tabs and also shown in sketchbook explorer along withsketch.json
(assuming you have the IDE's "Show files inside sketches" preference enabled). - Return to the browser with the "Foo" sketch open in Arduino Web Editor.
- Click the downward pointing triangle tab menu.
- Click "Add Tab".
- In the "New Tab" dialog, enter "Bar.ino" as the tab name.
- Click the OK button.
- Make sure the sketch is saved.
- Return to the Arduino IDE with the "Foo" sketch open.
- Pull the Foo sketch.
🐛 The "ReadMe.adoc" tab disappears, leaving only the "Foo.ino" tab. The sketchbook explorer file listing is unchanged. However, if you check the contents of the sketch folder on your hard drive you can see thatBar.ino
was downloaded as expected. - Repeat the tab add and pull process described above, adding a tab named "Baz.ino".
🐛 This time, "Foo.ino" disappears and is replaced by "Bar.ino". As before, the files on disk are as expected.
Expected behavior
All sketch files of the currently open sketch are always shown as tabs in the Arduino IDE and in sketchbook explorer when "Show files inside sketches" preference is enabled.
Desktop
- OS: Windows 10
- Version: Version: 2.0.0-beta.8-snapshot.491fa19
Date: 2021-07-07T15:45:28.645Z
CLI Version: 0.18.3 alpha [d710b642]