feat: Forge brand icon as the default scaffolded app icon#30
Conversation
Replace the procedurally-generated gradient placeholder produced by
`forge icon create` with the real Forge brand icon, and add a matching
favicon set to the docs site.
- crates/forge_cli/assets/forge-icon-1024.png: the 1024x1024 brand master
(ember-gradient rounded plate + crossed-hammers/anvil emblem + wordmark).
- bundler/icons.rs: `IconProcessor::create_placeholder` now decodes the
embedded master (`include_bytes!`) and resizes it to the requested size,
instead of drawing a blue→purple gradient. `Rgba`/`RgbaImage` are now only
needed by the Windows-only `save_wide`, so their import is `#[cfg(windows)]`.
- main.rs: `forge icon create` messaging updated ("Forge-branded icon",
"do not ship the Forge logo" guidance).
- scripts/generate-brand-icon.sh: regenerate the 1024 master + favicons from
assets/forge.png via ImageMagick (documented source-of-truth pipeline).
- site: favicon.svg / favicon.ico / favicon-32.png / apple-touch-icon.png +
astro.config.mjs favicon wiring; refreshed logo.svg and the example apps'
assets/icon.png.
Verified: `cargo fmt`/`clippy -D warnings` clean on forge_cli; `forge icon
create` produces a valid 1024x1024 RGBA PNG; the site builds (91 pages).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @LayerDynamics, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Code Review
This pull request replaces the programmatically generated placeholder icon with a default Forge-branded icon by embedding a 1024x1024 PNG master of the Forge logo and updating the icon generator to resize it. It also adds a script to generate the brand icon and favicons, updates the CLI messages, and configures the Astro documentation site to use the new branding. Feedback on the changes suggests using the more idiomatic #[cfg(windows)] attribute instead of #[cfg(target_os = "windows")] for conditional compilation in icons.rs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Commit 76bac20 (a gemini-code-assist suggestion) meant only to shorten `#[cfg(target_os = "windows")]` to `#[cfg(windows)]`, but its diff also deleted the unconditional `use image::{imageops::FilterType, DynamicImage, ImageFormat};` line. Those three types are used unconditionally — DynamicImage (the `source_image` field + the RGBA match), FilterType (`resize_exact`), and ImageFormat (`save_with_format`) — so the crate failed to compile with E0412 "cannot find type FilterType in this scope" (caught by the clippy CI job). Restore the import; keep the equivalent `#[cfg(windows)]` shorthand. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…5.2) (#31) ## Summary Phase **P5.2** of the docs-autogeneration pipeline: migrate the `forge` CLI from a hand-rolled `env::args()` parser to **clap derive**, and update the documentation-drift gate to track the new command model. ### CLI migration - `forge_cli/src/main.rs` now uses `#[derive(Parser)] Cli` + `#[derive(Subcommand)] enum Commands`, with dispatch in `main()`. - Generated `--help` / `--version`, real clap error messages, and per-subcommand help. - **Contract preserved exactly**: `dev`/`build`/`bundle`/`smelt`/`sign`/`icon`/`docs`; `-o/--out`, `--embed`, `-i/--identity`, the `artifact` positional, `icon create`/`validate`. Hand-written usage extras carried over via clap `after_help`. - `docs` keeps `trailing_var_arg` pass-through so its sub-flags still forward to the docs generator unchanged. ### Drift-rule follow-through The migration deleted the `forge <a|b|c>` usage banner that the `cli-command` drift rule parsed. That rule is **re-pointed at the clap `Commands` enum** (the new single source of truth): it brace-matches the enum body, harvests top-level variant names, and applies clap's default PascalCase→kebab-case rename to recover the exact subcommand names. `forge smelt`-style "real subcommand but undocumented" detection keeps working. ## Test plan - [x] Documentation drift gate: **in sync, 0 issues** - [x] `forge-docs-check`: **15/15** (incl. updated clap-enum fixture) - [x] `forge_cli`: **15 unit + 10 characterization** pass - [x] `cargo fmt --check` + `cargo clippy -D warnings` clean on both crates ## Notes - The characterization tests (P5.1) were intentionally rewritten: clap's edge-case behavior (no-args, unknown subcommand, bad flag) now exits non-zero with clap errors instead of the old hand-parser's exit-0 usage print. The preserved command/flag/alias/positional surface is asserted so a future change can't silently drop one. - Independent of the open branding PR #30 (`feat-forge-branded-icon`); the two main.rs changesets touch disjoint regions. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replaces the procedural gradient placeholder from
forge icon createwith the real Forge brand icon, and wires a favicon set into the docs site.Changes
crates/forge_cli/assets/forge-icon-1024.png— 1024×1024 brand master (ember-gradient rounded plate + crossed-hammers/anvil emblem + wordmark), embedded viainclude_bytes!.bundler/icons.rs—IconProcessor::create_placeholdernow decodes the embedded master and resizes it, instead of drawing a blue→purple gradient.Rgba/RgbaImageare now#[cfg(windows)](onlysave_wideuses them).main.rs—forge icon createmessaging ("Forge-branded icon", "do not ship the Forge logo" guidance).scripts/generate-brand-icon.sh— documented ImageMagick pipeline that builds the 1024 master + favicons fromassets/forge.png.favicon.svg/.ico/favicon-32.png/apple-touch-icon.png+astro.config.mjsfavicon wiring; refreshedlogo.svgand the example apps'assets/icon.png.Verified
cargo fmt+clippy -D warningsclean onforge_cli;forge icon createproduces a valid 1024×1024 RGBA PNG; site builds (91 pages).This also unblocks the planned clap-derive CLI migration, which was waiting on
main.rsbeing clean.🤖 Generated with Claude Code