Skip to content

Conversation

@kulmann
Copy link
Contributor

@kulmann kulmann commented Aug 4, 2025

Description

While reviewing opencloud-eu/web-extensions#166 we found out that the order of applications during application loading is not stable. Instead of coming up with a sorting/weight concept we've decided to just maintain a stable order. This PR does that with the least possible performance impact:

  • loading application scripts happens in parallel
  • only building and registering the applications happens one by one, with the order defined by the config.json (this ran in parallel before, but produced a random order)
  • calling the initialize hook on all applications happens in parallel again

How Has This Been Tested?

Manually and with the existing unit tests.

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

Copilot AI review requested due to automatic review settings August 4, 2025 09:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the extension registry ordering issue by ensuring applications are loaded and registered in a stable order. The change separates the loading phase (which remains parallel for performance) from the building/registration phase (which now happens sequentially to maintain order).

Key changes:

  • Split application handling into separate loadApplication and buildApplication functions
  • Application script loading remains parallel but building/registration now happens sequentially
  • Application initialization continues to run in parallel after all apps are built

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/web-runtime/src/container/application/index.ts Splits application handling into separate load and build functions
packages/web-runtime/src/container/bootstrap.ts Updates initialization logic to use new two-phase approach for stable ordering
packages/web-runtime/tests/unit/container/bootstrap.spec.ts Updates test mocks to reflect the new function separation
packages/web-pkg/src/composables/actions/files/useFileActionsToggleHideShare.ts Fixes typo in error message
packages/web-pkg/src/components/SideBar/SideBar.vue Adds conditional rendering logic and styling for sidebar panels
dev/docker/opencloud/csp.yaml Adds OpenStreetMap domain to CSP configuration

@kulmann kulmann force-pushed the fix/extension-registry-stable-order branch from 60ee148 to 280c31c Compare August 4, 2025 09:53
@kulmann kulmann force-pushed the fix/extension-registry-stable-order branch from 280c31c to 62e06e7 Compare August 4, 2025 12:22
@JammingBen JammingBen merged commit 8e0e64e into main Aug 5, 2025
29 checks passed
@JammingBen JammingBen deleted the fix/extension-registry-stable-order branch August 5, 2025 13:07
@openclouders openclouders mentioned this pull request Aug 5, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants