Skip to content

Refactor v43 column ops via trait#7

Merged
TimelordUK merged 2 commits intomainfrom
refactor-v43-column-ops-via-trait
Aug 13, 2025
Merged

Refactor v43 column ops via trait#7
TimelordUK merged 2 commits intomainfrom
refactor-v43-column-ops-via-trait

Conversation

@TimelordUK
Copy link
Owner

No description provided.

This commit migrates all column-related operations in enhanced_tui.rs
to use the DataProvider trait instead of directly accessing JSON data.

Changes:
- calculate_column_statistics: Now uses DataProvider::get_row() to extract
  column data instead of directly accessing results.data JSON
- sort_by_column: Uses DataProvider::get_column_names() for column names
  instead of extracting from JSON objects
- calculate_optimal_column_widths: Uses DataProvider::get_column_widths()
  instead of passing raw JSON to ColumnManager
- move_column_right: Uses DataProvider::get_column_count() to determine
  max columns instead of checking JSON object length
- goto_last_column: Also uses DataProvider::get_column_count()

This is part of the incremental migration strategy (V43) to decouple
the TUI from the underlying data format, moving towards a clean
DataTable/DataView architecture.

All tests pass and the application remains fully functional.
@TimelordUK TimelordUK merged commit c84fd0c into main Aug 13, 2025
2 checks passed
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.

1 participant