Guard workflow results against Promise clone failures - #21
Merged
Merged
Conversation
HangxiangMa
pushed a commit
to HangxiangMa/pi-dynamic-workflows
that referenced
this pull request
Sep 7, 2026
…n/s (Michaelliv#20) (Michaelliv#21) Add a 'detailed' mode to the live 'Workflows running' panel alongside the existing compact one-liner. Detailed mode renders per-phase progress (marker + done/total + error count + token subtotal) and per-agent rows ([id] + status icon + label + tokens + model), capped at progressPanelMaxAgents per phase with a '... N earlier agents' overflow line, plus a run header with aggregate tokens, cost, and a live tok/s rate. Compact mode is byte-for-byte unchanged. New settings in ~/.pi/workflows/settings.json: progressPanelMode ('compact'|'detailed') and progressPanelMaxAgents (1-1000, default 8), live-read each render (1s TTL) so toggles apply without a restart. New commands /workflows-progress <compact|detailed|status> and /workflows-progress-max <N>. token/s is summed from per-agent agent.tokens, NOT snapshot.tokenUsage.total: real-pi testing showed the run-level aggregate is only finalized at run-end and reads 0 for the entire live run, while per-agent tokens update on each agent completion. Reuses statusIcon/shorten (display.ts) and shortModel (workflow-ui.ts) via new exports; no duplication. Tests: 16 new unit tests (settings normalize/clamp, token-rate math incl. ramp/stall, detailed layout, per-phase overflow, mode selection, commands). Verified end-to-end with a real deepseek-v4-flash run (live header: '31.7K tok - 4434 tok/s').
jarjee
pushed a commit
to jarjee/pi-dynamic-workflows
that referenced
this pull request
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12
Verification
npm testreturn { leaked: agent(...) }locally; now reports a workflow error instead of crashing Pi