This document provides comprehensive guidance for AI assistants working on the Hielo codebase.
Hielo (Spanish for "ice") is a native desktop application for visualizing Apache Iceberg table metadata and snapshot history. Built with Rust and Dioxus, it provides a cross-platform GUI for exploring Iceberg tables from REST and AWS Glue catalogs.
- Multiple catalog support (REST and AWS Glue catalogs)
- Schema visualization with nested field support and schema evolution tracking
- Partition specification viewing with transform functions
- Snapshot timeline with filtering and table health analytics
- Persistent catalog configuration (stored in
~/.hielo/config.json)
- Language: Rust (2024 edition)
- UI Framework: Dioxus 0.6 (desktop target)
- Styling: Tailwind CSS (loaded via CDN)
- Iceberg Integration: iceberg-rs 0.6.0 with REST and Glue catalog support
- Async Runtime: Tokio
hielo/
├── src/
│ ├── main.rs # Application entry point, main App component, navigation
│ ├── catalog.rs # Catalog management (REST/Glue connections, namespace/table listing)
│ ├── catalog_ui.rs # Catalog connection forms and table browser UI
│ ├── components.rs # Table view components (Overview, Schema, Partitions, Snapshots)
│ ├── data.rs # Core data types (IcebergTable, Schema, Snapshot, health metrics)
│ ├── analytics.rs # Table health analytics engine (scoring, alerts, recommendations)
│ ├── config.rs # Configuration persistence (~/.hielo/config.json)
│ └── iceberg_adapter.rs # Conversion from iceberg-rs types to internal types
├── Cargo.toml # Rust dependencies and project config
├── Dioxus.toml # Dioxus framework configuration
└── .github/workflows/ # CI/CD (build, test, cross-platform releases)
- Application state management (
AppState,AppTab,TableViewTab) - Main
Appcomponent with tab-based navigation - Left navigation pane with catalog/namespace/table tree
- Global search modal (Ctrl+K)
- Event handlers for table loading and tab management
CatalogManager- manages catalog connections and queriesCatalogConfig- configuration for REST/Glue catalogsCatalogConnection- active connection with catalog trait object- Async methods:
connect_catalog,list_namespaces,list_tables,load_table
CatalogConnectionScreen- initial connection screenRestCatalogForm/GlueCatalogForm- catalog-specific connection formsTableBrowser- namespace and table selection UISavedCatalogsSection- quick connect to saved catalogs
TableOverviewTab- table metadata and properties displayTableSchemaTab- schema visualization with evolution comparisonTablePartitionsTab- partition specification displaySnapshotTimelineTab- snapshot history with filtering and health analytics- Health analytics display components (
HealthScoreBadge,HealthCategoryCard)
IcebergTable- main table representation with all metadataTableSchema,NestedField,DataType- schema typesSnapshot,Summary- snapshot informationPartitionSpec,PartitionField,PartitionTransform- partitioning- Health analytics types (
TableHealthMetrics,FileHealthMetrics, etc.)
TableAnalytics::compute_health_metrics()- main entry point for health analysis- Health scoring based on industry best practices (Netflix, Salesforce, AWS)
- Alert generation for small files, high snapshot frequency, compaction needs
- Maintenance recommendations with priority and effort levels
AppConfig- persistent configuration with catalog list- Load/save to
~/.hielo/config.json - Catalog CRUD operations with uniqueness validation
convert_iceberg_table()- main conversion function- Type conversions from iceberg-rs to internal representations
- Schema, snapshot, and partition spec conversion helpers
IcebergTable {
name: String,
namespace: String,
catalog_name: String,
location: String,
schema: TableSchema,
schemas: Vec<TableSchema>, // Historical schemas
snapshots: Vec<Snapshot>,
current_snapshot_id: Option<u64>,
properties: HashMap<String, String>,
partition_spec: Option<PartitionSpec>,
partition_specs: Vec<PartitionSpec>, // Historical specs
}enum CatalogType { Rest, Glue }
CatalogConfig {
catalog_type: CatalogType,
name: String,
config: HashMap<String, String>, // uri, warehouse, region, etc.
}# Run in development mode
cargo run
# Build release binary
cargo build --release
# Run tests
cargo test
# Check formatting
cargo fmt --check
# Apply formatting
cargo fmt
# Run clippy lints
cargo clippy -- -D warnings
# Run all checks (what CI does)
cargo check --all-targets --all-features
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo testsudo apt-get install libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelfxcode-select --install- WebView2 (pre-installed on Windows 10/11)
- Visual Studio Build Tools with C++ tools
- Component Definition: Use
#[component]attribute with PascalCase names
#[component]
fn MyComponent(prop1: String, prop2: Signal<SomeType>) -> Element {
rsx! { /* ... */ }
}- State Management: Use Dioxus signals for reactive state
let mut my_state = use_signal(|| initial_value);
my_state.set(new_value); // Update
my_state() // Read- Async Operations: Use
spawnfor async operations
spawn(async move {
let result = some_async_operation().await;
my_signal.set(result);
});- Event Handlers: Use
EventHandler<T>for callbacks
on_table_selected: EventHandler<(String, String, String)>
on_table_selected.call((catalog, namespace, table));- Tailwind CSS classes via CDN
- Format strings for conditional classes:
class: format!("base-class {}", if condition { "active" } else { "inactive" })- Use
anyhow::Resultfor fallible operations - Custom
CatalogErrorenum for catalog-specific errors - Log errors with
log::error!()/tracing::info!()
- Modules: snake_case (
catalog_ui.rs) - Types: PascalCase (
IcebergTable) - Functions: snake_case (
load_table) - Components: PascalCase (
TableOverviewTab)
The project uses standard Rust testing:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_something() {
// Test code
}
}Key test areas:
config.rs- Configuration persistence and catalog managementiceberg_adapter.rs- Type conversions
Run tests with: cargo test
Located in .github/workflows/:
-
ci.yml - Main CI workflow
checkjob:cargo checkqualityjob:cargo fmt --checkandcargo clippybuildjob: Cross-platform builds (Linux, macOS, Windows)
-
build.yml - Reusable cross-platform build workflow
- Linux x86_64, macOS x86_64/ARM64, Windows x86_64
- Binary stripping for release builds
- SHA256 checksums for artifacts
-
build-release.yml - Release builds (triggered on tags)
- User connects to catalog via
CatalogConnectionScreen CatalogManagerstores connection and persists config- Navigation pane shows catalogs -> namespaces -> tables
- Table selection triggers
load_tablewhich:- Calls
catalog.load_table()for iceberg-rs Table - Converts to internal
IcebergTableviaiceberg_adapter - Opens new tab with table view
- Calls
CatalogConnectionScreen
-> RestCatalogForm / GlueCatalogForm
-> CatalogManager.connect_catalog()
-> Creates Arc<dyn Catalog> (iceberg-rs)
-> Stores CatalogConnection
-> Persists to ~/.hielo/config.json
LeftNavigationPane (table click)
-> load_table closure
-> CatalogManager.load_table()
-> iceberg_adapter::convert_iceberg_table()
-> Creates AppTab::Table
-> Switches to new tab
- Add variant to
TableViewTabenum inmain.rs - Create component in
components.rs - Add button and match arm in table view section of
main.rs
- Add variant to
CatalogTypeenum incatalog.rs - Create connection method in
CatalogManager - Add form component in
catalog_ui.rs - Update catalog type selection UI
- Update thresholds in
analytics.rs(HealthThresholds) - Modify
compute_health_metrics()for new metrics - Add alert generation in
generate_alerts() - Update UI components in
components.rs
- Catalog/namespace data is loaded lazily on expansion
- Table metadata is cached per tab (no auto-refresh)
- Large snapshot lists are filtered client-side
- Debounced filtering in navigation pane (300ms)
- Auth tokens are hidden in UI display (
***HIDDEN***) - AWS credentials use standard SDK credential chain
- No sensitive data logged (tokens sanitized)
- Config file stored in user's home directory with default permissions