Skip to content
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

feat: improving UX during run/debug #900

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

sigmaaa
Copy link
Collaborator

@sigmaaa sigmaaa commented Feb 13, 2024

Description

This is an alternative to #806, since the approach with filtering run/debug configurations causes bugs and additional maintenance debt

Fixes # (IEP-957)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Test 1:

  • Select a debug configuration with Run mode and click "Run" -> Popup appears with suitable launch config -> click launch -> verify functionality
    Test 2
  • repeat test 1 for launch configuration with Debug mode
    Test 3
  • delete Debug config -> try to debug launch config -> message that suggesting create a debug config
    Test 4
  • Remove project from debug configuration -> try to launch/debug -> Edit config question provided

Test Configuration:

  • ESP-IDF Version:
  • OS (Windows,Linux and macOS):

Dependent components impacted by this PR:

  • Launch/Debug configuration
  • Run/Debug

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • New Features

    • Enhanced user interaction with new dialogs for selecting debug and launch configurations.
    • Improved UI with additional messages and labels for better clarity during configuration selection.
  • Enhancements

    • Improved responsiveness in handling active launch target changes.
    • Enhanced execution event handling for launch configurations, offering improved user guidance.
  • Documentation

    • Updated UI messages and documentation to align with new features and enhancements.

Copy link

coderabbitai bot commented Feb 13, 2024

Walkthrough

The recent update enhances user interaction with debug and launch configurations in the Eclipse environment, focusing on the Espressif IDF UI. It introduces dialogs for selecting configurations, improves messages for better user guidance, and refines execution handling. The shift from asynchronous to synchronous execution in launch target changes ensures more reliable updates, while new classes and properties enhance the user interface and experience.

Changes

File Path Change Summary
.../idf/ui/LaunchBarListener.java Switched from asyncExec to syncExec for handling activeLaunchTargetChanged; updated conditional logic in update method.
.../idf/ui/dialogs/Messages.java, .../idf/ui/handlers/Messages.java, .../idf/ui/dialogs/messages.properties, .../idf/ui/handlers/messages.properties Added new string constants and messages for debug and launch configuration dialogs and handling.
.../idf/ui/dialogs/SelectDebugConfigDialog.java, .../idf/ui/dialogs/SelectLaunchConfigDialog.java Introduced new dialogs for selecting debug and launch configurations.
.../idf/ui/handlers/RunActionHandler.java New class for handling execution events, including launch mode and configuration selection.

