Repository navigation
Admin page: pick an enumerable setting's value from its choices - #93
Merged
Merged
Conversation
A setting can declare the values it takes (`choices` in lib/settings.ts), and /admin offers them in place of a text field: a dropdown for FEDERATION_HIDE_SQL and STUDY_ALLOW_RESTRICTED (off / on) and LOOPBACK_PEER (none / a / b), checkboxes for AGGREGATE_ONLY_INSTANCES (any of a and b, saved as a comma-separated list). A connection is offered under the name this deployment gives it (e.g. "b, GENIE"). The values are still checked on save as before; the other settings keep their text field. Verified in Chromium on next dev: the dropdown and checkboxes open and toggle with no console errors. Typecheck, eslint and test:db (76) pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3ezTXZQm7eQwpY7oWgS4D
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Follow-up to #83.
What
On
/admin, a federation setting with a small fixed set of values is edited by picking one instead of typing it:FEDERATION_HIDE_SQL,STUDY_ALLOW_RESTRICTEDLOOPBACK_PEERAGGREGATE_ONLY_INSTANCESA connection is offered under the name this deployment gives it (e.g. "b, GENIE"). The other settings (labels, peer URLs, patient-level rules, study ids) keep their text field.
How
SettingSpecgainschoices(andmultifor any subset) inlib/settings.ts;settingsReport()passes them to the page with connection labels filled in. Every saved value still goes through the setting's existingcheck.Testing
next dev: the dropdown and checkboxes open and toggle, no console errorstest:db(76) pass; full gate left to CI🤖 Generated with Claude Code
https://claude.ai/code/session_01Q3ezTXZQm7eQwpY7oWgS4D