Convert SectionTree and all remaining callers to ScrollPane

SectionTree.scroll is now a ScrollPaneState. All callers of
render_scrollable replaced with ScrollPane::render_stateful_widget.

Deleted render_scrollable and its imports — no hand-rolled scroll
rendering remains outside of scroll_pane.rs.

Co-Authored-By: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
ProofOfConcept 2026-04-11 01:42:49 -04:00
parent 4a1f5acb85
commit e17118e4c9
3 changed files with 19 additions and 47 deletions

View file

@ -6,7 +6,7 @@ use ratatui::{
};
use super::{App, ScreenView, screen_legend};
use super::widgets::{SectionTree, SectionView, section_to_view, pane_block, render_scrollable, tree_legend};
use super::widgets::{SectionTree, SectionView, section_to_view, pane_block, tree_legend};
use crate::agent::context::{AstNode, NodeBody, Ast};
pub(crate) struct ConsciousScreen {
@ -177,6 +177,7 @@ impl ScreenView for ConsciousScreen {
.title_top(Line::from(screen_legend()).left_aligned())
.title_bottom(tree_legend());
render_scrollable(frame, area, lines, block, self.tree.scroll);
let widget = super::scroll_pane::ScrollPane::new(&lines).block(block);
frame.render_stateful_widget(widget, area, &mut self.tree.scroll);
}
}