chore(deps): bump ratatui-image 10.0.7 -> 11.0.5#24
Conversation
Update ratatui-image to v11 and pick up the latest ratatui 0.30.x patch releases via the lockfile (ratatui 0.30.1 -> 0.30.2 and the companion core/crossterm/widgets/macros/termwiz crates). v11's only breaking change that touches our code is FontSize: it changed from a (u16, u16) tuple to a struct with width/height fields, so compute_cell_height() now reads `.height` instead of destructuring the tuple. The rest of our usage (Picker::halfblocks, from_query_stdio, new_resize_protocol, StatefulImage/Resize::Fit, StatefulProtocol) is unchanged. v11 requires ratatui ^0.30.1, so no ratatui major bump was needed. Verified: cargo build, fmt --check, clippy -D warnings, test --workspace (1529 passed), and cargo deny check all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
leboiko
left a comment
There was a problem hiding this comment.
Code Review — PR #24: bump ratatui-image 10.0.7 → 11.0.5
Verdict: clean. No blocking findings (0 🔴, 0 🟠, 1 🟡 informational).
This is a tight, well-scoped dependency bump. Reviewed across architecture, code quality, Rust-specific patterns, dependency hygiene, and testing.
Scope
| File | Change |
|---|---|
Cargo.toml |
ratatui-image 10.0.7 → 11.0.5 (1 line) |
Cargo.lock |
mechanical: ratatui 0.30.1→0.30.2, core/crossterm/widgets/macros/termwiz patches, new transitive self_cell/termina/ratatui-termina |
src/mermaid.rs |
1 line — FontSize tuple → struct migration |
Architecture & design
No structural change. The bump stays within ratatui ^0.30.1, so no cascading major upgrade. ✅
Code quality (Rust)
- The single semantic change (
compute_cell_height) is the correct, idiomatic v11 equivalent of the old tuple destructure. Semantics are identical — it still reads the per-cell pixel height. - No
unwrap()/expect()introduced; the existingcell_px_h == 0divide-by-zero guard is preserved. ✅ - No executor-blocking risk introduced.
render_blockingis explicitly named/scoped as blocking and is unchanged; the diff adds no sync I/O, locks-across-await, orblock_on. ✅ - No new magic numbers, dead code, or duplication.
Dependency hygiene
ratatui-image has a single consumer (the root binary crate); the workspace member mermaid-text does not depend on it, so there is no version-drift surface and no [workspace.dependencies] hoist is warranted here. ✅
Testing & reliability
No new behavior to test — this is a mechanical API migration with identical output. The existing picker-backed tests (cache_height_ready_returns_cell_height, text_mode_never_spawns_image_task) exercise the changed path and pass. The PR documents the full local gate: build, fmt --check, clippy -D warnings, test --workspace (1529 passed), cargo deny check — all green. Regression risk is low. ✅
Note
The pre-existing usvg/resvg/tiny-skia duplicate warnings from cargo deny are unrelated to this PR (resvg 0.47 direct vs 0.46 via mermaid-rs-renderer) and correctly called out as out-of-scope.
Good to merge once CI is green.
| /// * `max_height` – upper bound in display lines (from `Config::mermaid_max_height`). | ||
| fn compute_cell_height(img: &DynamicImage, picker: &Picker, max_height: u32) -> u32 { | ||
| let (_, cell_px_h) = picker.font_size(); | ||
| let cell_px_h = picker.font_size().height; |
There was a problem hiding this comment.
🟡 Informational — migration is correct. In ratatui-image v11, Picker::font_size() returns a FontSize struct ({ width, height }) instead of a (u16, u16) tuple. .height is the right field — it preserves the original (_, cell_px_h) semantics exactly (per-cell pixel height). Verified this is the only font_size() tuple destructure in the tree, so no other call site was silently left behind by the type change. No action needed.
Ships the ratatui-image v11 upgrade from #24: - ratatui-image 10.0.7 -> 11.0.5; ratatui 0.30.1 -> 0.30.2 and the companion core/crossterm/widgets/macros/termwiz patches via the lockfile. - v11's FontSize tuple->struct change handled in compute_cell_height (reads .height). No user-visible behaviour change. fmt/clippy/test (1529 passed)/deny all green locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Bumps
ratatui-imageto v11.0.5 (from 10.0.7) — the headline change — and picks up the latest ratatui 0.30.x patch releases via the lockfile.v11 requires ratatui
^0.30.1, so no ratatui major bump was needed.Code change
v11's only breaking change that touches our code is
FontSize: it went from a(u16, u16)tuple to a struct withwidth/heightfields.compute_cell_height()now reads.heightinstead of destructuring:The rest of our usage is unchanged in v11:
Picker::halfblocks,Picker::from_query_stdio,new_resize_protocol,StatefulImage::new().resize(Resize::Fit(None)),StatefulProtocol.Verification (full local CI gate)
cargo build✅cargo fmt --all -- --check✅ cleancargo clippy --workspace --all-targets -- -D warnings✅ no warningscargo test --workspace✅ 1529 passed, 0 failedcargo deny check✅ advisories/bans/licenses/sources ok (pre-existingusvg/resvg/tiny-skiaduplicate warnings are unrelated — resvg 0.47 direct vs 0.46 viamermaid-rs-renderer)Follow-up (not in this PR)
v11 adds a
slicedmodule (SlicedProtocol/SlicedImage) with native vertical image scrolling, plusImage::allow_clipping. The mermaid modal currently pans aResize::Fitimage withj/k/h/l; the sliced protocol could give it true native scroll. Worth a separate spike.🤖 Generated with Claude Code