fix(deps): bump ratatui 0.29→0.30 + ratatui-textarea to drop lru 0.12 (UB) - #5361
henrypark133 wants to merge 1 commit into
Conversation
…drop lru 0.12 Clears Dependabot #6 (lru Stacked Borrows UB in IterMut). lru 0.12.5 was pinned transitively by ratatui 0.29 via tui-textarea 0.7; the grouped PR #5271 couldn't move it because tui-textarea capped ratatui at ^0.29. Bumps both in ironclaw_tui's manifest so lru resolves >=0.16.3, and ports the TUI widgets to ratatui 0.30's API. Breaking changes addressed: - tui-textarea 0.7 → ratatui-textarea 0.9 (crate rename for ratatui 0.30) - cursor() now returns DataCursor(row, col) instead of (usize, usize) - TextArea uses RefCell internally (now !Sync); dropped Sync from the TuiWidget trait bound since the TUI runs on a single dedicated thread and Sync was never required for correctness Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 989f2f3b97
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| /// Trait implemented by all TUI widgets. | ||
| pub(crate) trait TuiWidget: Send + Sync { | ||
| pub(crate) trait TuiWidget: Send { |
There was a problem hiding this comment.
With the new ratatui-textarea 0.9.2 dependency, TextArea<'static> is !Send as well as !Sync, so InputBoxWidget can no longer satisfy this supertrait bound because it embeds a TextArea. Keeping TuiWidget: Send makes impl TuiWidget for InputBoxWidget fail to compile whenever ironclaw_tui is built; the commit only removed Sync, but the single-threaded TUI ownership described here means the remaining Send bound needs the same treatment or the input widget needs a Send wrapper.
Useful? React with 👍 / 👎.
|
🚅 Deployed to the ironclaw-pr-5361 environment in ironclaw-ci-preview
|
|
Closing as stale — no activity in over three weeks. The branch is untouched; reopen if this is still needed. |
Clears Dependabot #6 (lru
IterMutStacked Borrows UB, GHSA-rhfx-m35p-ff5j).Why a code change, not just a lockfile bump
lru 0.12.5was held transitively byratatui 0.29viatui-textarea 0.7. The grouped dep PR #5271 bumps ratatui→0.30 and lru→0.18 in the lockfile, but couldn't move lru becausetui-textarea 0.7caps ratatui at^0.29, pinning the old lru through that path. The only way out is to move ironclaw_tui itself to the ratatui 0.30 ecosystem.Changes
ratatui0.29 → 0.30.2tui-textarea 0.7→ratatui-textarea0.9.2 (the crate was renamed for the 0.30 ecosystem)lru0.12.5 eliminated → resolves to 0.16.4/0.18.0 (both UB-free)input_box.rs:tui_textarea::→ratatui_textarea::;cursor()destructures the newDataCursor(row, col)shapewidgets/mod.rs: droppedSyncfromTuiWidget: Send + Sync—ratatui-textarea 0.9holds aRefCellinternally makingTextArea!Sync. Verified non-load-bearing: widgets are created and used entirely within the single TUI thread (create_default_widgetsruns inside thecurrent_threadruntime spawned inapp.rs), never shared by reference across threads.Verification
cargo check -p ironclaw_tui: cleancargo test -p ironclaw_tui: 178 passed, 0 failedcargo clippy -p ironclaw_tui --all-features: no warningsCargo.lock🤖 Generated with Claude Code