Repository navigation
Keep SWARM form values between runs of the same script - #381
Merged
Merged
Conversation
Starting a run now stores the form by script path, and reopening that script restores its selectors, agent, tier and effort rows and typed inputs, with focus on Run. A new `r` key on a finished or stopped run reopens the form, and the footer hint and TUI docs describe it.
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
Starting a SWARM run no longer discards the input form. The form is kept per script (this session only), so opening the same script again restores every value and puts focus on Run. Pressing
ron a finished or stopped run reopens the form directly.Changes
SwarmDashboardStategainslast_forms(keyed by script path) andlast_script. Starting a run moves the form intolast_forms(clearing its completion popup and error) instead of dropping it.SwarmForm::restore_from: restores the Folder / Workflow / Profile selectors by option name, rebuilds the agent/tier/effort rows from the previous profile info, and copies typed inputs the script still has. Inputs the script no longer has are dropped. Focus lands on Run.open_formappliesrestore_fromwhen a previous form exists for the script, so bothrand picking the script from the picker restore values.rkey on the run view (ignored while a run is going) reopens the last script's form. The footer hint now reads "r run again".SwarmForm::rebuildkeeps focus on the Run button if it was there, rather than clamping to an index.crates/gaviero-tui/CLAUDE.md.swarm_run.rs: values survive a finished run (viarand via the picker), and a stopped run keeps its values whileris ignored during the run.Testing
git diff --check origin/main...HEADcargo test— skipped (only run with--run-tests); the two new tests have not been run as part of this PR description.Risks / Notes
ris bound asAction::InsertChar('r')on the run view, only when no run is active.