A replay UI can show the interleaved stream or focus on one named history. This script models the filtered view as ordinary data.

Program

Play the script to choose a stream and see the view label, color, and event count stay together.

filtered_stream_replay.R
view_index <- 
views <- c("main", "worker", "io")
colors <- c("blue", "green", "orange")
event_counts <- c(4, 3, 2)
view <- views[view_index]
color <- colors[view_index]
count <- event_counts[view_index]
label <- paste(view, color, count, sep = ":")
cat(label, "\n", sep = "")
view_index <- 
views <- c("main", "worker", "io")
colors <- c("blue", "green", "orange")
event_counts <- c(4, 3, 2)
view <- views[view_index]
color <- colors[view_index]
count <- event_counts[view_index]
label <- paste(view, color, count, sep = ":")
cat(label, "\n", sep = "")
view_index <- 
views <- c("main", "worker", "io")
colors <- c("blue", "green", "orange")
event_counts <- c(4, 3, 2)
view <- views[view_index]
color <- colors[view_index]
count <- event_counts[view_index]
label <- paste(view, color, count, sep = ":")
cat(label, "\n", sep = "")
filtered history Choosing one history is just selecting one stream from the composed replay data.
color label A stable color label helps distinguish histories without changing the source file.
count check The event count makes the selected history easy to verify.