Skip to content

refactor(tui): drop ratatui-passthrough wrappers in RenderWindow - #401

Merged
Kohei-Wada merged 1 commit into
mainfrom
refactor/drop-window-passthroughs
Jul 24, 2026
Merged

refactor(tui): drop ratatui-passthrough wrappers in RenderWindow#401
Kohei-Wada merged 1 commit into
mainfrom
refactor/drop-window-passthroughs

Conversation

@Kohei-Wada

Copy link
Copy Markdown
Owner

Closes #321.

paragraph / table / list were 1-line clamp + render_*_widget passthroughs to ratatui. Removed them and exposed RenderWindow::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.rs also used paragraph/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 from panel() inner / area() splits, which are already inside the component's area.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Ktx7C4Zf26MhQABaPNYze

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

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Kohei-Wada
Kohei-Wada merged commit 95e4b7f into main Jul 24, 2026
5 checks passed
@Kohei-Wada
Kohei-Wada deleted the refactor/drop-window-passthroughs branch July 24, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(tui): drop ratatui-passthrough wrappers in compositor/window.rs

1 participant