🐇✨
In the land of code and wire,
Changes come as needs aspire.
Dialogs bloom like springtime flowers,
Guiding devs through config towers.
Sync and async, hand in hand,
Making launch sequences grand.
🚀🌟

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 5

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 8aa9b51 and 9d43ce7.
Files ignored due to path filters (1)
  • bundles/com.espressif.idf.ui/plugin.xml is excluded by: !**/*.xml
Files selected for processing (8)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/LaunchBarListener.java (2 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/Messages.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/SelectDebugConfigDialog.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/SelectLaunchConfigDialog.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/messages.properties (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/Messages.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/RunActionHandler.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/messages.properties (1 hunks)
Additional comments: 4
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/Messages.java (1)
  • 23-27: LGTM. New string constants for messages are added correctly.
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/messages.properties (1)
  • 15-19: LGTM. New messages related to missing debug configurations and project selection are added correctly.
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/Messages.java (1)
  • 31-36: LGTM. New string constants for debug and launch configuration dialogs are added correctly.
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/messages.properties (1)
  • 24-29: LGTM. New dialog labels and texts for selecting debug and launch configurations are added correctly.

Copy link
Collaborator Author

@sigmaaa sigmaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self reviewed

@AndriiFilippov
Copy link
Collaborator

@sigmaaa hi !

Tested under:

OS - Windows 10
ESP-IDF: v5.1.2

  • Select a debug configuration with Run mode and click "Run" -> Popup appears with suitable launch config -> click launch -> verify functionality 🟢
  • Repeat test 1 for launch configuration with Debug mode 🟢
  • Delete Debug config -> try to debug launch config -> message that suggesting create a debug config 🟢
  • Remove project from debug configuration -> try to launch/debug -> Edit config question provided 🟢
  • Repeated tests with Multiple Launch Configs / Debug Configs 🟢

🔴 Please, update text with Upper Case for those words and delete extra words.

image

🔴 found a bug related to Launch Config name validation.

Create project A -> create Debug config "A config" -> Edit Debug Config -> Rename to "A" -> there is the warning message only BUT it is still possible to create one.
image

If ignore it - in this particular PR it leads to the bug with empty list:
image

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9d43ce7 and 7754aaf.
Files selected for processing (1)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/messages.properties (1 hunks)
Additional comments: 2
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/messages.properties (2)
  • 24-26: The new dialog messages for selecting a debug configuration are clear and informative. However, ensure that the label text and instructions are consistent with the rest of the application's UI language and terminology.
  • 27-29: The messages for the launch configuration dialog are well-defined. It's important to verify that these messages align with the user's expectations and the application's terminology. Additionally, consider localizing these messages for non-English speakers if the application supports internationalization.

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Feb 28, 2024

@sigmaaa hi !

Tested under:

OS - Windows 10 ESP-IDF: v5.1.2

  • Select a debug configuration with Run mode and click "Run" -> Popup appears with suitable launch config -> click launch -> verify functionality 🟢
  • Repeat test 1 for launch configuration with Debug mode 🟢
  • Delete Debug config -> try to debug launch config -> message that suggesting create a debug config 🟢
  • Remove project from debug configuration -> try to launch/debug -> Edit config question provided 🟢
  • Repeated tests with Multiple Launch Configs / Debug Configs 🟢

🔴 Please, update text with Upper Case for those words and delete extra words.

image

🔴 found a bug related to Launch Config name validation.

Create project A -> create Debug config "A config" -> Edit Debug Config -> Rename to "A" -> there is the warning message only BUT it is still possible to create one. image

If ignore it - in this particular PR it leads to the bug with empty list: image

Hi @AndriiFilippov, fixed messages in the latest commit. The empty list bug happens due to editing the configuration name to an existing one, which should not be allowed. It's a bug from Eclipse CDT, I guess and it will be easier to fix on the CDT side

@AndriiFilippov
Copy link
Collaborator

@sigmaaa hi !

OK, in this case everything LGTM 👍

Copy link
Collaborator

@kolipakakondal kolipakakondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolipakakondal kolipakakondal added this to the v2.13.0 milestone Mar 6, 2024
@kolipakakondal kolipakakondal merged commit 376b484 into master Mar 6, 2024
3 of 4 checks passed
@kolipakakondal kolipakakondal deleted the change_mode_based_on_config branch March 6, 2024 08:30
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 7754aaf and f064ef5.
Files selected for processing (1)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/LaunchBarListener.java (1 hunks)
Additional comments: 3
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/LaunchBarListener.java (3)
  • 54-54: The switch from asynchronous to synchronous execution in the activeLaunchTargetChanged method by using Display.getDefault().syncExec is a significant change. This ensures that the UI thread is used to execute the code block, which is necessary for UI-related operations. However, it's crucial to ensure that this change does not introduce UI freezes or performance issues, especially if the operations performed within the synchronous block are time-consuming or involve network I/O, file I/O, or other blocking operations.

Please verify that the operations performed within the syncExec block are quick and do not significantly impact the UI responsiveness. Consider moving longer operations to background threads if necessary.

  • 51-57: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [76-76]

In the update method, the retrieval of the active launch configuration and project name is handled correctly. However, it's important to ensure that the logic for handling different scenarios, such as JTAG flashing and target mismatches, is thoroughly tested across various project configurations and launch targets.

Please verify that the logic for handling JTAG flashing and target mismatches works as expected in all supported scenarios, including edge cases. Consider adding automated tests to cover these scenarios if not already present.

  • 51-57: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [157-157]

The deleteBuildFolder method uses an IWorkspaceRunnable to perform the deletion of the build folder and clean the SDK configuration. This approach is appropriate for ensuring that these operations are executed within the workspace's resource change notification mechanism, minimizing the risk of conflicts. However, it's crucial to handle exceptions properly to avoid leaving the workspace in an inconsistent state.

Please ensure that all potential exceptions within the IWorkspaceRunnable are handled appropriately, and consider logging or notifying the user in case of failures. This will help maintain the integrity of the workspace and provide better feedback to the user in case of issues.

AndriiFilippov pushed a commit that referenced this pull request Apr 22, 2024
* fix: improving UX during run/debug

* fix: changing dialog messages

---------

Co-authored-by: Kondal Kolipaka <kondal.kolipaka@espressif.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants