Note: we will reuse the same panel (webview) we use for the "main panel", when the debug session starts the panel should transition to display the history.
Adding some more details here.
In addition to what you already have, you'll need to:
visualize the rest of the events
add a title above the list of tasks
filter out irrelevant workflow tasks that end with WORKFLOW_TASK_TIMED_OUT and WORKFLOW_TASK_FAILED events
filter out irrelevant workflow events like WORKFLOW_EXECUTION_TIMED_OUT and WORKFLOW_EXECUTION_TERMINATED
add a "current" class to a workflow task in the list to highlight it when it is currently being processed (needs for next steps)
add a handler for setting a breakpoint on a workflow task (next step as well)
For the "title" the logic is as follows:
If the last event is WORKFLOW_EXECUTION_COMPLETED - display "Workflow execution completed in $duration" where $duration is the difference between the last event's timestamp and the first event's timestamp.
If the last event is WORKFLOW_EXECUTION_CONTINUED_AS_NEW - display "Workflow execution continued-as-new in $duration"
If the last event is WORKFLOW_EXECUTION_FAILED - display "Workflow execution failed in $duration"
If the last event is WORKFLOW_EXECUTION_TERMINATED - display "Workflow execution terminated after $duration"
If the last event is WORKFLOW_EXECUTION_TIMED_OUT - display "Workflow execution timed out after $duration"
Note: we will reuse the same panel (webview) we use for the "main panel", when the debug session starts the panel should transition to display the history.