EnhancedTuiApp

Struct EnhancedTuiApp 

Source
pub struct EnhancedTuiApp { /* private fields */ }

Implementations§

Source§

impl EnhancedTuiApp

Source

pub fn register_debug_providers(&mut self)

Register all available debug providers with the debug registry

Source

pub fn generate_debug_report(&self) -> String

Generate debug report using the registry

Source

pub fn list_debug_providers(&self) -> Vec<String>

Get list of registered debug providers

Source§

impl EnhancedTuiApp

Source

pub fn generate_registry_debug_info(&mut self) -> String

Generate debug info using the new registry system This can be called alongside the existing debug generation to compare outputs

Source

pub fn toggle_debug_mode_with_registry(&mut self, use_registry: bool)

Toggle debug mode with optional use of new registry system Set use_registry to true to use the new system, false for legacy

Source

pub fn should_use_registry_debug(&self) -> bool

Check if we should use the new debug system This can be controlled by config or environment variable in the future

Source§

impl EnhancedTuiApp

Source

pub fn new(api_url: &str) -> Self

Source

pub fn new_with_dataview(dataview: DataView, source_name: &str) -> Result<Self>

Create a TUI with a DataView - no file loading knowledge needed This is the clean separation: TUI only knows about DataViews

Source

pub fn add_dataview( &mut self, dataview: DataView, source_name: &str, ) -> Result<()>

Add a DataView to the existing TUI (creates a new buffer)

Source

pub fn update_viewport_with_dataview(&mut self, dataview: DataView)

Update the viewport with a new DataView

Source

pub fn vim_search_adapter(&self) -> &RefCell<VimSearchAdapter>

Get vim search adapter (public for orchestrator)

Source

pub fn set_sql_query(&mut self, table_name: &str, raw_table_name: &str)

Pre-populate SQL command with SELECT * FROM table

Source

pub fn run(self) -> Result<()>

Source

pub fn execute_query_v2(&mut self, query: &str) -> Result<()>

Source

pub fn reset_table_state(&mut self)

Source

pub fn calculate_optimal_column_widths(&mut self)

Source

pub fn set_status_message(&mut self, message: impl Into<String>)

Centralized method for setting status messages Ensures consistent logging and state synchronization

Trait Implementations§

Source§

impl ActionHandlerContext for EnhancedTuiApp

Source§

fn previous_row(&mut self)

Source§

fn next_row(&mut self)

Source§

fn move_column_left(&mut self)

Source§

fn move_column_right(&mut self)

Source§

fn page_up(&mut self)

Source§

fn page_down(&mut self)

Source§

fn goto_first_row(&mut self)

Source§

fn goto_last_row(&mut self)

Source§

fn goto_first_column(&mut self)

Source§

fn goto_last_column(&mut self)

Source§

fn goto_row(&mut self, row: usize)

Source§

fn goto_column(&mut self, col: usize)

Source§

fn set_mode(&mut self, mode: AppMode)

Source§

fn get_mode(&self) -> AppMode

Source§

fn set_status_message(&mut self, message: String)

Source§

fn toggle_column_pin(&mut self)

Source§

fn hide_current_column(&mut self)

Source§

fn unhide_all_columns(&mut self)

Source§

fn clear_all_pinned_columns(&mut self)

Source§

fn export_to_csv(&mut self)

Source§

fn export_to_json(&mut self)

Source§

fn yank_cell(&mut self)

Source§

fn yank_row(&mut self)

Source§

fn yank_column(&mut self)

Source§

fn yank_all(&mut self)

Source§

fn yank_query(&mut self)

Source§

fn toggle_selection_mode(&mut self)

Source§

fn toggle_row_numbers(&mut self)

Source§

fn toggle_compact_mode(&mut self)

Source§

fn toggle_case_insensitive(&mut self)

Source§

fn toggle_key_indicator(&mut self)

Source§

fn clear_filter(&mut self)

Source§

fn clear_line(&mut self)

Source§

fn start_filter(&mut self)

Source§

