Skip to content

fix: show human-readable labels in delete confirmation prompts#238

Draft
bukinoshita wants to merge 1 commit intomainfrom
fix/contact-property-delete-confirm-label-2000
Draft

fix: show human-readable labels in delete confirmation prompts#238
bukinoshita wants to merge 1 commit intomainfrom
fix/contact-property-delete-confirm-label-2000

Conversation

@bukinoshita
Copy link
Copy Markdown
Member

@bukinoshita bukinoshita commented Apr 9, 2026

Summary by cubic

Show human-readable labels in delete confirmations across all CLI delete commands to prevent mistakes. Satisfies BU-653 by showing the selected label plus the ID.

  • Bug Fixes
    • Added pickItem() in prompts to return { id, label }; pickId() now delegates to it for compatibility.
    • Updated 9 delete commands to use pickItem() and display "${label}" with ID: ${id} in confirmation prompts.
    • Added 4 tests for pickItem() covering direct ID, non-interactive, and optional flows.

Written for commit fb55bba. Summary will update on new commits.

…ations

Introduce pickItem() in prompts.ts that returns both the selected item's
ID and its human-readable label. Refactor pickId() to delegate to it.

Update all delete commands (contact-properties, domains, templates,
api-keys, webhooks, contacts, topics, broadcasts, segments) to use
pickItem() instead of pickId(), so the destructive confirmation prompt
displays the label the user selected (e.g. 'plan_name (string)') along
with the UUID, rather than showing only the opaque UUID.

Add tests for pickItem() covering direct-id, non-interactive, and
optional flows.

Fixes BU-653

Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
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.

2 participants