mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
fix: address CI failures — license, rust-version, formatting, manifest warnings
- Add license = "MIT OR Apache-2.0" to ironclaw_frontend Cargo.toml (cargo-deny) - Fix rust-version to 1.92 to match other crates - Log warning for invalid widget manifests instead of silent skip - Run cargo fmt across all files Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
name = "ironclaw_frontend"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
rust-version = "1.92"
|
||||
description = "Frontend assets, layout configuration, and widget extension system for IronClaw"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[package.metadata.dist]
|
||||
dist = false
|
||||
|
||||
@@ -92,10 +92,7 @@ pub fn assemble_index(base_html: &str, bundle: &FrontendBundle) -> String {
|
||||
// Custom CSS
|
||||
if let Some(ref custom_css) = bundle.custom_css {
|
||||
if !custom_css.trim().is_empty() {
|
||||
body_injections.push(format!(
|
||||
"<style data-custom-css>{}</style>",
|
||||
custom_css
|
||||
));
|
||||
body_injections.push(format!("<style data-custom-css>{}</style>", custom_css));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,10 @@ pub async fn frontend_widgets_handler(
|
||||
) -> Result<Json<Vec<WidgetManifest>>, (StatusCode, String)> {
|
||||
let workspace = resolve_workspace(&state, &user).await?;
|
||||
|
||||
let entries = workspace.list("frontend/widgets/").await.unwrap_or_default();
|
||||
let entries = workspace
|
||||
.list("frontend/widgets/")
|
||||
.await
|
||||
.unwrap_or_default();
|
||||
|
||||
let mut manifests = Vec::new();
|
||||
for entry in entries {
|
||||
@@ -86,8 +89,14 @@ pub async fn frontend_widgets_handler(
|
||||
}
|
||||
let manifest_path = format!("frontend/widgets/{}/manifest.json", entry.name());
|
||||
if let Ok(doc) = workspace.read(&manifest_path).await {
|
||||
if let Ok(manifest) = serde_json::from_str::<WidgetManifest>(&doc.content) {
|
||||
manifests.push(manifest);
|
||||
match serde_json::from_str::<WidgetManifest>(&doc.content) {
|
||||
Ok(manifest) => manifests.push(manifest),
|
||||
Err(e) => {
|
||||
tracing::warn!(
|
||||
path = %manifest_path,
|
||||
"skipping widget with invalid manifest: {e}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ pub mod users;
|
||||
pub mod chat;
|
||||
#[allow(dead_code)]
|
||||
pub mod extensions;
|
||||
pub mod frontend;
|
||||
#[allow(dead_code)]
|
||||
pub mod settings;
|
||||
#[allow(dead_code)]
|
||||
pub mod static_files;
|
||||
pub mod frontend;
|
||||
pub mod webhooks;
|
||||
|
||||
@@ -33,6 +33,10 @@ use crate::channels::relay::DEFAULT_RELAY_NAME;
|
||||
use crate::channels::web::auth::{
|
||||
AuthenticatedUser, CombinedAuthState, UserIdentity, auth_middleware,
|
||||
};
|
||||
use crate::channels::web::handlers::frontend::{
|
||||
frontend_layout_handler, frontend_layout_update_handler, frontend_widget_file_handler,
|
||||
frontend_widgets_handler,
|
||||
};
|
||||
use crate::channels::web::handlers::jobs::{
|
||||
job_files_list_handler, job_files_read_handler, jobs_cancel_handler, jobs_detail_handler,
|
||||
jobs_events_handler, jobs_list_handler, jobs_prompt_handler, jobs_restart_handler,
|
||||
@@ -46,10 +50,6 @@ use crate::channels::web::handlers::routines::{
|
||||
routines_delete_handler, routines_detail_handler, routines_list_handler,
|
||||
routines_summary_handler, routines_toggle_handler, routines_trigger_handler,
|
||||
};
|
||||
use crate::channels::web::handlers::frontend::{
|
||||
frontend_layout_handler, frontend_layout_update_handler, frontend_widget_file_handler,
|
||||
frontend_widgets_handler,
|
||||
};
|
||||
use crate::channels::web::handlers::skills::{
|
||||
skills_install_handler, skills_list_handler, skills_remove_handler, skills_search_handler,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user