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

fix: Debug button opens the Error tab #33337

Merged
merged 4 commits into from
May 10, 2024
Merged

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented May 9, 2024

Description

Fix the bug where debug button was not working. By using the onDebugTriggerClick we will open the Error tab appropriately while in split screen or full screen

Fixes #31389

Automation

/ok-to-test tags="@tag.IDE"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9025069677
Commit: 976fbbf
Cypress dashboard url: Click here!

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Copy link
Contributor

coderabbitai bot commented May 9, 2024

Walkthrough

Walkthrough

The recent changes streamline the codebase by refactoring the ApiResponseView.tsx component to use a custom hook, useDebuggerTriggerClick, instead of an inline function. Additionally, test descriptions and tags were updated in the Cypress test files for consistency and clarity in the test suite.

Changes

File Change Summary
app/client/src/components/editorComponents/ApiResponseView.tsx Refactored onDebugClick to use useDebuggerTriggerClick custom hook
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js
Updated test descriptions and tags for consistency and clarity

Assessment against linked issues

Objective Addressed Explanation
Enhance debugger errors for missing packages/modules [#31022] The changes do not directly address the enhancement of debugger errors for missing packages/modules as specified in the linked issue.
Address Cypress test failures from PR #29794 [#30378] The modifications are not related to addressing Cypress test failures caused by a specific PR as outlined in the linked issue.

The recent code changes focus on improving code structure and test clarity rather than directly addressing the objectives outlined in the linked issues.

Possibly related issues


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 7c4c247 and 976fbbf.
Files selected for processing (1)
  • app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts (1 hunks)
Additional comments not posted (1)
app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts (1)

2-5: The new imports are correctly added and are essential for the functionality of the tests.


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 testing code 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 testing code 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 testing code.
    • @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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users IDE Navigation Issues/feature requests related to IDE navigation, and context switching Needs Triaging Needs attention from maintainers to triage IDE Pod Issues that new developers face while exploring the IDE Production labels May 9, 2024
Copy link
Contributor

@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.

Actionable comments posted: 0

Out of diff range and nitpick comments (1)
app/client/src/components/editorComponents/ApiResponseView.tsx (1)

Line range hint 261-488: Consider refactoring ApiResponseView to split into smaller components or hooks. This could improve readability and maintainability, especially given the complexity and multiple responsibilities of the current implementation.

@hetunandu hetunandu added the ok-to-test Required label for CI label May 9, 2024
@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Below new test files are written in js 🔴
Expected format ts. Please fix and retrigger ok-to-test:

  1. app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.js

1 similar comment
Copy link

github-actions bot commented May 9, 2024

Below new test files are written in js 🔴
Expected format ts. Please fix and retrigger ok-to-test:

  1. app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.js

@hetunandu hetunandu added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 9, 2024
Copy link
Contributor

@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.

Actionable comments posted: 1

EditorViewMode,
} from "../../../../support/Pages/EditorNavigation";

describe("Api Error Debugger", { tags: ["@tag.IDE"] }, () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The search for the @tag.IDE configuration within the Cypress directory did not yield any results. This suggests that the tag might not be configured or recognized by the test suite. Given this, it's important to ensure that the new tag is properly set up to avoid any issues with test execution.

  • Ensure the @tag.IDE is added to the test configuration: This tag needs to be defined in the appropriate configuration files to be recognized during test runs. This setup is crucial for the proper categorization and execution of tests.
Analysis chain

The change in test categorization tag from @tag.Debugger to @tag.IDE is noted. Ensure this new tag is correctly configured in the test suite to be recognized and executed.



---

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the new tag `@tag.IDE` is recognized by the test suite.

# Test: Search for the tag configuration in the test suite. Expect: Configuration for `@tag.IDE`.
rg --type yaml "@tag.IDE" cypress/

Length of output: 83



Script:

#!/bin/bash
# Description: Locate the directory containing Cypress configurations.

# Search for directories or files that might be related to Cypress configurations.
fd --type d "cypress" /

Length of output: 62



Script:

#!/bin/bash
# Description: Verify that the new tag `@tag.IDE` is recognized by the test suite in the identified directory.

# Search for the tag configuration in YAML files within the identified Cypress directory.
rg --type yaml "@tag.IDE" /home/jailuser/git/app/client/cypress/

Length of output: 64

@hetunandu hetunandu enabled auto-merge (squash) May 10, 2024 00:39
@hetunandu hetunandu merged commit 5701ae1 into release May 10, 2024
42 checks passed
@hetunandu hetunandu deleted the fix/api-pane-debug-button branch May 10, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working High This issue blocks a user from building or impacts a lot of users IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Production
Projects
None yet
2 participants