Skip to content

Conversation

@JammingBen
Copy link
Contributor

Loads the config a second time authenticated after the user has been loaded.

The acceptance criteria from the story can not be fulfilled because we need routes to load the auth context, and we need apps for the routes. Hence it's not possible to load the apps after the authenticated config. However, this doesn't seem to be needed because the extensions prop of an application is defined as a ref and is therefore reactive. That means checks on a user-specific config can still be made.

Also removes deprecated app properties.

closes #1050

@JammingBen JammingBen self-assigned this Sep 23, 2025
Copilot AI review requested due to automatic review settings September 23, 2025 10:01
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 implements authenticated configuration loading by fetching the config a second time with an authentication token after the user has been loaded. It also removes deprecated application properties to clean up the codebase.

Key changes:

  • Adds authenticated config reload functionality after user authentication
  • Removes deprecated app properties (applicationMenu, isFileEditor, type, quickActions)
  • Refactors TopBar component from Options API to Composition API and removes legacy application menu handling

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/index.ts Adds second config load call with authentication token
packages/web-runtime/src/container/bootstrap.ts Updates announceConfiguration to accept optional token parameter
packages/web-runtime/src/layouts/Application.vue Removes deprecated apps store usage and props passing
packages/web-runtime/src/components/Topbar/TopBar.vue Refactors to Composition API and removes legacy application menu logic
packages/web-pkg/src/composables/piniaStores/apps.ts Removes deprecated applicationMenu property from app registration
packages/web-pkg/src/apps/types.ts Removes deprecated type definitions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Loads the config authenticated so we are prepared when the server sends a user specific config in the future.
@JammingBen JammingBen force-pushed the refactor/load-config-authenticated branch from a3879f2 to 82f9666 Compare September 23, 2025 10:07
We can savely remove them since there should be no app running using these.
@JammingBen JammingBen force-pushed the refactor/load-config-authenticated branch from 82f9666 to 4370a06 Compare September 23, 2025 11:11
}) => {
const request = await fetch(path, { headers: { 'X-Request-ID': uuidV4() } })
const request = await fetch(path, {
headers: { 'X-Request-ID': uuidV4(), ...(token && { Authorization: `Bearer ${token}` }) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking, what about public links? Should we authenticate with public link auth as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm do you think it's necessary? Isn't public basically always anonymous and therefore non-user-specific?

Copy link
Contributor

Choose a reason for hiding this comment

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

True. I guess we can start without and if there'll be good reasons from someone, then we think about it again.

Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

💪

@JammingBen JammingBen merged commit daae715 into main Sep 26, 2025
28 checks passed
@JammingBen JammingBen deleted the refactor/load-config-authenticated branch September 26, 2025 09:28
@openclouders openclouders mentioned this pull request Sep 26, 2025
1 task
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.

Load config.json authenticated

3 participants