feat(dashboard): allow creating new env keys from Keys tab - #49288
Closed
ljluestc wants to merge 1 commit into
Closed
feat(dashboard): allow creating new env keys from Keys tab#49288ljluestc wants to merge 1 commit into
ljluestc wants to merge 1 commit into
Conversation
Collaborator
|
Duplicate of #20808 — same feature (create custom env keys from the Dashboard Keys page), same approach: both extend |
This was referenced Jul 12, 2026
Contributor
|
Implemented on main; closing via automated hermes-sweeper review.
|
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 does this PR do?
This PR adds support for creating brand-new environment keys from the Dashboard Keys tab.
Before this change, the Keys page could only edit keys already known in
OPTIONAL_ENV_VARS. That meant users could not add a new key from the UI, and newly-created custom keys were not surfaced byGET /api/envafter reload.This PR fixes that by:
key+value) with validation.PUT /api/envflow.GET /api/envso custom.envkeys are returned (with safe default metadata), making them visible/editable after refresh.This approach reuses existing backend persistence (
save_env_value) and avoids adding a separate API shape just for custom keys.Related Issue
Fixes #14641
Type of Change
Changes Made
web/src/pages/EnvPage.tsx.enventries from the Dashboard.^[A-Za-z_][A-Za-z0-9_]*$.hermes_cli/web_server.pyGET /api/envto include custom keys found in.envthat are not present inOPTIONAL_ENV_VARS.description, inferredcategory,is_password,channel_managed, redacted display value).tests/hermes_cli/test_web_server.pytest_set_custom_env_var_is_listed_in_env_keysto verify:PUT /api/envGET /api/envdescription,channel_managed, etc.)How to Test
CUSTOM_DASHBOARD_KEYwith valuecustom-value-1234.GET /api/env)..envcontains the new key.PUT /api/envwith a custom key/value.GET /api/envincludes that key withdescription: "Custom key from .env".Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/A (N/A)cli-config.yaml.exampleif I added/changed config keys — or N/A (N/A)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A (N/A)Screenshots / Logs
npm --prefix web run typecheck✅python3 -m py_compile hermes_cli/web_server.py tests/hermes_cli/test_web_server.py✅scripts/run_tests.sh ...could not run in this checkout because no local.venv/venvwas present.