diff --git a/Cargo.toml b/Cargo.toml index 330a0f1..468217e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,21 +53,5 @@ urlencoding = "2.1" uuid = { version = "1.11", features = ["serde", "v4"] } webbrowser = "0.8" -[lints.rust] -unused_imports = "warn" -unused_variables = "warn" -unused_mut = "warn" -unsafe_code = "deny" -missing_debug_implementations = "warn" - -[lints.clippy] -all = "warn" -pedantic = "warn" -nursery = "warn" -cargo = "warn" -unwrap_used = "warn" -expect_used = "warn" -panic = "warn" -todo = "warn" -# Disabled: transitive dependencies we cannot control -multiple_crate_versions = "allow" +[lints] +workspace = true diff --git a/build.rs b/build.rs index b5d9074..174fea2 100644 --- a/build.rs +++ b/build.rs @@ -1,9 +1,3 @@ -//! Build script for botui -//! -//! This is a minimal build script since botui is now a pure web project. -//! Tauri build requirements have been moved to the botapp crate. fn main() { - // No build steps required for pure web UI - // Tauri-specific builds are now in botapp } diff --git a/src/http_client.rs b/src/http_client.rs index 78dc2ba..bc7e5b4 100644 --- a/src/http_client.rs +++ b/src/http_client.rs @@ -1,10 +1,5 @@ -//! HTTP client for communicating with botserver -//! -//! This module re-exports the HTTP client from botlib. -//! All implementation is now in the shared library. #![cfg(not(feature = "desktop"))] -// Re-export everything from botlib's http_client pub use botlib::http_client::*; pub use botlib::models::ApiResponse; diff --git a/src/lib.rs b/src/lib.rs index b366bd8..3623d86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,16 +1,6 @@ -//! `BotUI` - General Bots Pure Web UI -//! -//! This crate provides the web UI layer for General Bots: -//! - Serves static HTMX UI files (suite, minimal) -//! - Proxies API requests to botserver -//! - `WebSocket` support for real-time communication -//! -//! For desktop/mobile native features, see the `botapp` crate which -//! wraps this pure web UI with Tauri. pub mod shared; pub mod ui_server; -// Re-export commonly used types pub use shared::AppState; pub use ui_server::configure_router; diff --git a/src/main.rs b/src/main.rs index 09a1310..ef68ee8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,3 @@ -//! `BotUI` main entry point -//! -//! Starts the web UI server for General Bots. use log::info; use std::net::SocketAddr; diff --git a/src/shared/mod.rs b/src/shared/mod.rs index dd9a1b6..d7bb9a6 100644 --- a/src/shared/mod.rs +++ b/src/shared/mod.rs @@ -1,7 +1,3 @@ -//! Shared types and state management for `BotUI` -//! -//! This module provides shared application state and utilities -//! used across the UI server. pub mod state; diff --git a/src/shared/state.rs b/src/shared/state.rs index 452d4f5..8f35ff4 100644 --- a/src/shared/state.rs +++ b/src/shared/state.rs @@ -1,22 +1,13 @@ -//! Application state management -//! -//! This module contains the shared application state that is passed to all -//! route handlers and provides access to the `BotServer` client. use botlib::http_client::BotServerClient; use std::sync::Arc; -/// Application state shared across all handlers #[derive(Clone, Debug)] pub struct AppState { - /// HTTP client for communicating with `BotServer` pub client: Arc, } impl AppState { - /// Create a new application state - /// - /// Uses `BOTSERVER_URL` environment variable if set, otherwise defaults to localhost:8080 #[must_use] pub fn new() -> Self { let url = std::env::var("BOTSERVER_URL").ok(); @@ -25,7 +16,6 @@ impl AppState { } } - /// Check if the `BotServer` is healthy pub async fn health_check(&self) -> bool { self.client.health_check().await } diff --git a/src/ui_server/mod.rs b/src/ui_server/mod.rs index e50b179..525e7c5 100644 --- a/src/ui_server/mod.rs +++ b/src/ui_server/mod.rs @@ -1,6 +1,3 @@ -//! UI Server module for `BotUI` -//! -//! Handles HTTP routing, WebSocket proxying, and static file serving. use axum::{ body::Body,