mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Update docs screenshots and fix demo workflow serialization
Replace docs/images screenshots (runs-board, run-detail, workflow-example) with fresh captures from the current FABRO-branded UI in demo mode. Also fix a panic in arc-api demo::run_config_to_api where None-valued HashMap fields (e.g. sandbox.env) serialized to JSON null, which failed to deserialize into non-optional HashMap fields in RunConfiguration. Added strip_nulls helper to clean the intermediate JSON value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e7b8b3c938
commit
c3f2ccd68a
4 changed files with 16 additions and 1 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 3.8 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.9 MiB |
|
|
@ -1452,7 +1452,22 @@ mod workflows {
|
|||
fn run_config_to_api(
|
||||
cfg: arc_workflows::cli::run_config::WorkflowRunConfig,
|
||||
) -> RunConfiguration {
|
||||
serde_json::from_value(serde_json::to_value(cfg).unwrap()).unwrap()
|
||||
fn strip_nulls(val: serde_json::Value) -> serde_json::Value {
|
||||
match val {
|
||||
serde_json::Value::Object(map) => serde_json::Value::Object(
|
||||
map.into_iter()
|
||||
.filter(|(_, v)| !v.is_null())
|
||||
.map(|(k, v)| (k, strip_nulls(v)))
|
||||
.collect(),
|
||||
),
|
||||
serde_json::Value::Array(arr) => {
|
||||
serde_json::Value::Array(arr.into_iter().map(strip_nulls).collect())
|
||||
}
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
let val = strip_nulls(serde_json::to_value(cfg).unwrap());
|
||||
serde_json::from_value(val).unwrap()
|
||||
}
|
||||
|
||||
pub fn detail(name: &str) -> Option<WorkflowDetail> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue