Commit graph

9026 commits

Author SHA1 Message Date
Shantanu Mane
2547e26909 Fix: plugin DS shows false unsaved state on default branch after git sync
Encrypted fields are omitted from git serialization (credentials are never
stored in git). After a pull, the DSVO is missing those keys. The save-state
check compared state.options (missing encrypted keys) against
normalizedSavedOptions (which fills missing keys from dsDefaults/manifest),
producing a false mismatch on first open for plugin-type datasources.

Fix: normalize state.options with dsDefaults using the same reduction before
the deepEqual comparison, so both sides are symmetric.
2026-05-22 13:39:09 +05:30
Muhsin Shah C P
8b03ddc133
Fix: Use branch isDefault flag for GitSyncModal mode detection (#16491)
* chore: update subproject commit reference in frontend/ee

* feat: add appId parameter validation and fetchAppById method in WorkspaceContextService
2026-05-21 13:23:41 +05:30
gsmithun4
14614bb254 Merge branch 'main' into release/v3.21.35-beta 2026-05-21 13:19:55 +05:30
gsmithun4
30e550a6b3 chore: update version to 3.20.162-lts across all components
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
2026-05-21 00:55:03 +05:30
Shantanu Mane
7a27c4d1c7
fix: pro plan workspace admin blocked from app preview (#16486)
* fix: allow pro plan workspace admins to preview apps

Pro plan has multiEnvironment=false. validateVersionEnvironment blocked any
request with environment_name set — including 'development' — causing a 403
that the frontend mapped to the restricted-preview error page.

Backend: allow 'development' env through even when multi-env is disabled;
only block staging/production to prevent URL manipulation.

Frontend: use featureAccess.multiEnvironment flag in isBasicPlan check
instead of hardcoded plan === 'starter', so pro plan also skips env in the
redirect URL.

* fix: align useAppPreviewLink isBasicPlan check with multiEnvironment flag

Same pattern as AppsRoute — was checking plan === 'starter', missing pro
and basic plans. Now uses !featureAccess.multiEnvironment consistently.

* fix: preserve original URL on app-scoped logout redirect

The app-scoped branch in redirectToLoginPage hardcoded
/applications/:slug/login with no redirectTo, dropping the env/version
preview params. After re-login, AppLoginPage fell back to
/applications/:slug (released-app viewer URL), which 501s for unreleased
apps and shows "App URL Unavailable".

Mirror the workspace branch's behavior: honor avoidRedirection and
preserve the original URL as redirectTo when false. Update logoutAction
to pass false so the runtime Logout event returns the user to the same
preview view after sign-in.

Regression introduced in #15716.

* chore: update package-lock files after lts-3.16 merge

* revert: remove frontend isBasicPlan changes, backend fix is sufficient

Stripping env from the URL on the frontend is the wrong approach — for
multi-env plans, an explicit env param (e.g. staging) must be preserved.
The backend fix (allowing development env through when multi-env is
disabled) is the correct and sufficient fix.

* fix: use multiEnvironment flag to gate env param in preview URLs

Plans without multi-env access (basic, pro, starter) should not include
?env= in preview URLs — it is meaningless for them and was causing the
backend to reject the request.

Plans with multi-env (team, enterprise) preserve the env param so
per-env per-version preview links continue to work correctly.

* fix: use strict equality for multiEnvironment check to preserve env when featureAccess is not yet loaded

---------

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
2026-05-21 00:51:23 +05:30
Adish M
5622094ca0
🚀 chore: update submodules to latest lts-3.16 after auto-merge (#16517)
Co-authored-by: gsmithun4 <3417097+gsmithun4@users.noreply.github.com>
2026-05-21 00:51:05 +05:30
Shantanu Mane
f05ead85e8
Merge pull request #16418 from ToolJet/feat/white-labelling-banner
Add banner image support and update LoginPageRightPanel
2026-05-21 00:48:43 +05:30
Adish M
dcb55da3be
🚀 chore: update submodules to latest main after auto-merge (#16499)
Co-authored-by: johnsoncherian <57667706+johnsoncherian@users.noreply.github.com>
2026-05-20 12:33:41 +05:30
Kavin Venkatachalam
b83e832d48
fix: enhance drag-and-drop functionality by capturing ghost element's bounding rect (#16414) 2026-05-20 12:31:37 +05:30
Shaurya Sharma
cfd5a7171c
fix: Table - Add new rows modal mirrors column widths (#16459)
Some checks are pending
CI / lint-for-frontend (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
2026-05-19 16:15:28 +05:30
Devanshu Rastogi
620539d1bb
Enhance file duplication check with isSameFile utility function (#16463)
* fix: enhance file duplication check in FilePicker by introducing isSameFile utility function

* fix: update FilePicker to use internalId for file management and improve error handling

* refactor: move clearErrorStates function to improve code organization in useFilePicker
2026-05-19 16:14:45 +05:30
Kavin Venkatachalam
33052bcf6d
Feat: Move JS library license check to backend (#16005)
* fix: gate JS library loading on license fetch to fix public/released apps

JS libraries were silently skipped on public and released apps because
featureAccess?.appJsLibraries was still undefined when isComponentLayoutReady
fired. Introduces isLicenseFetched flag and handles fetch errors so the
gate is never blocked indefinitely for unauthenticated users.

* feat: remove license check for JS libraries loading in frontend and backend
2026-05-19 10:51:01 +05:30
Muhsin Shah C P
f3da972089
Feature: Restrict version rename for git-sync orgs (#16370)
* feat: gate version rename restrictions behind git sync; restore non-git-sync behavior

- Add useGitSyncConfig() hook as shared source of truth for isGitSyncEnabled
  and defaultBranch (reads orgGit store, uses correct github_branch field)
- VersionDropdownItem: show branch name as display name for git-sync drafts;
  show fixed description "Latest commit to main will appear here" for git-sync
  drafts; hide "Edit details" only when git sync is ON (non-git-sync keeps
  original cursor/tooltip/disabled behavior for module versions)
- VersionSwitcherButton: header shows "Draft" (not branch name) for git-sync
  draft versions
- VersionManagerDropdown: source isGitSyncEnabled from hook; render
  EditVersionModal only for non-git-sync workspaces
- CreateDraftVersionModal: show version name input only for non-git-sync;
  set fixed draft name (branch name) and description when git sync is ON;
  replace appGit-based effect with useGitSyncConfig hook
- CreateVersionModal: blank name/description pre-fill when git sync ON; fix
  TDZ by moving effectiveIsBranchingEnabled after useStore block; add git-ref
  character validation for git-sync-enabled orgs
- service.ts: block name/description edits on PUBLISHED versions only when
  org-level git sync is enabled (non-git-sync orgs retain edit capability)

* feat: add immutability warning banner to Save version modal for git-sync orgs

Adds an inline info banner "Name and description cannot be edited after saving"
below the description field when git sync is enabled, matching the Figma design.

* fix: move immutability warning banner to top of Save version modal body

Figma (node 2091-172093) shows the banner above the version name input,
not below the description field.

* fix: improve error message for invalid version names in CreateVersionModal

* feat: enforce version name validation across modals and DTOs

* feat: add validation for version names to prevent spaces and special characters

* feat: refactor version selection logic in CreateVersionModal for improved clarity

* feat: enhance version name validation and update API request format

* Fixed draft version case

---------

Co-authored-by: Yukti Goyal <yuktigoyal02@gmail.com>
Co-authored-by: YuktiGoyal02 <100783212+YuktiGoyal02@users.noreply.github.com>
2026-05-19 10:48:09 +05:30
Shantanu Mane
73587834e2
Feat: License Env Mapping (#15873)
* feat: add environment configuration support for Git providers and enhance git sync functionality

* feat: update Git environment constants and integrate OrganizationGitSyncRepository

* feat: add testProviderConnection method to gitSyncService for testing Git provider connections

* chore: remove scanning on module init

* feat: integrate OrganizationEnvRegistryService and reload envConfig on workspace create and slug update

* feat: eload env config on onboarding

* feat: add testProviderConnection method and update LicenseBase for envGitMapping

* fix: handle downgrade path for env registry

* fix flaky case in granular access

* uncommented changes

* feat: update .gitignore to include additional environment files

* feat: refactor organization environment handling and remove deprecated service

* feat: implement Git environment registry service and refactor organization environment handling

* feat: rename envGitMapping to workspaceEnv across licensing module

* chore: remove unnecessary try-catch

* refactor(org-env): update interfaces — remove callback contract, add ensureResolved

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: remove reload-on-org-event, swap bootstrap init order

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(org-env): add getResolvedOrganizationIds() to interface, CE stub, and test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: improve assertions in getResolvedOrganizationIds() test

* feat: refactor GitEnvRegistryService import paths and add new service implementation

* feat: add applyLicenseToResolvedOrgs method to IGitEnvRegistryService and GitEnvRegistryService

* refactor: replace GitEnvRegistryService with GitSyncEnvUtilService and update related references

* feat: add use_env_config column to organization_git_sync and remove env_git_provider column

* refactor: remove EncryptionModule import and update OrganizationEnvModule imports

* feat: introduce OrganizationEnvUtilService and update OrganizationEnvModule to utilize it

* feat: add updateEnvLicenseSetting method and related feature key for environment license settings

---------

Co-authored-by: Yukti Goyal <yuktigoyal02@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 10:46:15 +05:30
Manish Kushare
1f64c91b7c
fix: align column text based on horizontal alignment setting in TableHeader (#16260) 2026-05-19 10:37:50 +05:30
Manish Kushare
9d775b86dc
hide preview overlay when currentValue is empty or undefined (#16327) 2026-05-19 10:35:06 +05:30
gsmithun4
b13e30c880 Merge branch 'main' into release/v3.21.34-beta 2026-05-18 23:01:11 +05:30
gsmithun4
57b0af3007 chore: update version to 3.20.161-lts across all components
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
2026-05-18 22:52:41 +05:30
Shaurya Sharma
fca02e9fc3
Removed fn condition from updateDependencyValues for SetExposedVariables (#16410) 2026-05-18 22:41:40 +05:30
Shaurya Sharma
38e064edb0
fix: AppCanvas - reset scroll to top on page switch (#16457)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:41:19 +05:30
Shaurya Sharma
ff697ed997
fix: Modal - release canvas scroll lock when modal unmounts during page switch (#16456) 2026-05-18 22:40:59 +05:30
Shaurya Sharma
3a623cebc6
fix: Inspector - retain "all editable" toggle when list is empty (#16419)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:38:26 +05:30
Shaurya Sharma
8631b6d9c8
feat: QueryManager - add fx and custom message for query confirmation (#16320)
* feat: QueryManager - add fx and custom message for query confirmation

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Minor fix

* Design update

* Yes button same size as cancel button

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 22:33:39 +05:30
Adish M
468bd53c9f
🚀 chore: update submodules to latest main after auto-merge (#16460)
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Co-authored-by: gsmithun4 <3417097+gsmithun4@users.noreply.github.com>
2026-05-18 22:18:55 +05:30
Rudhra Deep Biswas
5aff8282f8
Fix (#16454) 2026-05-18 22:16:57 +05:30
Ganesh Kumar
23dfa559f7
TJDB join query snake case to camel case fix (#16408) 2026-05-18 22:16:31 +05:30
gsmithun4
c5646df8ce Merge branch 'main' into release/v3.21.33-beta 2026-05-15 00:56:36 +05:30
gsmithun4
62ebed70a3 chore: update version to 3.20.160-lts across all components
Some checks failed
CI / build (push) Has been cancelled
Deploy Storybook to Netlify / deploy-storybook (push) Has been cancelled
CI / lint-for-plugins (push) Has been cancelled
CI / unit-test (push) Has been cancelled
CI / lint-for-frontend (push) Has been cancelled
CI / lint-for-server (push) Has been cancelled
CI / e2e-test (push) Has been cancelled
2026-05-15 00:44:01 +05:30
abhijeet760
7a10516ae4
improve openai anthropic gemini (#16296)
* improve openai anthropic gemini

* moved to dynamic form v2

* fix: Not able to add V2 plugins

* fix the overflowing of test connection error

---------

Co-authored-by: Siddharthpl <siddharthpundir73@gmail.com>
Co-authored-by: Rudhra Deep Biswas <rudra21ultra@gmail.com>
Co-authored-by: Ganesh Kumar <ganesh8056234@gmail.com>
2026-05-14 23:17:39 +05:30
Johnson Cherian
739c7c9cbe
chore: update version to 3.20.159-lts across all components (#16420) 2026-05-14 20:00:18 +05:30
Adish M
3dd0523ed6
🚀 chore: update submodules to latest lts-3.16 after auto-merge (#16417)
Some checks are pending
CI / lint-for-plugins (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
Co-authored-by: johnsoncherian <57667706+johnsoncherian@users.noreply.github.com>
2026-05-14 17:34:47 +05:30
Swathi Hameed
8bcfecfd28
Feat/ai datasource/mysql mssql (#16403)
* generate query support for mysql and mssql

* chore: update submodules

* chore: frontend submodule update

---------

Co-authored-by: johnsoncherian <johnsonc.dev@gmail.com>
2026-05-14 17:32:44 +05:30
Manish Kushare
f7fa4ecbfa
fix: disable z-index override for Firefox popover styling (#16412)
* fix: disable z-index override for Firefox popover styling

* fix: remove unused Firefox-specific z-index styles from popover
2026-05-14 17:30:41 +05:30
Shaurya Sharma
1a4b292831
feat: AppCanvas - hidden widget collapses to 0px per Figma update (#16361)
* feat: AppCanvas - hidden widget collapses to 0px per Figma update

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: AppCanvas - stack overlapping hidden widgets in drop order

* Fallback for collapseOnhide components with top alignment

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 17:17:39 +05:30
Adish M
999950ada7
🚀 chore: update submodules to latest lts-3.16 after auto-merge (#16415)
Co-authored-by: johnsoncherian <57667706+johnsoncherian@users.noreply.github.com>
2026-05-14 16:54:18 +05:30
Nishidh Jain
439f3498a0
feat: Show go back to modules instead of go back to apps action on Module Builder page's logo popup menu (#16406) 2026-05-14 16:52:13 +05:30
Johnson Cherian
f0d5352545
Update version to 3.20.158-lts across all components (#16409)
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
2026-05-13 20:43:44 +05:30
Akshay
6fbbe5b536
chore: bump submodule pointers to main after lts-beta-merge (#16405)
Some checks failed
CI / build (push) Has been cancelled
CI / lint-for-frontend (push) Has been cancelled
CI / lint-for-plugins (push) Has been cancelled
CI / lint-for-server (push) Has been cancelled
CI / unit-test (push) Has been cancelled
CI / e2e-test (push) Has been cancelled
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 18:34:38 +05:30
Akshay Sasidharan
a262eec639 chore: bump version to 3.21.32-beta
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 18:08:51 +05:30
Akshay Sasidharan
821b57b16d Merge branch 'release/lts-beta-merge' of github.com:ToolJet/ToolJet into release/lts-beta-merge 2026-05-13 17:55:33 +05:30
Akshay Sasidharan
de2e2255d9 Merge remote-tracking branch 'origin/lts-3.16' into release/lts-beta-merge 2026-05-13 17:53:52 +05:30
Rudhra Deep Biswas
c6545e7fbb
Save Button Googlesheets (#16395)
* save btn googlesheet

* fixed instance setting ui flaky case

* sus

* revert

---------

Co-authored-by: Yukti Goyal <yuktigoyal02@gmail.com>
Co-authored-by: YuktiGoyal02 <100783212+YuktiGoyal02@users.noreply.github.com>
2026-05-13 17:41:53 +05:30
Akshay
5f180c91c3
Feature: Add Intercom marketplace plugin (#15953)
* feat: add QuickBooks Online marketplace plugin

Add a QuickBooks Online Accounting API plugin with OAuth2 authentication,
86 API operations via OpenAPI spec, and @spec/ convention for DB-stored
spec files. Includes server-side spec hosting infrastructure and a fix
for duplicate footer rendering on marketplace OAuth2 datasource config pages.

* chore: update submodule pointers

* fix: use parent transaction for spec file DB operations

storeSpecFiles and updateSpecFilesForReload were wrapping each file
insert/update in a separate dbTransactionWrap call, creating independent
transactions instead of participating in the outer install/upgrade
transaction. This could leave orphan File entities if the plugin save
failed. Now uses the parent manager directly.

* fix: use sandbox API URL, remove testConnection, add state param

- Default to sandbox-quickbooks.api.intuit.com (development apps require it)
- Remove testConnection and customTesting (OAuth flow validates connection)
- Add state parameter to auth URL (required by QuickBooks)
- Add access_token validation guard in run()
- Preserve existing refresh_token if provider doesn't reissue
- Remove environment dropdown and company_id from manifest
- Add debug logging for OAuth flow tracing

* feat: add Intercom marketplace plugin and fix path-level param rendering

Add Intercom API v2.15 marketplace plugin with 162 endpoints across 30
resource groups using react-component-api-endpoint with @spec/ convention.

Fix ApiEndpointInput widget to merge path-level OpenAPI parameters into
each operation's parameters per the OpenAPI 3.0 inheritance rule. This
ensures path params declared at the path-item level (used by Intercom,
AWS, Stripe, and many others) are rendered as input fields.

* fix: set customTesting to false so framework renders Test Connection button

customTesting: false tells the framework to render its standard Test
Connection button which calls testConnection() on the backend.
customTesting: true (counterintuitively) hides the standard button,
expecting the plugin to provide custom testing UI.

* Chore: Migrate all OpenAPI plugins from external URLs to @spec/ convention (#15904)

* chore: migrate all OpenAPI plugins from external URLs to @spec/ convention

Downloads 78 OpenAPI spec files from external URLs (7 plugins from
adishM98/base-repo-testing personal repo, 2 from official provider repos,
1 from S3) and stores them locally in openapi-specs/ directories. Updates
all operations.json files to use @spec/<kind>/<name> references, which
are resolved to DB-stored specs at install time.

Eliminates runtime dependency on external GitHub repos for spec rendering.

* chore: remove one-time spec migration script

* chore: update package-locks for intercom plugin

Adds @tooljet-marketplace/intercom workspace links and dependency
entries that were missing from the prior commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: update intercom plugin description

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 17:41:38 +05:30
Rudhra Deep Biswas
9bf3fa681d
Encrpyted field check in DYnamic Form (#16404) 2026-05-13 17:23:14 +05:30
Akshay Sasidharan
8b89ed7853 Merge remote-tracking branch 'origin/main' into release/lts-beta-merge
# Conflicts:
#	.version
#	frontend/.version
#	frontend/ee
#	server/.version
#	server/ee
#	server/src/modules/external-apis/dto/index.ts
#	server/src/modules/external-apis/module.ts
2026-05-13 15:18:04 +05:30
Akshay Sasidharan
8eb139882b Merge remote-tracking branch 'origin/lts-3.16' into release/lts-beta-merge
# Conflicts:
#	.version
#	frontend/.version
#	frontend/ee
#	frontend/src/_components/DynamicFormV2.jsx
#	server/.version
#	server/ee
#	server/src/modules/external-apis/ability/index.ts
#	server/src/modules/external-apis/constants/feature.ts
#	server/src/modules/external-apis/constants/index.ts
#	server/src/modules/external-apis/dto/index.ts
#	server/src/modules/external-apis/module.ts
#	server/src/modules/external-apis/types/index.ts
2026-05-13 15:12:33 +05:30
Shaurya Sharma
85a11a51a4
fix: Module - embedded canvas inherits host app background (#16389)
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:33:21 +05:30
Adish M
e098befc1a
🚀 chore: update submodules to latest main after auto-merge (#16393)
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Co-authored-by: akshaysasidrn <11629675+akshaysasidrn@users.noreply.github.com>
2026-05-13 11:45:06 +05:30
Akshay
b695d8e43c
Merge pull request #16339 from ToolJet/refactor/optimisations
Fix: Performance optimisations and fixes


## 🔀 Changes

**`/api/apps` (dashboard read)**
- Killed 3 N+1 sources (per-app module lookup, count query rebuilding heavy join, hidden `SELECT AppVersion` per row).
- Added opt-out so list endpoints skip per-entity hydration they never read.
- Dropped read-only transaction wrap.

**Workspace pull / branch create (write path)**
- Per-app loop → 100-entry batched orchestrator.
- Bulk INSERT for folders, DSV options, app_versions; bulk UPDATE for `pulled_at`.
- Error isolation now per batch (100 apps), not per row.
- Read-only branch lookups skip transactions.

**`DELETE /api/workspace-branches/:id` (branch deletion)**
- 3-task batched flow → 1 task with row lock + 2 bulk DELETEs (cascade does the rest).
- Removed dead task that matched zero rows due to wrong filter column.
- Remote git delete moved to fire-and-forget post-commit — DB no longer waits on network.
- Row lock kills retry race; concurrent click 404s instead of spawning a duplicate job.
- Net: **50+ DELETEs → 2 bulk statements**; txn span **1–8 min → sub-second**; retry race blocked.

**`POST /api/workspace-branches` (branch creation — extras)**
- Pull entry points (apps / modules / data sources) muzzled against subscriber N+1.
- DSV / DSVO / credential clone: per-row save loop → 3 chunked bulk INSERTs.
- Tag-flow snapshot (`snapshotDataSourcesForVersion`): same bulk pattern, scales linearly with DS count instead of multiplicatively.
- Trace: **~8.1 s → ~2-3 s** on dev workspace; prod-scale re-verification pending.

**`/api/folder-apps` (cartesian + AppVersion N+1)**
- Cartesian LEFT JOIN → flat two-step fetch + JS stitch (old path materialised 60k+ row stacks).
- Permission / branch predicates extracted into pure helpers (CE + EE).
- Muzzled `AppVersion` subscriber on this path.
- Dropped read-only transaction wrap; mutating endpoints keep theirs.

**`AppsSubscriber` N+1 across every authenticated endpoint**
- Permission resolution loaded ~all org apps → subscriber fired hidden `SELECT AppVersion` per row (~1.1k queries per request).
- Wrapped at permission-resolution source — single change kills N+1 globally for every endpoint behind the feature guard.
- Per-method wraps added on hot read paths as defence in depth.

**Dashboard duplicate fetches**
- Killed 3 duplicate-fetch causes (filter effect echo, eager mount + chained fetch on deep-link, branch-store hydration). Folder click 2× → 1× `/api/apps`; deep-link mount 2× → 1× of each endpoint.
- `/api/git-sync/:id/status` deduped — read from existing store.
- `/api/license/access` deduped on app open — reuse cache.

**Workspace settings → Groups page**
- `addable-apps` / `addable-data-sources` / `addable-folders`: switched to raw query — skips entity hydration + subscriber, projects only the columns the response needs.
- `granular-permissions` getAll: 4-branch nested cartesian → two-step fetch + JS stitch.
- Users + addable-users paths muzzled against subscriber N+1.
- Dropped redundant transaction wraps on all read paths.
- Fixed pre-existing broken return type signature on the addable endpoints.

**Read-path transaction drops (cross-cutting)**
- `AbilityService.resourceActionsPermission` — called 3× per `/api/apps`. Serial p50 **93 ms → 69 ms (-26%)**, p95 **-40%**.
- `FolderAppsUtilService.getAppsFor` — read-only path used by `/api/apps?folder=`.

**Cross-cutting rule: `dbTransactionWrap` decision**
- Wrap presence mirrors write presence. Read-only sites no longer pay BEGIN/COMMIT overhead. Sites with any write (even conditional) keep their wraps.

**ModuleViewer parent-env wiring restore (#15992 regression)**
- Embedded `ModuleViewer` now passes the parent app's live `parentEnvironmentId` to the child `<Viewer>` (was passing the baked `properties.moduleEnvironmentId`).
- Resolves: module on feature branch picking org-default env, RestAPI queries inside module not tracking parent env, *"Invalid environment"* toast on imported app from stale source-instance env UUID.
- Root cause: `release/v3.21.30-beta` back-merge to `main` (PR #454) carried a stale padding-feature branch that overwrote the original fix wiring (`cbc0df0`).
- Submodule PR: ToolJet/ee-frontend#457.

**Module save/promote — central pin resolver + strict policy (#16339)**
- 4-clause OR JOINs in `checkDraftModulesInApp` + `checkModulesPromotableToEnvironment` → single `resolveAllModuleViewersForVersion` helper. Mirrors runtime `resolveModuleRef` priority. Reports per-pin match kind: `pin-hit` / `orphan-fallback` / `unpinned-fallback` / `no-row`.
- Candidate-rows query scoped: consumer + default branch, `is_stub=false`. Dedupe key falls back to `componentId` for malformed components.
- **Save blocks**: `no-row`, `orphan-fallback`, `unpinned-fallback`, `pin-hit + DRAFT`.
- **Promote blocks**: same set, plus `pin-hit` resolved row below target env priority.

**Module save/promote — user-friendly toasts**
- Per-matchKind messages match what user sees in pin UI. Dropped `stale` / `current version` (terms not in UI) and `Save and promote module first` (two actions, one toast).
- Save toasts:
  - `no-row` → `Module "X" has no saved version yet. Save the module first.`
  - `orphan-fallback` → `Module "X" pin is invalid. Pin a saved version.`
  - `unpinned-fallback` → `Module "X" has active draft pinned. Pin a saved version.`
  - `pin-hit + DRAFT` → `Module "X" version "v-name" is still in draft. Save the module first.`
- Promote toasts: same set, plus `pin-hit + envPriority < target` → `Module "X" version "v-name" not promoted to {env} yet.`
2026-05-13 11:42:55 +05:30
Adish M
07728b235e
🚀 chore: update submodules to latest lts-3.16 after auto-merge (#16391)
Some checks are pending
CI / build (push) Waiting to run
CI / lint-for-plugins (push) Blocked by required conditions
CI / lint-for-frontend (push) Blocked by required conditions
CI / lint-for-server (push) Blocked by required conditions
CI / unit-test (push) Blocked by required conditions
CI / e2e-test (push) Blocked by required conditions
Deploy Storybook to Netlify / deploy-storybook (push) Waiting to run
Co-authored-by: gsmithun4 <3417097+gsmithun4@users.noreply.github.com>
2026-05-13 09:18:46 +05:30