Skip to content

Conversation

@eiresendez
Copy link
Contributor

@eiresendez eiresendez commented Sep 26, 2025

Issue & Reproduction Steps

  • Buttons with click handlers always executed inside the sandboxed web worker; users needed a way to disable that protective layer for advanced scenarios.
  • The inspector offered no control to enable/disable worker security and the handler runtime couldn’t faithfully reproduce the legacy inline execution path.

Solution

  • Added handlerSecurityEnabled to button configurations (src/form-builder-controls.js:755) and exposed it in the inspector via a toggle below the Click Handler editor (src/components/inspector/button/handler-event-property.js:11).
  • Propagated the flag to rendered buttons (src/mixins/extensions/LoadFieldComponents.js:104) and taught form-button.vue to branch between worker execution and a rebuilt non-worker path that mirrors the old behavior while supporting async handlers and reactive data updates (src/components/renderer/form-button.vue:27).

How to Test

  1. Load a form with a button, toggle Secure Handler Execution on, provide a handler (e.g., alert) and confirm it runs in sandbox mode (worker errors appear when failing).
  2. Toggle the switch off and repeat; handler code should run inline and use async await.

Please add the new .env variable: SCREEN_SECURE_HANDLER_TOGGLE_VISIBLE=

Related Tickets & Packages

ci:deploy
ci:processmaker:defect/FOUR-26678

@cypress
Copy link

cypress bot commented Sep 26, 2025

screen-builder    Run #2065

Run Properties:  status check passed Passed #2065  •  git commit 0ce4576593: FOUR-26678: Bee Smart error with the click handler
Project screen-builder
Branch Review defect/FOUR-26678
Run status status check passed Passed #2065
Run duration 09m 32s
Commit git commit 0ce4576593: FOUR-26678: Bee Smart error with the click handler
Committer Eleazar Resendez
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 19
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 389
View all changes introduced in this branch ↗︎

@eiresendez
Copy link
Contributor Author

The failing specs exercise loop validation and JavaScript default values, which don’t touch the button handler changes in this PR. Both scenarios continue to pass locally, so these CI failures appear unrelated to these updates.
Screenshot 2025-09-26 at 10 37 45 a m
Screenshot 2025-09-26 at 10 38 02 a m

@eiresendez
Copy link
Contributor Author

Same with this new failing spec Watchers list Drag&Drop, which don’t touch the button handler changes in this PR. That scenario pass locally, so these CI failures appear unrelated to the PR updates.

image

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-0c3b79d2a6.engk8s.processmaker.net

@eiresendez eiresendez removed the request for review from devmiguelangel October 9, 2025 17:20
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on October 21

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-0c3b79d2a6.engk8s.processmaker.net

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@nolanpro nolanpro merged commit 550b652 into develop Oct 14, 2025
17 checks passed
@nolanpro nolanpro deleted the defect/FOUR-26678 branch October 14, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants