[luv-339] fix: drop startup ASCII wordmark; align version with link lines#338
[luv-339] fix: drop startup ASCII wordmark; align version with link lines#338NiveditJain merged 7 commits intomainfrom
Conversation
…retched Drop the f-top-serif row and the bottom row of the p-descender (rows 1 and 10 of the original 10-row design). Many monospace fonts render each cell ~2-3× taller than wide, so 10 char-rows of pixel-block letters end up reading as a tall rectangle on screen even though the source-pixel ratio is fine. 8 rows keeps the curl/crossbar/foot of "f", a stub descender on "p", and every other letter shape unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a PNG→ANSI banner generator and its generated assets, integrates pre-generated colored/mono banners into the launcher with terminal capability and width selection, adds Vitest checks for the generated banners, updates package devDependencies, and documents the changes in CHANGELOG. ChangesBanner generation & integration
🎯 4 (Complex) | ⏱️ ~45 minutes
Sequence Diagram(s) sequenceDiagram
participant Launch
participant BannerModule
participant Terminal
Launch->>BannerModule: import colored/mono + BANNER_COLS
Launch->>Terminal: check columns & color support
Launch->>Terminal: print selected banner or plain text
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 3: Update the CHANGELOG header line for "## 0.0.10-beta.10 — 2026-05-09"
to use today's date by replacing 2026-05-09 with 2026-05-10 so the header reads
"## 0.0.10-beta.10 — 2026-05-10".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2d934ba8-bbd8-4287-8e47-4d3b751a6008
📒 Files selected for processing (2)
CHANGELOG.mdscripts/launch.ts
Per CodeRabbit on PR #338: section was dated 2026-05-09 but the actual UTC date is 2026-05-10, and the project rule for the section heading date is "today's date". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The 8-row trim still rendered as roughly square on terminals where each cell is ~2× taller than wide. Drop one more middle-body row so the bowls of a/p/o use only top-arc + bottom-arc (no 3-row interior); f and the descender of p still survive. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the hand-crafted monochrome pixel-block banner in scripts/launch.ts
with a colored half-block render of the actual failproofai wordmark logo.
A new scripts/generate-banner.ts reads assets/wordmark/source.png, crops to
the non-transparent bounding box, box-filter downsamples to a 46x7 character
grid (= 46x14 source pixels via the U+2580 upper-half-block trick so each
char encodes 2 vertically-stacked source pixels at 1:1 aspect), and emits
scripts/banner.generated.ts with two pre-rendered arrays:
- coloredBanner: 24-bit ANSI fg/bg per cell so the teal flower over the
"i" and the pink "l"-stem highlights from the brand mark survive
- monoBanner: same grid in plain Unicode block chars (- _ # space)
scripts/launch.ts picks the variant: TTY + COLORTERM=truecolor/24bit (or
FORCE_COLOR=3 to override the isTTY check chalk-style) selects coloredBanner;
NO_COLOR=1, non-TTY without FORCE_COLOR, or non-truecolor terminals fall
back to monoBanner; and the existing plain-text "failproof ai" fallback
still kicks in when the terminal is narrower than the art.
The PNG itself is not loaded at runtime - only by scripts/generate-banner.ts
when re-generating the bundled banner. pngjs + @types/pngjs added as
devDeps for the generator.
New unit tests in __tests__/scripts/banner.test.ts pin the grid dimensions,
ANSI presence in the colored variant, mono-only-blocks shape, visible-pixel
count, and per-line cell width matches BANNER_COLS.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
scripts/launch.ts (1)
16-48: ⚡ Quick winAdd unit coverage for the banner-selection branches.
The new behavior lives in the width/color/env matrix here, but the added test file only validates the generated asset shape. Please add cases for at least: narrow terminal → plain text,
NO_COLOR/non-truecolor → mono, andCOLORTERM=truecolororFORCE_COLOR=3→ colored.As per coding guidelines, "Always add unit tests for new behaviour. Place tests in tests/."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/launch.ts` around lines 16 - 48, Add unit tests under __tests__/ that exercise the banner-selection branches by manipulating process.stdout.columns, process.stdout.isTTY, and env vars used in launch.ts (COLORTERM, NO_COLOR, FORCE_COLOR) and then importing/initializing the module to read the computed banner variable. Specifically: (1) set process.stdout.columns smaller than BANNER_COLS to assert banner === " failproof ai" (narrow terminal case), (2) set isTTY=false with NO_COLOR=1 or FORCE_COLOR="0" (and columns >= BANNER_COLS) to assert the monoBanner path is chosen (compare banner to " " + monoBanner.join("\n ")), and (3) set COLORTERM="truecolor" or FORCE_COLOR="3" with isTTY true to assert the coloredBanner path is chosen (compare banner to " " + coloredBanner.join("\n ")). Ensure each test resets env and process.stdout properties after running so other tests aren’t affected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@__tests__/scripts/banner.test.ts`:
- Around line 6-9: The test currently only checks BANNER_COLS and BANNER_ROWS
are > 0; change it to assert the concrete expected dimensions (replace
expect(...).toBeGreaterThan(0) with expect(BANNER_COLS).toBe(<expectedCols>) and
expect(BANNER_ROWS).toBe(<expectedRows>)) using the actual intended footprint
values from the banner/layout source (refer to where BANNER_COLS and BANNER_ROWS
are defined) so the test will fail if regeneration changes the layout; update
the expected numbers to the correct constants and keep the assertions in
__tests__/scripts/banner.test.ts.
---
Nitpick comments:
In `@scripts/launch.ts`:
- Around line 16-48: Add unit tests under __tests__/ that exercise the
banner-selection branches by manipulating process.stdout.columns,
process.stdout.isTTY, and env vars used in launch.ts (COLORTERM, NO_COLOR,
FORCE_COLOR) and then importing/initializing the module to read the computed
banner variable. Specifically: (1) set process.stdout.columns smaller than
BANNER_COLS to assert banner === " failproof ai" (narrow terminal case), (2)
set isTTY=false with NO_COLOR=1 or FORCE_COLOR="0" (and columns >= BANNER_COLS)
to assert the monoBanner path is chosen (compare banner to " " +
monoBanner.join("\n ")), and (3) set COLORTERM="truecolor" or FORCE_COLOR="3"
with isTTY true to assert the coloredBanner path is chosen (compare banner to "
" + coloredBanner.join("\n ")). Ensure each test resets env and process.stdout
properties after running so other tests aren’t affected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 77e0fffd-ca81-45e0-afe7-09d9302eb38d
⛔ Files ignored due to path filters (2)
assets/wordmark/source.pngis excluded by!**/*.pngbun.lockis excluded by!**/*.lock
📒 Files selected for processing (6)
CHANGELOG.md__tests__/scripts/banner.test.tspackage.jsonscripts/banner.generated.tsscripts/generate-banner.tsscripts/launch.ts
✅ Files skipped from review due to trivial changes (3)
- package.json
- scripts/banner.generated.ts
- CHANGELOG.md
Tighten the dimension assertion in __tests__/scripts/banner.test.ts from `> 0` to the concrete `BANNER_COLS = 46` / `BANNER_ROWS = 7` values so an accidental regeneration at a different footprint trips this test instead of silently shipping a resized startup banner. Addresses CodeRabbit review comment on PR #338. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ines
Every iteration of the dashboard-startup banner this PR tried (the original
10-row pixel-block, the 6-row trim, and the colored half-block render of
the brand PNG) read poorly in standard terminals - too tall, vertically
stretched, or just visual noise.
Drop the banner entirely. scripts/launch.ts now prints a plain-text
"failproof ai" title and a "Version" line padded to the same column as
the existing "Star us" / "Docs" / "Slack" lines, so version and URLs
form one cleanly-aligned block:
failproof ai
Version: 0.0.10-beta.10
Star us: https://github.com/exospherehost/failproofai
Docs: https://befailproof.ai
Slack: https://join.slack.com/...
Removes the now-unused pipeline:
- scripts/generate-banner.ts (PNG -> half-block generator)
- scripts/banner.generated.ts (pre-rendered banner data)
- assets/wordmark/source.png (brand wordmark source)
- __tests__/scripts/banner.test.ts
- pngjs + @types/pngjs devDeps
CHANGELOG entry under 0.0.10-beta.10 -> Fixes consolidates the prior
"trim from 10 to 6 rows" and the "colored half-block render" entries
from earlier commits on this branch into a single Fixes line.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Earlier commits on this branch tried two iterations of the dashboard-startup wordmark (the original 10-row pixel-block, the 6-row trim, then a colored half-block render of the brand PNG). Every iteration read poorly in standard terminals — too tall, vertically stretched, or just visual noise — so this PR drops the banner entirely.
scripts/launch.tsnow prints a plain-textfailproof aititle and a labeled📦 Version: <ver>line padded to the same column as the existing⭐ Star us:/📖 Docs:/💬 Slack:lines, so version and URLs form one cleanly-aligned block:Removes the entire half-block pipeline added earlier in this branch:
scripts/generate-banner.ts(PNG → half-block generator)scripts/banner.generated.ts(pre-rendered banner data)assets/wordmark/source.png(brand wordmark source)__tests__/scripts/banner.test.tspngjs+@types/pngjsdevDepsCHANGELOG entry under
0.0.10-beta.10 → Fixesconsolidates the prior trim and colored-render entries from earlier commits on this branch into a single Fixes line.Test plan
bun run lintclean (one pre-existing unrelated<img>warning).bunx tsc --noEmitclean.bun run test:run— all 1588 unit tests pass (6 banner tests removed alongside the file).bun run build:clisucceeds.node dist/cli.mjsprints the new aligned layout (verified locally — title, blank line, then four labeled lines aligned to col ~17 acrossVersion/Star us/Docs/Slack).🤖 Generated with Claude Code