Skip to content

feat(setup): display ASCII art banner during onboarding - #851

Merged
zmanian merged 1 commit into
nearai:stagingfrom
reidliu41:feat/onboard-banner
Mar 11, 2026
Merged

zmanian merged 1 commit into
nearai:stagingfrom
reidliu41:feat/onboard-banner

Conversation

@reidliu41

Copy link
Copy Markdown
Contributor

Adds an IronClaw ASCII art banner at the start of ironclaw onboard,
giving the setup wizard a more polished and recognizable first impression.
A strong visual identity on first run helps new users feel confident
they are in the right place and sets IronClaw apart from generic CLI tools.

@github-actions github-actions Bot added scope: setup Onboarding / setup size: S 10-49 changed lines risk: high Safety, secrets, auth, or critical infrastructure contributor: regular 2-5 merged PRs labels Mar 10, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the initial user experience of the ironclaw onboard setup wizard by integrating a distinctive ASCII art banner. This visual addition aims to establish a stronger brand identity and make the onboarding process feel more professional and welcoming.

Highlights

  • Onboarding Visuals: Introduced an IronClaw ASCII art banner to the ironclaw onboard setup wizard, aiming to provide a more polished and recognizable first impression for new users.
Changelog
  • src/setup/prompts.rs
    • Added a new public function print_banner responsible for displaying the IronClaw ASCII art in cyan color.
  • src/setup/wizard.rs
    • Imported the newly created print_banner function from prompts.rs.
    • Called print_banner() at the very beginning of the SetupWizard::run method to display the banner when the wizard starts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds a nice ASCII art banner to the onboarding wizard, which improves the first-run experience. The implementation is straightforward. I've added one comment regarding panic safety in the new print_banner function to ensure the terminal color is always reset, even in case of an unexpected panic during printing.

Note: Security Review did not run due to the size of the PR.

Comment thread src/setup/prompts.rs
Comment on lines +263 to +275
/// Print the IronClaw ASCII art banner in blue.
pub fn print_banner() {
let mut stdout = io::stdout();
let _ = execute!(stdout, SetForegroundColor(Color::Cyan));
println!();
println!(r" ██╗██████╗ ██████╗ ███╗ ██╗ ██████╗██╗ █████╗ ██╗ ██╗");
println!(r" ██║██╔══██╗██╔═══██╗████╗ ██║██╔════╝██║ ██╔══██╗██║ ██║");
println!(r" ██║██████╔╝██║ ██║██╔██╗ ██║██║ ██║ ███████║██║ █╗ ██║");
println!(r" ██║██╔══██╗██║ ██║██║╚██╗██║██║ ██║ ██╔══██║██║███╗██║");
println!(r" ██║██║ ██║╚██████╔╝██║ ╚████║╚██████╗███████╗██║ ██║╚███╔███╔╝");
println!(r" ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝ ");
let _ = execute!(stdout, ResetColor);
}

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.

medium

This implementation isn't fully panic-safe. If any of the println! macros were to panic (e.g., due to a broken pipe when writing to stdout), the ResetColor command at the end would not be executed, leaving the user's terminal in a colored state.

Additionally, the doc comment says the banner is 'blue', but the code uses Color::Cyan.

To improve robustness and fix the documentation, I suggest using a simple RAII guard to ensure the color is always reset. This is a common pattern in Rust for cleanup logic.

/// Print the IronClaw ASCII art banner in cyan.
pub fn print_banner() {
    struct ResetGuard;
    impl Drop for ResetGuard {
        fn drop(&mut self) {
            // Best-effort attempt to reset terminal color.
            let _ = execute!(io::stdout(), ResetColor);
        }
    }

    let mut stdout = io::stdout();
    // Setting color can fail, but we'll try to reset anyway.
    let _ = execute!(stdout, SetForegroundColor(Color::Cyan));
    let _guard = ResetGuard;

    println!();
    println!(r" ██╗██████╗  ██████╗ ███╗   ██╗ ██████╗██╗      █████╗ ██╗    ██╗");
    println!(r" ██║██╔══██╗██╔═══██╗████╗  ██║██╔════╝██║     ██╔══██╗██║    ██║");
    println!(r" ██║██████╔╝██║   ██║██╔██╗ ██║██║     ██║     ███████║██║ █╗ ██║");
    println!(r" ██║██╔══██╗██║   ██║██║╚██╗██║██║     ██║     ██╔══██║██║███╗██║");
    println!(r" ██║██║  ██║╚██████╔╝██║ ╚██████║╚██████╗███████╗██║  ██║╚███╔███╔╝");
    println!(r" ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝ ╚═════╝╚══════╝╚═╝  ╚═╝ ╚══╝╚══╝ ");
}

@reidliu41
reidliu41 changed the base branch from main to staging March 11, 2026 03:02

@zmanian zmanian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good -- small, focused change that adds visual polish to the onboarding flow.

What I checked:

  • SetForegroundColor, Color::Cyan, ResetColor, and execute! are already imported in prompts.rs, so no new dependencies or imports needed in that file.
  • The let _ = pattern for ignoring crossterm errors is consistent with print_success, print_error, print_info, and other styled output helpers in the same file.
  • Banner placement (print_banner() right before print_header("IronClaw Setup Wizard")) reads well since print_banner starts with println!() (blank line above) and print_header also starts with println!() (blank line between banner and header box).
  • The [skip-regression-check] tag is appropriate -- this is a cosmetic-only change with no behavioral logic to regress.

Minor nits (non-blocking):

  1. The last line of the ASCII art has a trailing space after the closing ");. Not a functional issue, but worth trimming for tidiness.
  2. There is no println!() after ResetColor, so the color reset and the subsequent print_header blank line run together. This works fine visually today because print_header opens with its own println!(), but adding one after the reset would make print_banner self-contained (no dependency on what follows it).

Neither nit warrants blocking. Approved.

@reidliu41

Copy link
Copy Markdown
Contributor Author

Is this ready to merge, or does the non-blocking issue need to be resolved first?

@zmanian
zmanian merged commit 977b7fd into nearai:staging Mar 11, 2026
22 checks passed
@ironclaw-ci ironclaw-ci Bot mentioned this pull request Mar 12, 2026
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
drchirag1991 pushed a commit to drchirag1991/ironclaw that referenced this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: regular 2-5 merged PRs risk: high Safety, secrets, auth, or critical infrastructure scope: setup Onboarding / setup size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants