[CLI] Easter egg: city skyline in hf repos ls#4287
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
|
||
| _MOVE_FRAMES = 8 | ||
| _MOVE_DELAY = 0.03 | ||
| _CURSOR_PAD = _CURSOR_H + 16 |
There was a problem hiding this comment.
Odd cursor padding breaks even buffer height invariant
Low Severity
_CURSOR_PAD is 21 (odd: _CURSOR_H(5) + 16), and when added to buf_h at line 114, it breaks the even-height invariant that prepare_city_data explicitly enforces (if buf_h % 2: buf_h += 1). The _pixels_to_lines function processes pixel rows in pairs for half-block character rendering. An odd buffer height causes the last content row to be unpaired and shifts all row pairings by one pixel, resulting in subtly different rendering compared to the intended alignment.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 08c7542. Configure here.
|
PR is now ready for review. I don't think it's useful to review anything in depth in the Let's remember it's just an easter egg so let's not over-optimize it^^ |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e5d4a1b. Configure here.
| while city_lines and not _strip_ansi(city_lines[0]).strip(): | ||
| city_lines.pop(0) | ||
| while city_lines and not _strip_ansi(city_lines[-1]).strip(): | ||
| city_lines.pop() |
There was a problem hiding this comment.
Empty-line stripping causes city to shift during animations
Low Severity
The _present function strips empty lines from the top of city_lines on every frame. During the intro drop animation (and when moving between tiles of different heights), the cursor is drawn at varying vertical positions in the pixel buffer. Since the topmost non-empty content changes frame-to-frame, a varying number of lines get stripped, causing the city tiles to visually jump up/down within the terminal. The worst case is the intro animation where the city can shift by ~8 terminal lines over 240ms as the cursor descends into view.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e5d4a1b. Configure here.
|
This PR has been shipped as part of the v1.18.0 release. |


Running
hf repos ls --explorenow renders an animated city skyline in the terminal before showing results.Demo
Screencast.from.28-05-2026.11.32.19.webm
Note
Low Risk
Self-contained CLI easter egg with no changes to auth, uploads, or core Hub APIs; only affects optional interactive listing.
Overview
Adds an optional
--exploreflag tohf repos lsthat launches an interactive terminal “city” instead of printing the usual table.When
--exploreis set and output is human-readable, the CLI runs a new_city_gamemodule: repos become isometric blocks (height/color by storage and type), with WASD navigation, storage summary panels, and raw TTY handling (Unix, minimum terminal size). Non-interactive or non-human output modes get a clear error instead of the game.CLI reference and command examples document the new flag.
Reviewed by Cursor Bugbot for commit e5d4a1b. Bugbot is set up for automated code reviews on this repo. Configure here.