feat(tui): ship staged /uwu theme#4696
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @Hmbown's task in 3m 31s —— View job Reviewing PR #4696 — /uwu theme
SummaryFocused review of the diff ( Good
Found 2 correctness issues in
Both are minor since the base widths are close and colors still clamp safely — no panics or crashes — but they undercut the "distinct, polished" bar the PR sets for itself. Minor style note: Tests: the new |
| #[must_use] | ||
| fn idle_whale_block_width() -> usize { | ||
| std::iter::once(IDLE_WHALE_SPOUT_ROW) | ||
| let classic = std::iter::once(IDLE_WHALE_SPOUT_ROW) | ||
| .chain(IDLE_WHALE_ROWS.iter().copied()) | ||
| .map(UnicodeWidthStr::width) | ||
| .max() | ||
| .unwrap_or(0) | ||
| .unwrap_or(0); | ||
| let uwu = std::iter::once(UWU_IDLE_WHALE_SPOUT_ROW) | ||
| .chain(UWU_IDLE_WHALE_ROWS.iter().copied()) | ||
| .map(UnicodeWidthStr::width) | ||
| .max() | ||
| .unwrap_or(0); | ||
| classic.max(uwu) | ||
| } |
There was a problem hiding this comment.
Off-center uwu whale. idle_whale_block_width() returns classic.max(uwu) unconditionally, but only one variant is ever rendered (selected via idle_whale_is_uwu at the call site). The classic block's widest row is 23 cols (" ▐██·███████████▙━━━━▞") while the uwu block's widest row is 20 cols (" ▗▄▄▄▄▄▄▄▄▄▄▄▖ ▚▞"). Since this max is always 23, the block_inset computed at line 1135 (width.saturating_sub(idle_whale_block_width()) / 2) over-indents the uwu mark by ~1-2 columns versus true center, contradicting the "one drawing, same outer inset" centering invariant described in the comment just below.
Fix: make this width theme-aware, mirroring idle_whale_rows/idle_whale_spout_row, e.g. fn idle_whale_block_width(app: &App) -> usize that only measures the active variant's rows/spout.
| fn idle_whale_is_uwu(app: &App) -> bool { | ||
| app.ui_theme.name == "uwu" | ||
| } |
There was a problem hiding this comment.
Minor: this compares app.ui_theme.name (a &str) rather than app.theme_id (palette::ThemeId, already on App per crates/tui/src/tui/app.rs:2362). Elsewhere in the codebase theme dispatch switches on the ThemeId enum (e.g. ocean.rs:473, theme_picker.rs:167), which the compiler can exhaustively check. A string compare against "uwu" has no such guardrail against typos/renames. Consider app.theme_id == palette::ThemeId::Uwu for consistency, unless there's a reason ui_theme can diverge from theme_id that I'm missing.
| for (column, ch) in text.chars().enumerate() { | ||
| let diagonal = (column as f32 + (rows - 1.0 - row as f32)) / (cols + rows); | ||
| let color = if ch == '·' { | ||
| let color = if matches!(ch, '·' | '░' | '✦') { |
There was a problem hiding this comment.
Same root cause as the block-width issue on idle_whale_block_width below: rows/cols computed at lines 1043-1048 are always derived from IDLE_WHALE_ROWS (the classic array), even when text here is actually a UWU_IDLE_WHALE_ROWS row. cols feeds directly into the diagonal shimmer-band calc on line 1054, so the uwu whale's shimmer sweep is normalized against the wrong column count (23 vs its actual ~20). Cosmetic-only (opacity is clamped to [0,1]), but same fix would cover both spots — thread the active row set through instead of hardcoding the classic array.
Wire the pre-designed UWU_UI_THEME into ThemeId/SELECTABLE_THEMES with aliases owo/kawaii, settings UiThemeValue parity, and the soft-classic empty-state whale (blush + one sparkle) when theme is uwu. No palette redesign; color shimmer only on the mark. Signed-off-by: Hunter B <hmbown@gmail.com>
aa2c0d4 to
20a30dd
Compare
|
Claude finished @Hmbown's task in 1m 11s —— View job Re-reviewing PR #4696 — /uwu theme (new commits pushed)
SummaryThis trigger fired on
No new correctness, provider/model-routing, reuse, or security issues found beyond these three (the CI is currently in progress (no failures observed at time of review). |
Summary
Ships the staged uwu theme from
cw-modern/themes/without redesign.Behavior
/theme→ Uwu, ortheme = "uwu"owo,kawaii→uwu░+ one sparkle✦)Wire-up
palette/themes.rs—UWU_UI_THEME,ThemeId::Uwu, SELECTABLE, normalize, picker labelsconfig_ui.rs—UiThemeValue::Uwu+ schema enum testtui/underwater.rs— soft rows/bubble whenui_theme.name == "uwu"; sakura on░/✦/·Verify
Out of scope
No uwu-light, no motion/fish changes, no palette redesign.