agent-orchestrator/ui-dioxus/src/components/project_grid.rs
Hibryda f3d2ca78ba feat: add Dioxus and GPUI UI prototypes for framework comparison
Dioxus (ui-dioxus/): 2,169 lines, WebView mode (same wry as Tauri),
  Catppuccin theme, 12 components, agor-core integration, compiles clean.
  Evolution path — keeps xterm.js, gradual migration from Tauri.

GPUI (ui-gpui/): 2,490 lines, GPU-accelerated rendering, alacritty_terminal
  for native terminal, 17 files, Catppuccin palette, demo data.
  Revolution path — pure Rust UI, 120fps target, no WebView.

Both are standalone (not in workspace), share agor-core backend.
Created for side-by-side comparison to inform framework decision.
2026-03-19 06:05:58 +01:00

32 lines
907 B
Rust

/// ProjectGrid — responsive grid of ProjectBox cards.
///
/// Mirrors the Svelte app's ProjectGrid.svelte: CSS grid with
/// auto-fit columns, minimum 28rem each.
use dioxus::prelude::*;
use crate::state::{AgentStatus, ProjectConfig};
use crate::components::project_box::ProjectBox;
#[component]
pub fn ProjectGrid(projects: Vec<ProjectConfig>) -> Element {
// Assign different demo statuses to show variety
let statuses = vec![
AgentStatus::Running,
AgentStatus::Idle,
AgentStatus::Done,
AgentStatus::Stalled,
];
rsx! {
div { class: "project-grid",
for (i, project) in projects.iter().enumerate() {
ProjectBox {
key: "{project.id}",
project: project.clone(),
initial_status: statuses[i % statuses.len()],
}
}
}
}
}