Skip to content

[Application Logger] Hide navigation entry when bundle is not installed or enabled (2025.4 backport of #3980) - #4074

Merged
ValeriaMaltseva merged 2 commits into
2025.4from
fix/145-backport-active-bundles-helper-2025.4
Sep 2, 2026
Merged

[Application Logger] Hide navigation entry when bundle is not installed or enabled (2025.4 backport of #3980)#4074
ValeriaMaltseva merged 2 commits into
2025.4from
fix/145-backport-active-bundles-helper-2025.4

Conversation

@ValeriaMaltseva

@ValeriaMaltseva ValeriaMaltseva commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Backport of #3980 (9265ce1) to the 2025.4 LTS line

Part of the fix for pimcore/platform-version#145 (Import Logs tab in Studio never loads data on 2025.4 LTS).

What

  • Loads the active-bundles list at app start (useActiveBundlesLoader, using the existing /pimcore-studio/api/settings/active-bundles endpoint already present on 2025.4).
  • Stores it in the settings slice and exposes the new isBundleActive helper through the SDK (@pimcore/studio-ui-bundle/modules/app).
  • Hides the Application Logger main-navigation entry when PimcoreApplicationLoggerBundle is not installed or enabled, and rejects hidden main-nav items when restoring persisted widgets.

Deviations from the original commit

  • The committed build-dist artifact is excluded — CI regenerates it.
  • The unrelated getAdminSettings SDK export from the original context (2026.x-only) is not included; only isBundleActive is added.

Verified

  • tsc --noEmit clean
  • eslint clean on all touched files
  • full jest suite: 25 suites / 267 tests pass

No new regression test — the original #3980 shipped without one.

Follow-up

Once merged and a 2025.4 npm canary is published, pimcore/data-importer#688 bumps its @pimcore/studio-ui-bundle dependency to consume isBundleActive.

🤖 Generated with Claude Code

…ed or enabled (2025.4 backport of #3980)

Backport of 9265ce1 to the 2025.4 LTS line. Adds the active-bundles
loader and the isBundleActive SDK helper so the Application Logger main
navigation entry (and consumers like the Data Importer import-logs tab)
can be hidden when PimcoreApplicationLoggerBundle is not installed or
enabled.

Excluded from the original commit: the committed build artifact
(build-dist) - CI regenerates it - and the unrelated getAdminSettings
SDK export that only exists on 2026.x.

Ref: pimcore/platform-version#145

(cherry picked from commit 9265ce1)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The backport consistently implements the described bundle-aware navigation and restoration behavior without unresolved issues.

Pull request overview

Backports active-bundle awareness to prevent unavailable Application Logger UI from appearing.

Changes:

  • Loads and stores active bundles at startup.
  • Exposes isBundleActive through the SDK.
  • Hides and avoids restoring inactive-bundle navigation widgets.
File summaries
File Description
assets/js/src/sdk/modules/app/index.ts Exports the bundle helper.
assets/js/src/core/modules/application-logger/index.ts Conditionally hides Application Logger.
assets/js/src/core/modules/app/settings/settings-slice.ts Stores active bundle names.
assets/js/src/core/modules/app/settings/active-bundles-helper.ts Implements fail-closed bundle lookup.
assets/js/src/core/modules/app/base-layout/main-nav/services/main-nav-widget-restorer.ts Rejects hidden persisted widgets.
assets/js/src/core/modules/app/app-loader/loader/active-bundles/loader.tsx Fetches active bundles.
assets/js/src/core/modules/app/app-loader/app-loader.tsx Runs the loader during startup.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ValeriaMaltseva ValeriaMaltseva added this to the 2025.4.14 milestone Sep 2, 2026
ValeriaMaltseva added a commit to pimcore/data-importer that referenced this pull request Sep 2, 2026
On the 2025.4 LTS line the isBundleActive SDK helper only exists once
pimcore/studio-ui-bundle#4074 ships, so the static import made this
branch depend on an unpublished package. Resolve the helper from the
federated app module at runtime instead: on an older studio-ui host the
tab stays offered (previous behavior), on a host with the helper it is
hidden when PimcoreApplicationLoggerBundle is inactive.

Verified against the currently published @pimcore/studio-ui-bundle
^1.0.0 canary: tsc --noEmit clean, eslint clean, rsbuild production
build succeeds.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

@ValeriaMaltseva
ValeriaMaltseva merged commit d461bdb into 2025.4 Sep 2, 2026
15 of 16 checks passed
@ValeriaMaltseva
ValeriaMaltseva deleted the fix/145-backport-active-bundles-helper-2025.4 branch September 2, 2026 14:50
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants