feat(cli): redesign the help banner with selectable styles - #1456
Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 3 commits into
Conversation
Add selectable animated banner styles and a responsive WinML capsule layout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
feat(cli): redesign help banner
|
please add an image screenshot in description |
There was a problem hiding this comment.
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
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-styleand 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.
| 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: |
There was a problem hiding this comment.
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.
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.  --------- 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>

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:

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.