feat(tui): credentials CRUD end-to-end - #23
Open
lvlcn-t wants to merge 1 commit into
Open
Conversation
Final PR in the TUI CRUD series. Adds create, edit, rename, and delete for credentials, completing CRUD across all three tabs. - CredentialsTab uses the CRUD browse variant, binding n/e/r/ctrl+d. - credentialForm is type-driven: the type field is validated against the four supported types; all conditional fields (client id/secret/cert, token source, and the OIDC issuer/client-id/redirect/scopes) are shown, and credentialFromValues assembles only the fields relevant to the chosen type, letting the domain validate the result. On edit the name is locked read-only. - Dispatch maps intent to CreateCredential/UpdateCredential/ RenameCredential/DeleteCredential; rename cascades to referencing contexts and delete reports orphaned contexts in the status line. - Removed the now-unused view-only browse constructor; all tabs are CRUD. Tests cover service-principal and workload-identity (OAuth2) create, invalid-type rejection, in-place edit with a type change, rename with reference cascade, and delete. Signed-off-by: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com>
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 637779b |
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
PR 4 (final) of the TUI CRUD series (stacked on #22). Adds create,
edit, rename, and delete for credentials, completing CRUD across all
three tabs.
Note
Based on
feat/tui-crud-contexts(#22). Review #20, #21, #22 first.Changes
CredentialsTabnow uses the CRUD browse variant, bindingn/e/r/ctrl+d.credentialFormis type-driven: the type field is validated againstthe four supported types; all conditional fields (client id/secret/cert,
token source, and OIDC issuer/client-id/redirect/scopes) are shown, and
credentialFromValuesassembles only the fields relevant to the chosentype — the domain validates the result (matching how
cmd set-credentialworks). On edit the name is locked read-only.
CreateCredential/UpdateCredential/RenameCredential/DeleteCredential; rename cascades to referencingcontexts, delete reports orphaned contexts in the status line.
Testing
rejection, in-place edit with a type change, rename with reference
cascade, delete.
go test -race ./...andpre-commitgreen;tuinever importscmd.Series recap
contexts.Managerreshaped)With this, the TUI has full CRUD on contexts, tenants, and credentials,
all mapping user intent to one shared
contexts.Manager. The CLI migrationonto the intent API remains a separate follow-up.