fix(ui): allow creating a secret once the list is no longer empty - #151
Open
arminfauland wants to merge 1 commit into
Open
fix(ui): allow creating a secret once the list is no longer empty#151arminfauland wants to merge 1 commit into
arminfauland wants to merge 1 commit into
Conversation
The "create secret" button only existed inside the empty state:
@if (!loading() && !error() && secrets().length === 0) {
<app-button (click)="openCreateModal()">…
Once a single secret exists the block never renders, and the secrets
manager offers no other way to reach openCreateModal(). Creating a second
secret through the UI becomes impossible — the only remaining routes are
the deep link /(modal:secrets/create/<name>) or the run dialog, which
links there when a workflow references a missing secret.
Adds the same button above the list so it is available in both states.
Reuses the existing secrets.create_button translation key, so no i18n
changes are needed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LixHBPkhb8h5oDdMqSG4se
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.
Problem
The create secret button only exists inside the empty state:
@if (!loading() && !error() && secrets().length === 0) { <app-button action variant="secondary" (click)="openCreateModal()"> {{ 'secrets.create_button' | transloco }}openCreateModal()is referenced exactly once in the template. As soon as one secret exists the block stops rendering, and the secrets manager offers no other way to create another one.The remaining routes are not discoverable:
/(modal:secrets/create/<name>)So a user who has set up their first secret and later wants a second one finds a dialog that can only list and edit.
Fix
Adds the same button above the list, so it is reachable in both states. Reuses the existing
secrets.create_buttonkey — no translation changes needed.secondaryandsmare both valid members ofButtonVariant/ButtonSize.Verification
nx lint ui— passesnx build ui— succeeds (the bundle-budget warning is pre-existing)