feat(tui): contexts CRUD end-to-end - #22
Open
lvlcn-t wants to merge 1 commit into
Open
Conversation
Third PR in the TUI CRUD series. Adds create, edit, rename, and delete for contexts, reusing the intent API and the create/edit/rename/delete flow established for tenants. - ContextsTab binds n (new), e (edit), r (rename), ctrl+d (delete) and emits the matching TabActions. - contextForm collects name, tenant, credential, and subscription. Tenant and credential are validated against existing entries (their names are shown as placeholders); on edit the name is locked read-only. - Dispatch maps intent to CreateContext/UpdateContext/RenameContext/ DeleteContext. Edit updates in place (name locked); delete of the active context warns in the status line. - Shared form-field keys are extracted to constants (fieldName, fieldID, fieldTenant, fieldCredential, fieldSubscription); entryName() reads an item's config name without the list display marker. Tests drive the Tabs model on the contexts tab through create (incl. unknown-tenant validation rejection), in-place edit, rename, and delete. Signed-off-by: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com>
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 56163b1 |
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 3 of the TUI CRUD series (stacked on #21). Adds create, edit,
rename, and delete for contexts.
Note
Based on
feat/tui-crud-tenants(#21). Review #20 and #21 first.Changes
ContextsTabbindsn/e/r/ctrl+dand emits the matching actions.contextFormcollects name, tenant, credential, and subscription.Tenant and credential are validated against existing entries (their
names shown as placeholders); on edit the name is locked read-only.
CreateContext/UpdateContext/RenameContext/DeleteContext. Edit updates in place; deleting the active contextwarns in the status line (
DeleteResult.WasActive).entryName()reads an item'sconfig name without the list display marker (contexts render a
●/○marker in their title).
Testing
in-place edit, rename, delete.
go test -race ./...andpre-commitgreen;tuinever importscmd.Next
Credentials (type-driven form) in PR 4.