Skip to content

Conversation

@laveena-en
Copy link
Contributor

@laveena-en laveena-en commented Jul 4, 2025

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Warning

Tests have not run on the HEAD 96981d8 yet


Fri, 04 Jul 2025 11:18:51 UTC

Communication

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

  • Yes
  • No

rahulbarwal and others added 3 commits July 3, 2025 12:24
…e selector (#41074)

## Description
<ins>Problem</ins>

onPageUnload functionality was not consistently triggered during all
types of page navigation in edit mode, leading to potential missed
cleanup or actions when navigating between pages via different UI
elements or programmatic flows.

<ins>Root cause</ins>

Navigation logic was fragmented across multiple components and methods
(button clicks, navigation tabs, page navigator), and direct history
manipulation bypassed centralized handling, preventing reliable
invocation of onPageUnload actions.

<ins>Solution</ins>

This PR handles the integration of onPageUnload functionality with all
page navigation flows in edit mode by centralizing navigation logic
through the navigateToAnotherPage action, enhancing type safety, and
ensuring onPageUnload actions are filtered and executed based on the
current page context.

Fixes #40998
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.JS, @tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/16042398132>
> Commit: 8ea04e6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16042398132&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS, @tag.Sanity`
> Spec:
> <hr>Thu, 03 Jul 2025 06:44:33 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Enhanced page unload actions to only trigger for the current page,
improving accuracy and reliability.

* **Bug Fixes**
* Improved navigation consistency by updating the page switching
mechanism to use a unified action.

* **Tests**
* Added tests to ensure correct filtering of JavaScript actions executed
on page unload.

* **Refactor**
* Streamlined selector logic for better maintainability and performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Updated the entrypoint script to improve the detection and processing of
custom CA certificates. The script now correctly identifies both regular
files and symbolic links with a '.crt' extension, ensuring that all
relevant certificates are included in the keystore. This change enhances
the robustness of the CA certificate setup process.

## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!WARNING]
> Tests have not run on the HEAD
534af3a yet
> <hr>Wed, 02 Jul 2025 09:06:55 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved detection and import of custom CA certificates by including
support for symbolic links, ensuring all relevant `.crt` files are
recognized and imported.
- Enhanced handling of certificate bundles by splitting and importing
individual certificates for better compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
<ins>Problem</ins>

Navigation state was not included when dispatching the
navigateToAnotherPage action, causing the invokedBy property to be unset
and leading to flakiness in the cypress spec:

`app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Selected_Widgets_spec.js`

<ins>Root cause</ins>

The PageEntity component did not pass navigation state, and the
NavigateActionSaga’s pushToHistory function did not effectively handle
navigation with state, leading to incomplete navigation data.

<ins>Solution</ins>

This PR handles updating the PageEntity component to include navigation
state when dispatching the navigateToAnotherPage action, ensuring the
invokedBy property is set to NavigationMethod.EntityExplorer. It also
refactors the pushToHistory function in the NavigateActionSaga to better
support navigation with state, preserving backward compatibility. The
NavigateToAnotherPagePayload type is updated to make state and query
optional for greater flexibility.

Fixes a regression introduced here:
#41074
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/16065286850>
> Commit: 548dd7e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16065286850&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Fri, 04 Jul 2025 05:06:13 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Improved navigation behavior to include additional context about the
source of navigation within the app.

* **Bug Fixes**
* Enhanced compatibility for navigation actions, ensuring consistent
handling of various navigation payload types.

* **Documentation**
* Added detailed comments to clarify supported navigation patterns and
their handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • pg
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

Copy link
Contributor

@RakshaKShetty RakshaKShetty left a comment

Choose a reason for hiding this comment

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

Approved

## Description
Adds spec file and fixture file for on page unload functionality

Fixes #41000
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.JS, @tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/16070917983>
> Commit: 9435c88
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16070917983&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS, @tag.Sanity`
> Spec:
> <hr>Fri, 04 Jul 2025 10:45:13 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Added a comprehensive end-to-end test suite to verify on-page unload
behavior across different application modes and navigation methods.
* Included scenarios to ensure unload handlers trigger correctly and do
not fire redundantly.
  * Confirmed execution of multiple unload handlers in preview mode.

* **Chores**
* Introduced a new application fixture for testing on-page unload
actions with multiple pages, widgets, and JavaScript actions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@yatinappsmith yatinappsmith merged commit 9df3d69 into master Jul 4, 2025
15 of 17 checks passed
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.

6 participants