Skip to content

UI config editor#7228

Merged
shuyangli merged 5 commits intomainfrom
sl/ui-config-editor
Apr 13, 2026
Merged

UI config editor#7228
shuyangli merged 5 commits intomainfrom
sl/ui-config-editor

Conversation

@shuyangli
Copy link
Copy Markdown
Contributor

@shuyangli shuyangli commented Apr 8, 2026

Add a config editor in UI to edit config toml. This only triggers when gateway reports the config is in database (currently gated behind the feature flag, and requires the gateway to start up without a config file passed in).

Normal view:
Screenshot 2026-04-09 at 18 08 40

Edit conflict:
Screenshot 2026-04-09 at 18 09 34

Invalid toml:
Screenshot 2026-04-09 at 18 10 09

Fixes #7176.

@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from a939d47 to 642a9be Compare April 8, 2026 15:06
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from dcd7e6e to 1c2d757 Compare April 8, 2026 15:06
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from 642a9be to f0de912 Compare April 8, 2026 15:22
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from 1c2d757 to 0d660a3 Compare April 8, 2026 15:22
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from f0de912 to ebe8125 Compare April 8, 2026 15:59
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from 0d660a3 to 4fe7a14 Compare April 8, 2026 15:59
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from ebe8125 to cfa12c9 Compare April 8, 2026 16:18
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from 4fe7a14 to e2c6dee Compare April 8, 2026 16:18
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from cfa12c9 to 359ed00 Compare April 8, 2026 18:39
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch 2 times, most recently from 86b4541 to 738154a Compare April 8, 2026 19:33
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from 359ed00 to c24502e Compare April 8, 2026 19:33
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from 738154a to e8b6282 Compare April 8, 2026 20:33
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from c24502e to 754a2f8 Compare April 8, 2026 20:33
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from e8b6282 to edab501 Compare April 8, 2026 20:37
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch 2 times, most recently from c01ebe1 to 740cbfa Compare April 8, 2026 21:19
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from edab501 to 190179a Compare April 8, 2026 21:19
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from 740cbfa to d937b57 Compare April 8, 2026 21:25
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from 190179a to b462ad9 Compare April 8, 2026 21:25
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from d937b57 to d1652c8 Compare April 8, 2026 22:15
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch 2 times, most recently from 468728e to b343d23 Compare April 9, 2026 16:19
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from b343d23 to c9348e4 Compare April 9, 2026 17:20
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from d1652c8 to 6340dbe Compare April 9, 2026 17:30
@shuyangli shuyangli force-pushed the sl/add-cli-store-config-option branch from c9348e4 to 4acd666 Compare April 9, 2026 17:30
@shuyangli shuyangli force-pushed the sl/add-config-in-db-field-for-ui branch from 6ab4d8b to c5c3594 Compare April 13, 2026 19:09
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch 2 times, most recently from 8a20cf5 to 217dc60 Compare April 13, 2026 19:20
@shuyangli shuyangli force-pushed the sl/add-config-in-db-field-for-ui branch from c5c3594 to 75fd551 Compare April 13, 2026 19:50
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from 217dc60 to 65af36b Compare April 13, 2026 19:50
Base automatically changed from sl/add-config-in-db-field-for-ui to main April 13, 2026 20:41
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch 2 times, most recently from 5ab0cc8 to de96668 Compare April 13, 2026 21:14
@shuyangli shuyangli marked this pull request as ready for review April 13, 2026 21:14
@shuyangli shuyangli requested a review from Aaron1011 April 13, 2026 21:16
The @config-editing tests need the gateway booted from the config-in-database
read path (TENSORZERO_INTERNAL_FLAG_ENABLE_CONFIG_IN_DATABASE=true) with a
pre-loaded config — they cannot run in the standard ui-tests-e2e-main job.

Additionally, the tests make direct API calls to $TENSORZERO_GATEWAY_URL from
the Playwright runner (host process), but the main e2e job sets that variable
to http://gateway:3000 which is only resolvable within the Docker network,
causing EAI_AGAIN failures.

Changes:
- Tag all tests in config_editing.spec.ts with @config-editing so they can be
  selected or excluded via --grep / --grep-invert.
- Add @config-editing to the --grep-invert filter in ui-tests-e2e-main for all
  three auth_mode matrix legs.
- Add ui/fixtures/docker-compose.config-in-db.yml: a Docker Compose override
  that adds a gateway-store-config one-shot service (stores the UI fixtures
  config into Postgres) and rewires the gateway to load from the database.
- Add ui-tests-e2e-config-editing CI job: starts the stack with the
  config-in-db override, then runs playwright with --grep @config-editing and
  TENSORZERO_GATEWAY_URL=http://localhost:3000 so the host-side runner can
  reach the gateway via the mapped port.
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from de96668 to 4d3a06b Compare April 13, 2026 21:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de9666807e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/app/routes/config/route.tsx
Comment thread .github/workflows/ui-tests-e2e.yml Outdated
@Aaron1011 Aaron1011 assigned shuyangli and unassigned Aaron1011 Apr 13, 2026
@shuyangli shuyangli force-pushed the sl/ui-config-editor branch from 4ef7e23 to 6d392d4 Compare April 13, 2026 21:45
@shuyangli shuyangli assigned Aaron1011 and unassigned shuyangli Apr 13, 2026
@shuyangli shuyangli enabled auto-merge April 13, 2026 21:54
@shuyangli shuyangli added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 9283684 Apr 13, 2026
80 checks passed
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.

Add UI for editing config in database

2 participants