The app
Running a program
Activate a program, follow the run, change it while it is going and stop it when it is done.
A program you have written is a plan. To actually follow it, you activate it, and Trainerflow starts a program run. This page is about runs: starting one, looking after it, changing it and ending it.
Activating
Open the program in the SPDK and press Activate in the header. Trainerflow asks you to confirm (“OK, you are about to make things official. Are you sure this is the program that you want to run?”); press Yes I am sure! and the run begins. It shows up straight away in the mobile app, ready for the first workout.
A few things to keep in mind:
- Activate is disabled while the program has errors. Fix them first; the Problems list in the sidebar shows where they are.
- A program has to give the athlete something to do. If it finishes without a single halt, activation fails with “The program has no output!”.
- You can have only one active program at a time. While you have one, Activate is hidden. Stop the current run first.
Trainers can also activate a program for a trainee. That has its own page: trainers and trainees.
Your runs
Every run you have ever started is listed under Runs on the Programs page, the active one at the top. Each run has a status:
| Status | Meaning |
|---|---|
| Active | Running now. This is your active program. |
| Paused | On hold. |
| Stopped | Stopped before the program finished. |
| Ended | The program ran to its end. |
| Error | The program hit a runtime error. See below. |
The run page
Open a run to see its page: its title, its status, and when it started and ended. The page has two tabs:
- History is the run’s timeline: every halt the athlete went through, with the Target the program set and the Actual value the athlete entered, and the notes posted along the way.
- Insights shows the program’s insights, drawn from what the athlete actually logged.
While the run is going, the header also has Edit and Stop.
Changing a run
Programs are rarely perfect on the first try, and the athlete is rarely a perfect match for them. You can change a run while it is going.
Press Edit on the run page. The SPDK opens on the run’s own copy of the program, not on the program itself, so whatever you change here only affects this run. Make your changes, check them in the simulator, then press Apply changes.
What happens next depends on what you changed.
Compatible changes
Most changes only affect what is still to come: a heavier load next week, an extra set, a new exercise at the end. Trainerflow replays the run’s history against the new program and, if everything the athlete has done so far still lines up, it offers to Update the run. The athlete carries on from where they were, now following the new program.
Incompatible changes
Some changes rewrite the past. If you remove the exercise the athlete is in the middle of, or reorder last week’s workouts, the history no longer agrees with the program. Trainerflow warns you that the changes are incompatible and gives you a choice:
- Force change rewinds the run to the last point where the history and the new program still agree, and continues from there. Whatever the athlete did after that point is undone.
- End program ends the run instead.
Stopping
Press Stop on the run page and confirm with Stop run. The run ends and you are free to activate another program. Stopping cannot be undone, but the run, with its whole history, stays in your list.
Runtime errors
Occasionally a program that compiles fine fails while it runs: a value that is missing, a calculation that makes no sense for the numbers the athlete entered. When that happens the run stops on the error and the run page shows it in red, with “The run stopped on this error. Fix it in the editor, then apply the changes to continue.”
Press Fix the error: the SPDK opens on the run’s copy, you fix the program and Apply changes, and the run continues.
For a trainee’s run, only their trainer can fix it. The trainee sees that their trainer has to fix it before they can continue.