Skip to content

Conversation

@srpiatt
Copy link
Contributor

@srpiatt srpiatt commented Nov 19, 2025

  • Change feature, setting, and branding variable import paths to new configutation.svelte.ts path that allows us it use state runes.
  • Pull in /picsure/configuration values and store on the server side once at start with light retry and serve locally on path /api/config.
  • Update tests to use mocked /api/config feature and setting values.
  • Update .env.example and README to use new configuration setting method.
  • Refactor configutation interfaces/types and add to new Configuration Model.
  • Add mapping methods and defaults for branding, settings, and features to Configuraiton model.

Note: I'm branching off of v3 to get the end-2-end folder structure and necause we will release this after the OR feature is merged to main. Will wait to merge until after all that settles and the inevitable merge conflicts are resolved.

* Change feature, setting, and branding variable import paths to new configutation.svelte.ts path that allows us it use state runes.
* Pull in /picsure/configuration values and store on the server side once at start with light retry and serve locally on path /api/config.
* Update tests to use mocked /api/config feature and setting values.
* Update .env.example and README to use new configuration setting method.
* Refactor configutation interfaces/types and add to new Configuration Model.
* Add mapping methods and defaults for branding, settings, and features to Configuraiton model.
@srpiatt srpiatt self-assigned this Nov 19, 2025
@srpiatt srpiatt added the enhancement New feature or request label Nov 19, 2025
@srpiatt srpiatt changed the base branch from v3 to feature/configuration November 20, 2025 14:07
Comment on lines +9 to +14
export const PROJECT_HOSTNAME =
typeof window !== 'undefined'
? `${window.location.origin}/picsure`
: import.meta.env?.VITE_PROJECT_HOSTNAME
? `https://${import.meta.env?.VITE_PROJECT_HOSTNAME}/picsure`
: 'https://nhanes.hms.harvard.edu/picsure';
Copy link
Collaborator

Choose a reason for hiding this comment

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

comment: I need to take a pass at restoring SSR and fixing things like this. I am guessing there is a better way to do this.

Comment on lines -64 to -71
let filtersJson = sessionStorage.getItem('filters');
if (filtersJson) {
let storedFilters = JSON.parse(filtersJson || '[]');
filters.set(storedFilters);
// wait to delete from session storage, in case loading the filters in the line above triggers the session
// storage to be re-written
setTimeout(() => sessionStorage.setItem('filters', '[]'), 500);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this was here to prevent users from having "bad" filters the didnt have access to in BDC and they would get stuck in a log out loop. @ramari16 might remember.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The OR feature is deployed in BDC Prod atm and this code is present and does not nothing - the filterTree is saved to sessionStorage under filterTree and genomif filters as genomicFilters so this will never get triggered. Probably should visit this in OH and see if we need a separate bugfix for this: what reason it was added for and can we replicate it now in BDC prod.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now I have added something similar that I think captures the spirit of what it was functionally doing.

Copy link
Collaborator

@JamesPeck JamesPeck left a comment

Choose a reason for hiding this comment

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

lg2m, some minor suggestions and comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants