chore: backend page unload changes (#41030)

## 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`](https://github.com/appsmithorg/appsmith/issues/40994)
> [!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.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/15852065162>
> Commit: ca483cf57fe3faba6b74b6122d546250e2c6f4d2
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15852065162&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 24 Jun 2025 14:20:50 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**
  - Added support for triggering actions when a page is unloaded.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
This commit is contained in:
sneha122 2025-06-24 20:01:57 +05:30 committed by GitHub
parent 6fa8196325
commit 959f5108c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,5 +6,6 @@ package com.appsmith.external.models;
public enum RunBehaviourEnum { public enum RunBehaviourEnum {
MANUAL, // Action will only run when manually triggered MANUAL, // Action will only run when manually triggered
ON_PAGE_LOAD, // Action will run when the page loads ON_PAGE_LOAD, // Action will run when the page loads
AUTOMATIC // Action will run automatically (When any of its dependencies change) if the feature flag is enabled AUTOMATIC, // Action will run automatically (When any of its dependencies change) if the feature flag is enabled
ON_PAGE_UNLOAD, // Action will run when the page unloads
} }