Skip to content

Feat: interactive live subject preview #1901

@ttw225

Description

@ttw225

Description

During cz commit interactive prompts, show a live preview of the first line (subject) and a bottom character counter (with support for message_length_limit).
This helps users see the final rendered subject while typing scope/subject and prevents overly long subjects.

Possible Solution

The implementation is based on Questionary's bottom_toolbar

  • Enhance interactive questions by attaching:
    • bottom_toolbar: render the live subject preview + character counter; wrap by terminal display width and handle CJK/full-width characters correctly.
    • validate: enforce subject length using message_length_limit (0 means no limit).
  • Use closures to keep an in-memory answers/input state and update the preview/validation in real time as the user types.

Additional context

Image
Image

Related issues

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions