Problem/Opportunity Space
The current configurable delay applies uniformly between every command in a sequence. There is no way to add a longer pause at a specific point in a sequence. This limits use cases that require variable timing.
Acceptance Criteria
- Users can insert a wait entry at any position in a command sequence
- Wait duration is configurable per entry in milliseconds
- Wait entries are visually distinct from command entries in the UI
- The global delay setting still applies between all entries including after waits
Suggested solution
Extend CommandEntry with a type discriminator - either Command or Wait. Wait entries have a duration field instead of a command string. CommandHandler.ExecuteAsync checks the entry type and calls Task.Delay with the specified duration instead of executing a command.
Suggested design
- Add a Type enum to CommandEntry with values Command and Wait
- Add a WaitDuration int field to CommandEntry used when Type is Wait
- Update CommandHandler.ExecuteAsync to branch on entry type
- Update EditWindow to show a duration input for Wait entries instead of a command input
- Add an Insert Wait button alongside Add Command in EditWindow
- Wait entries displayed with a distinct visual style such as a clock icon or different row colour
Testing Considerations
Happy path
Sad path
Problem/Opportunity Space
The current configurable delay applies uniformly between every command in a sequence. There is no way to add a longer pause at a specific point in a sequence. This limits use cases that require variable timing.
Acceptance Criteria
Suggested solution
Extend CommandEntry with a type discriminator - either Command or Wait. Wait entries have a duration field instead of a command string. CommandHandler.ExecuteAsync checks the entry type and calls Task.Delay with the specified duration instead of executing a command.
Suggested design
Testing Considerations
Happy path
Sad path