Skip to content

FOUR-30918: [Phase 1] tasksPageEtag, Improve task Loading, indexOptimized method to taskController api-1.1 - #8981

Open
pmPaulis wants to merge 22 commits into
developfrom
epic/FOUR-30918-without-octane
Open

pmPaulis wants to merge 22 commits into
developfrom
epic/FOUR-30918-without-octane

Conversation

@pmPaulis

@pmPaulis pmPaulis commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

FOUR-30918 without octane

implement ETag middleware for Tasks page caching
Improve task Loading
indexOptimized method to taskController api-1.1

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

ci:screen-builder:feature/FOUR-30918
ci:vue-form-elements:feature/FOUR-30918
ci:deploy

..

@processmaker-sonarqube

Copy link
Copy Markdown

@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-69d72057ff.engk8s.processmaker.net

@cursor

cursor Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Task inbox behavior and SQL paths change when optimized tasks are enabled; ETag invalidation must stay aligned with permission/UI changes or users may see stale page shells until revalidation.

Overview
Adds Tasks page shell caching via new tasks-page-etag middleware (replacing no-cache on /tasks): a stable weak ETag is computed from user, permissions, config, packages, and related context so matching If-None-Match requests return 304 with Cache-Control: private, must-revalidate. BrowserCache now leaves responses alone when an ETag is already set.

Introduces an optimized tasks list path gated by OPTIMIZED_TASKS_ENABLED (default on): legacy api TaskController@index delegates to V1.1 indexOptimized, with leaner queries (column/field selection, targeted eager loads, optimized nonSystem EXISTS for tokens), a dedicated /api/1.1/tasks/tasksOptimized route, and PMQL error handling returning 422.

Frontend/backend task UX tweaks: optional Axios GET cache/dedup (apiClientCache, wired in bootstrap and next config), deferred UserResourceView on task edit, canUpdateTask for comment-only access to the form, and lazy Monaco on the Data tab.

Feature tests cover Tasks ETag headers/304 and config invalidation; Jest covers the API client cache.

Reviewed by Cursor Bugbot for commit 6e18d74. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread ProcessMaker/Traits/TaskControllerIndexMethods.php
Comment thread ProcessMaker/Traits/TaskControllerIndexMethods.php
Comment thread ProcessMaker/Traits/TaskControllerIndexMethods.php
Comment thread ProcessMaker/Http/Resources/Caching/TasksPageEtag.php
Comment thread resources/views/tasks/edit.blade.php Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 5 potential issues.

There are 10 total unresolved issues (including 5 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2bceead. Configure here.

Comment thread ProcessMaker/Traits/TaskControllerIndexMethods.php
Comment thread ProcessMaker/Traits/TaskControllerIndexMethods.php
Comment thread ProcessMaker/Traits/TaskControllerIndexMethods.php
Comment thread ProcessMaker/Http/Middleware/Etag/TasksPageEtag.php
Comment thread resources/views/tasks/edit.blade.php Outdated
@decisions-sonarqube

Copy link
Copy Markdown

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