refactor(tui): drop ratatui-passthrough wrappers in RenderWindow - #401
Merged
Conversation
paragraph / table / list were 1-line clamp + render_*_widget passthroughs. Expose RenderWindow::frame() instead; callers (card_component, palette panel) render plain ratatui widgets directly into rects already derived from panel()/area(), so the clamp added nothing. The semantic helpers (panel, scrollbar, style) stay. Closes #321
There was a problem hiding this comment.
The refactor successfully removes the 1-line ratatui widget passthroughs (paragraph, table, list) from RenderWindow and exposes frame() directly. All call sites have been updated consistently to use win.frame().render_widget() and win.frame().render_stateful_widget(). The semantic helpers (panel, scrollbar, style) that encode theme/layout policy are correctly retained. No defects found.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #321.
paragraph/table/listwere 1-line clamp +render_*_widgetpassthroughs to ratatui. Removed them and exposedRenderWindow::frame() -> &mut Frame; call sites render plain ratatui widgets directly. The semantic wrappers that encode theme/layout policy (panel,scrollbar,style) stay.One deviation from the issue text:
palette/panel.rsalso usedparagraph/table(the issue said card_component was the only caller) — updated it the same way. The clamp the passthroughs did was a no-op at every call site: all rects come frompanel()inner /area()splits, which are already inside the component's area.🤖 Generated with Claude Code
https://claude.ai/code/session_019Ktx7C4Zf26MhQABaPNYze