Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Implement terminal wrapping for advisory note input #1430

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iamrajiv
Copy link

@iamrajiv iamrajiv commented Feb 3, 2025

Fixes: #1220

Fixes an issue where the note field in wolfictl adv create would truncate text beyond terminal width, making long notes difficult to input and read. Implements automatic line wrapping that maintains visibility of the full text as users type.

Screenshot 2025-02-03 at 6 31 45 AM

@iamrajiv
Copy link
Author

Hi @luhring, can you review this and run the CI?

Copy link
Member

@luhring luhring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for trying this out! And apologies for the delay in reviewing.

It looks like this approach is to prompt for the note upfront, before the existing prompting code gets invoked. It'd be great if we could incorporate the solution into the existing prompting flow, even if we swap out the component we're using today for the note field itself.

One reason this is needed in particular is that we don't always want to prompt for the note — since not all advisory creations/updates end up needing a note field. We become aware of whether the note is needed throughout the existing prompt flow.

Check out the existing component models in ./pkg/cli/components/advisory, and this function in particular to understand how the note field relates to the rest of the UX.

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.

wolfictl adv create truncates input line
2 participants