Skip to content

Admin page: pick an enumerable setting's value from its choices - #93

Merged
alisman merged 1 commit into
masterfrom
session/cache2
Oct 28, 2026
Merged

alisman merged 1 commit into
masterfrom
session/cache2

Conversation

@alisman

@alisman alisman commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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:

setting editor
FEDERATION_HIDE_SQL, STUDY_ALLOW_RESTRICTED dropdown: off / on (1)
LOOPBACK_PEER dropdown: none / a / b
AGGREGATE_ONLY_INSTANCES checkboxes for 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 other settings (labels, peer URLs, patient-level rules, study ids) keep their text field.

How

SettingSpec gains choices (and multi for any subset) in lib/settings.ts; settingsReport() passes them to the page with connection labels filled in. Every saved value still goes through the setting's existing check.

Testing

  • Driven in Chromium on next dev: the dropdown and checkboxes open and toggle, no console errors
  • Typecheck, eslint, test:db (76) pass; full gate left to CI

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q3ezTXZQm7eQwpY7oWgS4D

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
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cbiolab-genie Ready Ready Preview Oct 28, 2026 3:59pm UTC
cohort-lab Ready Ready Preview Oct 28, 2026 3:59pm UTC

Request Review

@alisman
alisman merged commit 7f0e482 into master Oct 28, 2026
10 checks passed

This branch was successfully deployed

1 active deployment
Preview – cohort-lab — fd0ec69d Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant