Show data retrieval commands after workflow run completes
Opened by swampadmin · 2/25/2025
Problem
After a workflow run completes, the output ends with just Workflow "succeeded" and no guidance on how to access the data that was produced. Users have to know to run swamp data list and swamp data get commands to find and retrieve the output, which requires discovering the right data names and flags on their own.
For example, after running swamp workflow run contributor-analysis, the output shows individual "Data saved to" paths during execution but ends abruptly at "Workflow succeeded". To actually see the results, users must:
- Run
swamp data list --workflow contributor-analysisto discover what data was produced - Run
swamp data get --workflow contributor-analysis <data-name>for each piece of data
This is a poor experience, especially for new users who don't know the data commands exist.
Proposed Solution
After a successful workflow run, append example swamp commands to the output so users can immediately access their data. The output should look something like:
19:54:10.057 info workflow·run·contributor-analysis Workflow "succeeded"
To view the data produced by this workflow:
swamp data list --workflow contributor-analysis
swamp data get --workflow contributor-analysis report
swamp data get --workflow contributor-analysis summaryThe implementation should:
- List the specific data names produced by the run (from the step data artifacts tracked in the WorkflowRun)
- Show concrete, copy-pasteable commands tailored to the workflow that just ran
- Only appear in log output mode (not JSON mode, which is for machine consumption)
- Be skipped for failed runs where no useful data was produced
Implementation Summary
This feature affects the workflow run output layer. Changes would be needed in:
src/presentation/output/log_progress_callback.ts— theonWorkflowCompletecallback to emit the helper commands after the "Workflow succeeded" messagesrc/presentation/output/workflow_run_output.ts— the log-mode render path may need to emit the commands based on data artifacts collected in the WorkflowRun
The data artifact names are already tracked in StepRun.dataArtifacts during execution, so no changes to the execution layer should be needed — this is purely a presentation concern.
Alternatives Considered
- Always show full data inline: Too verbose for large outputs and breaks the streaming log format
- Only show
swamp data listcommand: Less helpful than showing the specificdata getcommands for each output - Show file paths instead of commands: Users already see raw paths in the "Data saved to" lines during execution; commands are more actionable
Closed
No activity in this phase yet.
Sign in to post a ripple.