fn start_fuzzy_filter(&mut self)

Source§

fn exit_current_mode(&mut self)

Source§

fn toggle_debug_mode(&mut self)

Source§

fn move_current_column_left(&mut self)

Source§

fn move_current_column_right(&mut self)

Source§

fn next_search_match(&mut self)

Source§

fn previous_search_match(&mut self)

Source§

fn show_column_statistics(&mut self)

Source§

fn cycle_column_packing(&mut self)

Source§

fn navigate_to_viewport_top(&mut self)

Source§

fn navigate_to_viewport_middle(&mut self)

Source§

fn navigate_to_viewport_bottom(&mut self)

Source§

fn move_input_cursor_left(&mut self)

Source§

fn move_input_cursor_right(&mut self)

Source§

fn move_input_cursor_home(&mut self)

Source§

fn move_input_cursor_end(&mut self)

Source§

fn backspace(&mut self)

Source§

fn delete(&mut self)

Source§

fn undo(&mut self)

Source§

fn redo(&mut self)

Source§

fn start_jump_to_row(&mut self)

Source§

fn clear_jump_to_row_input(&mut self)

Source§

fn toggle_cursor_lock(&mut self)

Source§

fn toggle_viewport_lock(&mut self)

Source§

fn show_debug_info(&mut self)

Source§

fn show_pretty_query(&mut self)

Source§

fn show_help(&mut self)

Source§

fn kill_line(&mut self)

Source§

fn kill_line_backward(&mut self)

Source§

fn delete_word_backward(&mut self)

Source§

fn delete_word_forward(&mut self)

Source§

fn expand_asterisk(&mut self)

Source§

fn expand_asterisk_visible(&mut self)

Source§

fn previous_history_command(&mut self)

Source§

fn next_history_command(&mut self)

Source§

impl BufferManagementBehavior for EnhancedTuiApp

Source§

fn buffer_manager(&mut self) -> &mut BufferManager

Source§

fn buffer_handler(&mut self) -> &mut BufferHandler

Source§

fn buffer(&self) -> &dyn BufferAPI

Source§

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source§

fn config(&self) -> &Config

Source§

fn cursor_manager(&mut self) -> &mut CursorManager

Source§

fn set_input_text_with_cursor(&mut self, text: String, cursor: usize)

Source§

fn next_buffer(&mut self) -> String

Switch to the next buffer
Source§

fn previous_buffer(&mut self) -> String

Switch to the previous buffer
Source§

fn quick_switch_buffer(&mut self) -> String

Quick switch to the last used buffer
Source§

fn close_buffer(&mut self) -> (bool, String)

Close the current buffer
Source§

fn switch_to_buffer(&mut self, index: usize) -> String

Switch to a specific buffer by index
Source§

fn buffer_count(&self) -> usize

Get the total number of buffers
Source§

fn current_buffer_index(&self) -> usize

Get the current buffer index
Source§

fn new_buffer(&mut self)

Create a new buffer with current config settings
Source§

fn yank(&mut self)

Yank (copy) from the current buffer
Source§

impl ColumnBehavior for EnhancedTuiApp

Source§

fn viewport_manager(&self) -> &RefCell<Option<ViewportManager>>

Source§

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source§

fn buffer(&self) -> &dyn BufferAPI

Source§

fn state_container(&self) -> &AppStateContainer

Source§

fn is_in_results_mode(&self) -> bool

Source§

fn apply_column_navigation_result( &mut self, result: NavigationResult, direction: &str, )

Source§

fn apply_column_operation_result(&mut self, result: ColumnOperationResult)

Source§

fn hide_current_column(&mut self)

Hide the currently selected column
Source§

fn unhide_all_columns(&mut self)

Unhide all columns
Source§

fn move_current_column_left(&mut self)

Move the current column left in the view
Source§

fn move_current_column_right(&mut self)

Move the current column right in the view
Source§

fn move_column_left(&mut self)

Navigate to the column on the left
Source§

fn move_column_right(&mut self)

Navigate to the column on the right
Source§

