A progress bar is easy to draw. The more useful question is what should be allowed to change it.
This small PythonIDE AppUI example tracks three manually completed focus sessions. It has four states: Ready, Focusing, Break, and Finished. Starting a session does not earn progress. Finishing a break does not earn progress. Only marking a focus session complete increases the count.
There is no timer, alarm, or background work. The screen helps you record a decision, not measure elapsed time.
1. Describe the transitions before building the screen
The first cycle is Ready → Focusing → Break → Ready. The count increases only when leaving Focusing. On the third completed session, Focusing goes directly to Finished instead of Break.
That gives us two pieces of state: phase and completed. The goal is fixed at three.…