[codex] Fix bootstrap loading and HTTPS proxy handling#44
Merged
Conversation
Reviewer's GuideImprove robustness of FDP client bootstrap/entity loading and Docker HTTPS proxying, adding better error handling, normalization of entity configs, and diagnostics while updating nginx and documentation for HTTPS backends. Sequence diagram for FDP client bootstrap and entity config normalizationsequenceDiagram
actor User
participant Browser
participant VueApp_main_ts as VueApp_main_ts
participant ApiConfigs as ApiConfigs
participant FDPBackend as FDPBackend
participant EntitiesStore as EntitiesStore
User->>Browser: Load SPA
Browser->>VueApp_main_ts: Execute main_ts
VueApp_main_ts->>ApiConfigs: configs.getBootstrap()
ApiConfigs->>FDPBackend: GET /configs/bootstrap
FDPBackend-->>ApiConfigs: 200 JSON with resourceDefinitions
ApiConfigs-->>VueApp_main_ts: response
VueApp_main_ts->>VueApp_main_ts: Read response.data
VueApp_main_ts->>Browser: Set globalThis.config from bootstrap
VueApp_main_ts->>VueApp_main_ts: entitySpecs = resourceDefinitions
VueApp_main_ts->>EntitiesStore: createEntitiesModule(createEntityConfigs(entitySpecs))
EntitiesStore->>EntitiesStore: normalizeConfig for each entity
alt Bootstrap request fails
FDPBackend-->>ApiConfigs: Network error or non 2xx
ApiConfigs-->>VueApp_main_ts: error
VueApp_main_ts->>VueApp_main_ts: Log detailed error
VueApp_main_ts->>EntitiesStore: createEntitiesModule(createEntityConfigs([]))
note over EntitiesStore: Store initialized with empty entityConfigs
end
Sequence diagram for entity lookup and UI fallback on missing configsequenceDiagram
actor User
participant Router as VueRouter
participant Store as EntitiesStore
participant EntityViewPage as EntityViewPage
participant EntityView as EntityView
User->>Router: Navigate to /entity/:entity
Router->>EntityViewPage: Mount component
EntityViewPage->>Store: getters.entities/config(entity)
Store->>Store: getConfigFor(entity)
Store->>Store: normalizeConfig(state, config)
alt Config found and normalized
Store-->>EntityViewPage: EntityConfig
EntityViewPage->>EntityViewPage: this.config = EntityConfig
EntityViewPage->>EntityView: Render with config
else Config missing or invalid
Store-->>EntityViewPage: undefined
EntityViewPage->>EntityViewPage: Log missing config and available keys
EntityViewPage-->>User: Show warning alert "Unable to load entity configuration."
end
Class diagram for entity configuration normalization in storeclassDiagram
class EntitySpec {
+string uuid
+string urlPrefix
+string name
}
class EntityConfig {
+EntitySpec entitySpec
+string uuid
+any api
+any parentEntity
+any children
+list createChildrenList(entitySpec, childSpec, graph, meta)
}
class RepositoryConfig {
+EntitySpec entitySpec
+string uuid
+any api
+any parentEntity
+any children
+list createChildrenList(entitySpec, childSpec, graph, meta)
}
class EntityState {
+Record~string, any~ entityConfigs
}
class StoreHelpers {
+getEntitySpec(config) EntitySpec
+getSpecsByUuid(state) Record~string, EntitySpec~
+normalizeConfig(state, config) EntityConfig
+getConfigFor(state, entity) EntityConfig
}
EntitySpec <.. EntityConfig : wraps
EntitySpec <.. RepositoryConfig : wraps
EntityState o--> EntityConfig : raw configs stored
EntityState o--> RepositoryConfig : raw configs stored
StoreHelpers ..> EntityState : uses
StoreHelpers ..> EntityConfig : returns
StoreHelpers ..> RepositoryConfig : returns
StoreHelpers ..> EntitySpec : uses
class EntitiesGetters {
+config(entity) EntityConfig
+configByUuid(uuid) EntityConfig
}
EntitiesGetters ..> StoreHelpers : calls normalizeConfig
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
kburger
reviewed
Apr 20, 2026
kburger
reviewed
Apr 20, 2026
kburger
approved these changes
Apr 21, 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 changed
This PR fixes the local client bootstrap path and the Docker proxy setup used to reach an FDP backend.
It includes:
resourceDefinitionsinto usable entity configs in the storeWhy
Local runs were failing with:
Unable to load entity configuration.The underlying issues were:
http://and forwarded the wrongHostheader, so proxying to an external HTTPS FDP backend failedImpact
https://fdp-test.healthdata.nlValidation
Validated with:
npm run buildFDP_HOST=fdp-test.healthdata.nlFDP_SCHEME=httpsAPI_URL=//config.jsexposesapiURL: '/'/configs/bootstrapreturns FDP bootstrap JSON withresourceDefinitions/serves the SPA index page for HTML requestsSummary by Sourcery
Improve robustness of entity bootstrap handling and Docker HTTPS proxying for the FDP client.
New Features:
Bug Fixes:
Enhancements:
Build:
Deployment:
Documentation: