Skip to content

Right hand panel UI is broken if Serial Monitor closed while window is loading #2710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
per1234 opened this issue Apr 14, 2025 · 0 comments
Open
3 tasks done
Labels
topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Apr 14, 2025

Describe the problem

By default, the bottom panel of the Arduino IDE window is used as the container for the Serial Monitor view. The user can configure Arduino IDE to instead use the right hand panel as the view's container by setting the "Arduino › Monitor: Dock Panel" (arduino.monitor.dockPanel) advanced setting to "right" (#2102).

When in this configuration, Serial Monitor is opened and closed by clicking the icon on the toolbar (not the similar icon on the right hand activity bar, which only expands/collapses the panel).

🐛 If arduino.monitor.dockPanel is set to right and Serial Monitor is closed while the Arduino IDE window is still loading, it puts the right panel UI into a broken state.

To reproduce

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
    A menu will appear on the editor toolbar:
    Command Palette
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
    You can scroll down through the list of commands to find it or type the name in the field.
    A "Settings" tab will open in the Arduino IDE main panel.
  3. Type arduino.monitor.dockPanel in the "Search Settings" field of the "Settings" tab.
  4. Select "right" from the "Arduino › Monitor: Dock Panel" setting menu.
  5. Close the Preferences tab by clicking its X icon.
  6. Select File > New Sketch from the Arduino IDE menus.
    • A new sketch will open in an Arduino IDE menu.
    • I will refer to this sketch as "test sketch".
  7. Click the Serial Monitor icon at the right side of the Arduino IDE toolbar.
    • The Serial Monitor view will open in the right hand panel of the Arduino IDE window.
    • It is not required to select a port or have an Arduino board connected to your computer to perform this demo.
  8. Click the Serial Monitor icon at the right side of the Arduino IDE toolbar.
    🙂 The right hand panel of the Arduino IDE window closes, as expected.
  9. Click the Serial Monitor icon at the right side of the Arduino IDE toolbar.
    🙂 The Serial Monitor view opens in the right hand panel of the Arduino IDE window, as expected.
  10. Select File > Save As... from the Arduino IDE menus.
  11. Save the test sketch to any convenient name and location.
  12. Close the Arduino IDE window of the test sketch.
  13. Open the test sketch again in Arduino IDE.
  14. As soon as the new window opens, click the Serial Monitor icon at the right side of the Arduino IDE toolbar.
    • This step is timing sensitive. If you click too soon, it doesn't have any effect. In this case, just click again until it does. Conversely, i must be performed while the window is still loading, which might be a short time window on fast/streamlined machines. If the fault doesn't occur, it may be because the window had loaded fully before you clicked the icon, so perform steps 10 - 12 again until you get the timing right.
    • 🐛 The Serial Monitor view disappears from the right hand panel, but the serial-monitor process is not terminated, so the port is not freed up as expected.
    • 🐛 The right hand panel is not closed, leaving a blank area of the Arduino IDE window:
      Image
  15. Click the Serial Monitor icon at the right side of the Arduino IDE toolbar again.
    🐛 There is no visual change (though now the serial-monitor process is terminated).
  16. Click the Serial Monitor icon at the right side of the Arduino IDE toolbar again.
    🐛 There is no visual change, but the serial-monitor process is launched again.

Expected behavior

Arduino IDE UI remains fully functional regardless of the timing of closing the Serial Monitor.

Arduino IDE version

2.3.6

Operating system

Windows

Operating system version

11

Additional context

I bisected the regression to 859d29d / #2654 (does not occur when using the build at the previous commit d298b3f).


Originally reported by @KurtE at https://forum.arduino.cc/t/2-3-6-and-2-3-5-closing-serial-monitor-leaves-empty-window-pane-sometimes/1372240

Additional reports

Related

Workaround

Wait for the Arduino IDE window to load fully before closing Serial Monitor.

If you encounter the problem, close the window and then open the sketch again. After reopening the sketch, the Serial Monitor should be back in a functional state again.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: theia Related to the Theia IDE framework labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant