Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
feat(tui): contextual search bar status feedback
Samir Hossains4361f98fae3c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5901f89..dd52470 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -22,8 +22,10 @@and three at ≥160, with row-based `↑`/`↓`, item-step `←`/`→`, grid-awareclick mapping, pagination, prefetching, and scroll clamping. Narrowterminals keep the classic single-column behavior.-- **Status strip**: transient status messages (previously computed but never- rendered) now appear as a slim centered line on the bottom row.+- **Contextual search bar status feedback**: transient status messages (such+ as search clears, provider switching, and cache updates) now display directly+ inside the search bar prompt in accent styling, returning to the mode placeholder+ when the timer expires.- **Scrollable help overlay**: overflowing help content switches to a scrolledsingle column with position indicator; keyboard and wheel scrolling withkey-swallowing so shortcuts no longer act behind the overlay.diff --git a/src/tui/app/mouse.rs b/src/tui/app/mouse.rsindex 10ba793..cce8f67 100644--- a/src/tui/app/mouse.rs+++ b/src/tui/app/mouse.rs@@ -15,13 +15,9 @@ impl App {return None;}- let screen_area = ratatui::layout::Rect {- height: area.height.saturating_sub(1),- ..area- };match self.state.active_screen {- Screen::Home => self.handle_home_mouse(col, row, screen_area),- Screen::Details => self.handle_details_mouse(col, row, screen_area),+ Screen::Home => self.handle_home_mouse(col, row, area),+ Screen::Details => self.handle_details_mouse(col, row, area),}}diff --git a/src/tui/app/run.rs b/src/tui/app/run.rsindex 7c1b79c..365998d 100644--- a/src/tui/app/run.rs+++ b/src/tui/app/run.rs@@ -484,21 +484,12 @@ impl App {download_area = Some(chunks[1]);}- let screen_area = ratatui::layout::Rect {- height: main_area.height.saturating_sub(1),- ..main_area- };match self.state.active_screen {Screen::Home => {- crate::tui::screens::home::draw(frame, screen_area, &mut self.state, &self.theme);+ crate::tui::screens::home::draw(frame, main_area, &mut self.state, &self.theme);}Screen::Details => {- crate::tui::screens::details::draw(- frame,- screen_area,- &mut self.state,- &self.theme,- );+ crate::tui::screens::details::draw(frame, main_area, &mut self.state, &self.theme);}}@@ -506,7 +497,6 @@ impl App {crate::tui::screens::help::draw(frame, main_area, &self.state, &self.theme);}- self.draw_status_strip(frame, area);self.draw_download_gauge(frame, download_area);self.draw_theme_picker(frame, area);self.draw_update_modal(frame, area);@@ -599,28 +589,6 @@ impl App {}}- fn draw_status_strip(&self, frame: &mut Frame, area: Rect) {- if self.state.status_timer > 0 && !self.state.status_message.is_empty() {- let bottom = area.height.saturating_sub(1);- let message = crate::tui::text::truncate_width(- &self.state.status_message,- (area.width as usize).saturating_sub(4),- );- let strip_area = ratatui::layout::Rect {- x: 0,- y: bottom,- width: area.width,- height: 1,- };- frame.render_widget(- ratatui::widgets::Paragraph::new(format!(" {message} "))- .alignment(ratatui::layout::Alignment::Center)- .style(self.theme.accent),- strip_area,- );- }- }-fn draw_download_gauge(&self, frame: &mut Frame, download_area: Option<Rect>) {if let Some(prog) = self.state.download_progress {if let Some(dl_area) = download_area {diff --git a/src/tui/screens/home.rs b/src/tui/screens/home.rsindex 2c60645..8e25dfe 100644--- a/src/tui/screens/home.rs+++ b/src/tui/screens/home.rs@@ -441,8 +441,11 @@ fn search_content(.saturating_sub(4).saturating_sub(crate::tui::text::width(prefix) as u16).saturating_sub(cursor_width as u16) as usize;+ let has_status = state.status_timer > 0 && !state.status_message.is_empty();let content = if state.search_query.is_empty() {- if state.is_tv_mode {+ if has_status && !editing {+ crate::tui::text::truncate_width(&state.status_message, available)+ } else if state.is_tv_mode {"Search live channels…".to_string()} else if state.is_addon_mode {"Search movies and series via addons…".to_string()@@ -490,6 +493,10 @@ fn render_search_bar(]).split(area);let real_cursor = view == SearchViewState::Editing && show_cursor && !state.basic_terminal;+ let has_status = state.status_timer > 0+ && !state.status_message.is_empty()+ && state.search_query.is_empty()+ && view != SearchViewState::Editing;let mut paragraph = Paragraph::new(search_content(state,view,@@ -499,6 +506,8 @@ fn render_search_bar()).style(if view == SearchViewState::Editing {theme.text+ } else if has_status {+ theme.accent} else if state.search_query.is_empty() {theme.text_dim} else {