VIDSOL-501: Embed config.json into build#382
Merged
Conversation
- Removed appConfig context and its associated actions, hooks, and types. - Updated tests to eliminate dependencies on appConfig context. - Refactored components to use environment variables for configuration instead of appConfig. - Adjusted test providers to reflect the removal of appConfig context. - Enhanced environment variable setup for consistent testing across environments.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the runtime config.json/appConfig store approach and moves the application’s feature/config flags into Vite environment variables (sourced via vcrBuild.env.sh), updating the frontend code and tests to read from env instead of an AppConfig context.
Changes:
- Removed
frontend/src/stores/appConfig(store, actions, hooks, types) and deletedfrontend/public/config.json. - Expanded
frontend/src/env.tswith feature flags + addedpartialUpdate/resetto support tests, then refactored components/hooks to useenv.VITE_*. - Updated test providers and many unit tests to stop depending on the appConfig provider wrapper; adjusted scripts/Nx targets to source
vcrBuild.env.sh.
Reviewed changes
Copilot reviewed 105 out of 106 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vcrBuild.env.sh | Adds VITE_* config flags used by the frontend. |
| scripts/testFrontend.ts | Sources vcrBuild.env.sh before running vitest/nx tests. |
| frontend/src/test/setup.ts | Resets env between tests for isolation. |
| frontend/src/test/providers/makersIndex.ts | Removes appConfig provider wrapper export. |
| frontend/src/test/providers/makeTestProvider.ts | Removes appConfig provider + updates dependency graph. |
| frontend/src/test/providers/makeAppConfigProviderWrapper.ts | Removes appConfig provider wrapper (deleted). |
| frontend/src/stores/appConfig/types/index.ts | Removes appConfig types barrel (deleted). |
| frontend/src/stores/appConfig/types/WaitingRoomSettings.ts | Removes type (deleted). |
| frontend/src/stores/appConfig/types/VideoSettings.ts | Removes type (deleted). |
| frontend/src/stores/appConfig/types/MeetingRoomSettings.ts | Removes type (deleted). |
| frontend/src/stores/appConfig/types/AudioSettings.ts | Removes type (deleted). |
| frontend/src/stores/appConfig/types/AppConfig.ts | Removes type (deleted). |
| frontend/src/stores/appConfig/index.tsx | Removes store export entrypoint (deleted). |
| frontend/src/stores/appConfig/hooks/useSuspenseUntilAppConfigReady/useSuspenseUntilAppConfigReady.ts | Removes suspense hook (deleted). |
| frontend/src/stores/appConfig/hooks/useSuspenseUntilAppConfigReady/useSuspenseUntilAppConfigReady.test.tsx | Removes tests for removed hook (deleted). |
| frontend/src/stores/appConfig/hooks/useSuspenseUntilAppConfigReady/index.ts | Removes barrel export (deleted). |
| frontend/src/stores/appConfig/hooks/useShouldShowParticipantList.ts | Removes selector hook (deleted). |
| frontend/src/stores/appConfig/hooks/useIsMicrophoneControlAllowed.ts | Removes selector hook (deleted). |
| frontend/src/stores/appConfig/hooks/useIsMeetingChatAllowed.ts | Removes selector hook (deleted). |
| frontend/src/stores/appConfig/hooks/useIsMeetingCaptionsAllowed.ts | Removes selector hook (deleted). |
| frontend/src/stores/appConfig/hooks/useIsCameraControlAllowed.ts | Removes selector hook (deleted). |
| frontend/src/stores/appConfig/hooks/useIsBackgroundEffectsAllowed.ts | Removes selector hook (deleted). |
| frontend/src/stores/appConfig/hooks/index.ts | Removes hooks barrel (deleted). |
| frontend/src/stores/appConfig/helpers/mergeAppConfigs.ts | Removes merge helper (deleted). |
| frontend/src/stores/appConfig/helpers/index.ts | Removes helpers barrel (deleted). |
| frontend/src/stores/appConfig/helpers/defaultAppConfig.ts | Removes default config (deleted). |
| frontend/src/stores/appConfig/appConfigStore.ts | Removes store definition (deleted). |
| frontend/src/stores/appConfig/appConfigStore.spec.tsx | Removes store tests (deleted). |
| frontend/src/stores/appConfig/appConfig$.ts | Removes store “$” facade (deleted). |
| frontend/src/stores/appConfig/actions/updateAppConfig.ts | Removes action (deleted). |
| frontend/src/stores/appConfig/actions/loadAppConfig.ts | Removes fetch-from-config.json action (deleted). |
| frontend/src/pages/WaitingRoom/WaitingRoom.tsx | Uses env for waiting-room device selection. |
| frontend/src/pages/WaitingRoom/WaitingRoom.spec.tsx | Updates tests to set env flags instead of appConfig context. |
| frontend/src/pages/MeetingRoom/MeetingRoom.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/hooks/tests/useScreenShare.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/hooks/tests/useCollectBrowserInformation.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/env.ts | Adds many VITE_* flags + test-time mutation/reset helpers. |
| frontend/src/components/WaitingRoom/MicButton/MicButton.tsx | Gates rendering via env flag. |
| frontend/src/components/WaitingRoom/MicButton/MicButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/WaitingRoom/ControlPanel/ControlPanel.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/WaitingRoom/CameraButton/CameraButton.tsx | Uses env for camera-control gating. |
| frontend/src/components/WaitingRoom/CameraButton/CameraButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/WaitingRoom/BackgroundEffects/BackgroundEffectsDialog/BackgroundEffectsDialog.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/WaitingRoom/BackgroundEffects/BackgroundEffectsButton/BackgroundEffectsButton.tsx | Uses env for background-effects gating. |
| frontend/src/components/WaitingRoom/BackgroundEffects/BackgroundEffectsButton/BackgroundEffectsButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/SoundTest/SoundTest.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/ScreenSharingButton/ScreenSharingButton.tsx | Uses env for screenshare gating. |
| frontend/src/components/ScreenSharingButton/ScreenSharingButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/VideoDevices/VideoDevices.tsx | Uses env for meeting-room device selection gating. |
| frontend/src/components/MeetingRoom/VideoDevices/VideoDevices.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/UnreadMessagesBadge/UnreadMessagesBadge.tsx | Uses env for chat gating. |
| frontend/src/components/MeetingRoom/UnreadMessagesBadge/UnreadMessagesBadge.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/ToolbarOverflowMenu/ToolbarOverflowMenu.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/ToolbarOverflowButton/ToolbarOverflowButton.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/Toolbar/Toolbar.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/ReduceNoiseTestSpeakers/ReduceNoiseTestSpeakers.tsx | Uses env for ANS gating. |
| frontend/src/components/MeetingRoom/ReduceNoiseTestSpeakers/ReduceNoiseTestSpeakers.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/ParticipantListItemMenu/ParticipantListItemMenu.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/ParticipantListButton/ParticipantsListButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/ParticipantListButton/ParticipantListButton.tsx | Uses env for participant list gating. |
| frontend/src/components/MeetingRoom/ParticipantList/ParticipantList.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/OutputAudioDevices/OutputDevices.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/OutputAudioDevices/OutputAudioDevices.tsx | Uses env for meeting-room device selection gating. |
| frontend/src/components/MeetingRoom/MutingDialog/MutingDialog.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/LayoutButton/LayoutButton.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/InputAudioDevices/InputAudioDevices.tsx | Uses env for meeting-room device selection gating. |
| frontend/src/components/MeetingRoom/InputAudioDevices/InputAudioDevices.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/EmojiGridButton/EmojiGridButton.tsx | Uses env for emojis gating. |
| frontend/src/components/MeetingRoom/EmojiGridButton/EmojiGridButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/DeviceSettingsMenu/DeviceSettingsMenu.tsx | Uses env for background-effects gating. |
| frontend/src/components/MeetingRoom/DeviceSettingsMenu/DeviceSettingsMenu.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/DeviceControlButton/DeviceControlButton.tsx | Uses env for mic/camera gating. |
| frontend/src/components/MeetingRoom/DeviceControlButton/DeviceControlButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/ChatInput/ChatInput.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/ChatButton/ChatButton.tsx | Uses env for chat gating. |
| frontend/src/components/MeetingRoom/ChatButton/ChatButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/Chat/Chat.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/CaptionsButton/CaptionsButton.tsx | Uses env for captions gating. |
| frontend/src/components/MeetingRoom/CaptionsButton/CaptionsButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/MeetingRoom/AudioIndicator/AudioIndicator.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/MeetingRoom/ArchivingButton/ArchivingButton.tsx | Uses env for archiving gating. |
| frontend/src/components/MeetingRoom/ArchivingButton/ArchivingButton.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/HiddenParticipantsTile/HiddenParticipantsTile.tsx | Uses env for participant list gating. |
| frontend/src/components/HiddenParticipantsTile/HiddenParticipantsTile.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/components/BackgroundEffects/EffectOptionButtons/EffectOptionButtons.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/BackgroundEffects/BackgroundGallery/BackgroundGallery.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/BackgroundEffects/BackgroundEffectsLayout/BackgroundEffectsLayout.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/components/BackgroundEffects/BackgroundEffectOptions/BackgroundEffectOptions.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/Context/tests/RoomContext.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/Context/SessionProvider/session.tsx | Reads default layout mode from env instead of appConfig. |
| frontend/src/Context/SessionProvider/session.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/Context/PublisherProvider/usePublisherOptions/usePublisherOptions.tsx | Uses env for join defaults and resolution. |
| frontend/src/Context/PublisherProvider/usePublisherOptions/usePublisherOptions.spec.tsx | Updates tests to use env.partialUpdate. |
| frontend/src/Context/PublisherProvider/usePublisher/usePublisher.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/Context/PreviewPublisherProvider/usePreviewPublisher/usePreviewPublisher.tsx | Uses env for default resolution. |
| frontend/src/Context/PreviewPublisherProvider/usePreviewPublisher/usePreviewPublisher.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/Context/BackgroundPublisherProvider/useBackgroundPublisher/useBackgroundPublisher.spec.tsx | Removes appConfig provider usage in test wrapper. |
| frontend/src/AppContextProvider.tsx | Removes appConfig provider wrapper from app root. |
| frontend/src/App.tsx | Removes appConfigValue prop plumbing. |
| frontend/public/config.json | Removes config.json (deleted). |
| frontend/project.json | Attempts to source vcrBuild.env.sh for multiple targets; updates test target correctly. |
| frontend/.env.example | Removes example env file (deleted). |
| docs/TESTING.md | Updates docs to reflect removal of appConfig test wrapper. |
| config.example.json | Removes example config.json (deleted). |
johnny-quesada-developer
requested changes
Feb 24, 2026
…de validation in session provider
- Changed imports of environment variables from default to named imports across multiple components and tests. - Updated environment variable keys to remove the VITE_ prefix for consistency. - Refactored the Env class to streamline parsing and initialization of environment variables. - Added an ErrorPage component to handle unrecoverable errors gracefully. - Enhanced localization files with error messages for better user experience. - Updated tests to reflect changes in environment variable structure and ensure proper functionality.
johnny-quesada-developer
previously approved these changes
Feb 25, 2026
Contributor
Author
|
vcr:deploy |
Hossein-Movahed
previously approved these changes
Feb 25, 2026
Contributor
Author
|
vcr:deploy |
Contributor
❌ Deployment to VCR FailedCommit: |
Contributor
Author
|
vcr:deploy |
Contributor
❌ Deployment to VCR FailedCommit: |
Contributor
|
General QA looks good. |
sharad-srivastava2
previously approved these changes
Mar 4, 2026
cb1876b
Hossein-Movahed
approved these changes
Mar 4, 2026
sharad-srivastava2
approved these changes
Mar 4, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What is this PR doing?
How should this be manually tested?
General testing of appConfig (now, you can modify it in vcrBuild.env.sh)
What are the relevant tickets?
A maintainer will add this ticket number.
Resolves VIDSOL-501
Checklist
[ ] Branch is based on
develop(notmain).[ ] Resolves a
Known Issue.[ ] If yes, did you remove the item from the
docs/KNOWN_ISSUES.md?[ ] Resolves an item reported in
Issues.If yes, which issue? Issue Number?