Skip to content

feat(cli): redesign the help banner with selectable styles - #1456

Closed
Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 3 commits into
microsoft:mainfrom
kenehong:main
Closed

Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 3 commits into
microsoft:mainfrom
kenehong:main

Conversation

@DingmaomaoBJTU

@DingmaomaoBJTU Qiong Wu (qiowu) (DingmaomaoBJTU) commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Redesign the top-level WinML CLI help banner with a gradient capsule layout and selectable capsule, tiles, and prompt styles via --banner-style. The capsule hides its left mark on narrower terminals and includes the version inside the frame.

Animations run only in sufficiently wide interactive color terminals; noninteractive output stays static. Add CLI tests for style selection, animation gating, responsive mark visibility, version placement, and invalid choices.

Source: kenehong:main at c1ef749. This PR submits the existing fork changes without modifying them. Tests were added in the source branch; they have not been rerun as part of this PR creation.

Banner preview

Static visual capture of the PR's banner renderer at commit c1ef749, using version 0.3.1. From top to bottom: capsule at 110 columns, capsule at 72 columns (left mark hidden), tiles, and prompt. Rendered from the exact banner functions; this preview does not demonstrate animation or a full CLI execution.

Current:
image

Banner styles and responsive capsule preview

Pending terminal-rendering fix

The reported animation redraw issue and the 80–82-column tiles animation issue are addressed in commit 91cf545: banners render statically, and title/version text no longer uses dim styling. Validation: 78 CLI help tests passed, including widths 80, 81, 82 and 100; focused Ruff and git diff --check passed. This fix is not yet included in this PR: the source fork does not grant push permission and maintainer edits are disabled. The source branch owner must cherry-pick the commit before re-review.

kennierthanu and others added 3 commits August 25, 2026 09:44
Add selectable animated banner styles and a responsive WinML capsule layout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@xieofxie

Copy link
Copy Markdown
Contributor

please add an image screenshot in description

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The animation width threshold allows the tiles banner to animate while wrapping on 80–82-column terminals.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Redesigns the top-level CLI help banner with selectable, responsive styles and terminal-aware animation.

Changes:

  • Adds capsule, tiles, and prompt banner styles.
  • Adds --banner-style and animation gating.
  • Adds CLI tests for rendering, selection, and validation.
File Description
src/​winml/​modelkit/​cli.py Implements banner styles, animation, and CLI option.
tests/​cli/​test_help_cli.py Tests banner behavior and style selection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/winml/modelkit/cli.py
else:
raise ValueError(f"Unknown banner style: {style}")

if con.is_terminal and con.color_system is not None and con.width >= art_width + 6:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Prepared fix in DingmaomaoBJTU@91cf545. Banner rendering is now static, removing the Live cursor-rewrite path entirely, including the 80–82-column tiles case. Added coverage at widths 80/81/82/100. 78 CLI help tests passed; focused Ruff and diff checks passed. This commit is not in the PR head yet: I cannot push to kenehong/main and maintainer edits are disabled. Please cherry-pick this commit into the source branch before resolving this thread.

Qiong Wu (qiowu) (DingmaomaoBJTU) added a commit that referenced this pull request Sep 29, 2026
Replace the top-level winml help banner with a static gradient capsule.
Wide terminals show the left mark; narrower terminals hide it. The
version remains inside the frame, with normal foreground text for
readable light and dark themes.

The banner renders once without cursor rewriting, avoiding partial
animation frames in terminal scrollback. Only capsule is included: no
tiles, prompt, --banner-style, or --banner-animation options.

Replacement for #1456. Capsule design originates from @kenehong at
c1ef749.

## Validation
- 66 CLI help tests passed on the final source.
- Focused Ruff and git diff --check passed.
- Terminal verification: winml --help renders static capsule; removed
banner options are rejected.
- Hosted CI runs on the pushed commit; see checks below.

## Preview
Rendered from the final capsule implementation (17b71f2), at 110 and 72
columns.

![Static capsule in wide and narrow
terminals](https://raw.githubusercontent.com/DingmaomaoBJTU/winml-cli/801524ff873baebcc6eb814ee576904ccf92c5ff/docs/images/pr1458-capsule.png)

---------

Co-authored-by: Kenny Hong <kehong@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: the99missedcalls <kennyhong@outlook.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.

5 participants