Skip to content

Files newly added to Cloud sketch via Arduino Web Editor are not shown on pull #444

Open
@per1234

Description

@per1234

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

  1. Create a sketch in Arduino Web Editor. I'll call it "Foo".
  2. Sync Remote Sketchbook in the IDE.
  3. Pull the "Foo" sketch you created.
  4. Open the "Foo" sketch.
    🙂 The expected two files (Foo.ino, ReadMe.adoc) are shown in tabs and also shown in sketchbook explorer along with sketch.json (assuming you have the IDE's "Show files inside sketches" preference enabled).
  5. Return to the browser with the "Foo" sketch open in Arduino Web Editor.
  6. Click the downward pointing triangle tab menu.
  7. Click "Add Tab".
  8. In the "New Tab" dialog, enter "Bar.ino" as the tab name.
  9. Click the OK button.
  10. Make sure the sketch is saved.
  11. Return to the Arduino IDE with the "Foo" sketch open.
  12. 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 that Bar.ino was downloaded as expected.
  13. 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]

Metadata

Metadata

Assignees

Labels

criticality: mediumOf moderate impacttopic: cloudRelated to Arduino Cloud and cloud sketchestopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions