{"record":{"id":"2f09da6ffcd2ad70","repo":"sxyazi/yazi","slug":"invalid-summary-in-updateprogressform","errorCode":null,"errorMessage":"Invalid 'summary' in UpdateProgressForm","messagePattern":"Invalid 'summary' in UpdateProgressForm","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-parser/src/app/update_progress.rs","lineNumber":16,"sourceCode":"use anyhow::bail;\nuse mlua::{ExternalError, FromLua, IntoLua, Lua, Value};\nuse yazi_scheduler::TaskSummary;\nuse yazi_shared::event::ActionCow;\n\n#[derive(Debug)]\npub struct UpdateProgressForm {\n\tpub summary: TaskSummary,\n}\n\nimpl TryFrom<ActionCow> for UpdateProgressForm {\n\ttype Error = anyhow::Error;\n\n\tfn try_from(mut a: ActionCow) -> Result<Self, Self::Error> {\n\t\tlet Some(summary) = a.take_any(\"summary\") else {\n\t\t\tbail!(\"Invalid 'summary' in UpdateProgressForm\");\n\t\t};\n\n\t\tOk(Self { summary })\n\t}\n}\n\nimpl FromLua for UpdateProgressForm {\n\tfn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Err(\"unsupported\".into_lua_err()) }\n}\n\nimpl IntoLua for UpdateProgressForm {\n\tfn into_lua(self, _: &Lua) -> mlua::Result<Value> { Err(\"unsupported\".into_lua_err()) }\n}\n","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-parser/src/app/update_progress.rs#L1-L30","documentation":"`UpdateProgressForm::try_from(ActionCow)` requires the action payload to carry an arbitrary-typed `\"summary\"` key via `a.take_any(\"summary\")`. If the key is absent, the form cannot be constructed and this error is thrown. It is a payload-validation error for the app's `update-progress` action.","triggerScenarios":"Sending an `update-progress` ActionCow (e.g. from Lua or IPC) without a `\"summary\"` entry, or with the value stored under a misspelled key, or as something not consumable via `take_any`.","commonSituations":"Plugin authors emitting `app:update_progress` / progress actions with partial fields; API drift after renaming payload keys across yazi versions; IPC clients constructing actions by hand.","solutions":["Include a `\"summary\"` field in the update-progress action payload.","Check the key spelling and that the value is set with the same mechanism (`set_any`/deserialize) the parser reads with `take_any`.","Consult the current yazi version's action schema — payload keys may have changed."],"exampleFix":"-- before (Lua)\nlocal a = Action(\"update_progress\")\n-- after\nlocal a = Action(\"update_progress\", { summary = \"Copying 3/10 files\" })","handlingStrategy":"validation","validationCode":"assert!(payload.contains_key(\"summary\"), \"update-progress action requires 'summary'\");","typeGuard":"fn is_valid_update_progress(a: &Action) -> bool {\n    a.get(\"summary\").is_some()\n}","tryCatchPattern":"match UpdateProgressForm::try_from(action) {\n    Ok(form) => apply(form),\n    Err(e) if e.to_string().contains(\"Invalid 'summary'\") => {\n        eprintln!(\"update-progress action missing 'summary': {e}\")\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always set \"summary\" via the action builder before emitting update-progress.","Reuse the same key constants for set and take to avoid typos.","Update plugin code when upgrading yazi — payload keys can change between versions."],"tags":["parser","action-payload","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}