fn goto_first_column(&mut self)

Navigate to the first column
Source§

fn goto_last_column(&mut self)

Navigate to the last column
Source§

impl DebugContext for EnhancedTuiApp

Source§

fn buffer(&self) -> &dyn BufferAPI

Source§

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source§

fn get_debug_widget(&self) -> &DebugWidget

Source§

fn get_debug_widget_mut(&mut self) -> &mut DebugWidget

Source§

fn get_shadow_state(&self) -> &RefCell<ShadowStateManager>

Source§

fn get_buffer_manager(&self) -> &BufferManager

Source§

fn get_viewport_manager(&self) -> &RefCell<Option<ViewportManager>>

Source§

fn get_state_container(&self) -> &AppStateContainer

Source§

fn get_state_container_mut(&mut self) -> &mut AppStateContainer

Source§

fn get_navigation_timings(&self) -> &Vec<String>

Source§

fn get_render_timings(&self) -> &Vec<String>

Source§

fn debug_current_buffer(&mut self)

Source§

fn get_input_cursor(&self) -> usize

Source§

fn get_visual_cursor(&self) -> (usize, usize)

Source§

fn get_input_text(&self) -> String

Source§

fn get_buffer_mut_if_available(&mut self) -> Option<&mut Buffer>

Source§

fn set_mode_via_shadow_state(&mut self, mode: AppMode, trigger: &str)

Source§

fn collect_current_state( &self, ) -> (AppMode, String, String, Option<usize>, usize, usize, usize)

Source§

fn format_buffer_manager_state(&self) -> String

Source§

fn debug_generate_viewport_efficiency(&self) -> String

Source§

fn debug_generate_key_chord_info(&self) -> String

Source§

fn debug_generate_search_modes_info(&self) -> String

Source§

fn debug_generate_state_container_info(&self) -> String

Source§

fn collect_debug_info(&self) -> String

Source§

fn debug_generate_parser_info(&self, query: &str) -> String

Source§

fn debug_generate_navigation_state(&self) -> String

Source§

fn debug_generate_column_search_state(&self) -> String

Source§

fn debug_generate_trace_logs(&self) -> String

Source§

fn debug_generate_state_logs(&self) -> String

Source§

fn toggle_debug_mode(&mut self)

Source§

fn format_navigation_timing(&self) -> String

Source§

fn format_render_timing(&self) -> String

Source§

fn debug_extract_timing(&self, s: &str) -> Option<f64>

Source§

fn debug_generate_memory_info(&self) -> String

Source§

fn debug_generate_buffer_state( &self, mode: AppMode, last_query: &str, input_text: &str, cursor_pos: usize, visual_cursor: usize, ) -> String

Source§

fn debug_generate_results_state( &self, results_count: usize, filtered_count: usize, selected_row: Option<usize>, current_column: usize, ) -> String

Source§

fn debug_generate_viewport_state(&self) -> String

Source§

fn debug_generate_dataview_state(&self) -> String

Source§

fn debug_generate_datatable_schema(&self) -> String

Source§

fn render_debug(&self, f: &mut Frame<'_>, area: Rect)

Source§

fn render_pretty_query(&self, f: &mut Frame<'_>, area: Rect)

Source§

impl InputBehavior for EnhancedTuiApp

Source§

fn buffer_manager(&mut self) -> &mut BufferManager

Source§

fn cursor_manager(&mut self) -> &mut CursorManager

Source§

fn set_input_text_with_cursor(&mut self, text: String, cursor: usize)

Source§

fn state_container(&self) -> &AppStateContainer

Source§

fn state_container_mut(&mut self) -> &mut AppStateContainer

Source§

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source§

fn set_mode_with_sync(&mut self, mode: AppMode, trigger: &str)

Source§

fn get_current_input(&mut self) -> (String, usize)

Source§

fn apply_text_result(&mut self, result: TextOperationResult)

Source§

fn apply_cursor_result(&mut self, result: CursorMovementResult)

Source§

fn kill_line(&mut self)

Kill text from cursor to end of line (Ctrl+K)
Source§

fn kill_line_backward(&mut self)

Kill text from beginning of line to cursor (Ctrl+U)
Source§

fn delete_word_backward(&mut self)

Delete word backward from cursor (Ctrl+W)
Source§

fn delete_word_forward(&mut self)

Delete word forward from cursor (Alt+D)
Source§

fn move_cursor_word_backward(&mut self)

Move cursor backward one word (Ctrl+Left or Alt+B)
Source§

fn move_cursor_word_forward(&mut self)

Move cursor forward one word (Ctrl+Right or Alt+F)
Source§

fn jump_to_prev_token(&mut self)

Jump to previous SQL token (Alt+[)
Source§

fn jump_to_next_token(&mut self)

Jump to next SQL token (Alt+])
Source§

fn insert_char(&mut self, ch: char)

Insert a character at the cursor position
Source§

fn delete_char(&mut self)

Delete character at cursor position (Delete key)
Source§

fn backspace(&mut self)

Delete character before cursor (Backspace)
Source§

fn clear_input(&mut self)

Clear all input text
Source§

fn get_jump_to_row_input(&self) -> String

Get jump-to-row input text
Source§

fn set_jump_to_row_input(&mut self, input: String)

Set jump-to-row input text
Source§

fn clear_jump_to_row_input(&mut self)

Clear jump-to-row input
Source§

fn process_jump_to_row_key(&mut self, key: KeyEvent) -> bool

Process jump-to-row input key event (handles all keys except Enter)
Source§

impl NavigationBehavior for EnhancedTuiApp

Source§

fn viewport_manager(&self) -> &RefCell<Option<ViewportManager>>

Source§

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source§

fn buffer(&self) -> &dyn BufferAPI

Source§

fn state_container(&self) -> &AppStateContainer

Source§

fn state_container_mut(&mut self) -> &mut AppStateContainer

Source§

fn get_row_count(&self) -> usize

Source§

fn set_mode_with_sync(&mut self, mode: AppMode, trigger: &str)

Source§

fn apply_row_navigation_result(&mut self, result: RowNavigationResult)

Source§

fn sync_row_state(&mut self, row: usize)

Centralized method to sync row state across all components This ensures Buffer, AppStateContainer, and any other row tracking stays in sync
Source§

fn next_row(&mut self)

Source§

fn previous_row(&mut self)

Source§

fn goto_first_row(&mut self)

Source§

fn goto_last_row(&mut self)

Source§

fn page_down(&mut self)

Source§

fn page_up(&mut self)

Source§

fn half_page_down(&mut self)

Source§

fn half_page_up(&mut self)

Source§

fn goto_line(&mut self, line_number: usize)

Source§

fn goto_viewport_top(&mut self)

Navigate to the top of the current viewport
Source§

fn goto_viewport_middle(&mut self)

Navigate to the middle of the current viewport
Source§

fn goto_viewport_bottom(&mut self)

Navigate to the bottom of the current viewport
Source§

fn complete_jump_to_row(&mut self, input: &str)

Complete jump-to-row operation (called on Enter key)
Source§

impl YankBehavior for EnhancedTuiApp

Source§

fn buffer(&self) -> &dyn BufferAPI

Source§

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source§

fn state_container(&self) -> &AppStateContainer

Source§

fn set_status_message(&mut self, message: String)

Source§

fn set_error_status(&mut self, prefix: &str, error: Error)

Source§

fn yank_cell(&mut self)

Yank the currently selected cell
Source§

fn yank_row(&mut self)

Yank the currently selected row
Source§

fn yank_column(&mut self)

Yank the currently selected column
Source§

fn yank_all(&mut self)

Yank all visible data
Source§

fn yank_query(&mut self)

Yank the current query
Source§

fn yank_as_test_case(&mut self)

Yank current query and results as a complete test case (Ctrl+T in debug mode)
Source§

fn yank_debug_with_context(&mut self)

Yank debug dump with context for manual test creation (Shift+Y in debug mode)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,