D
DreamLake

Data

ribbon_state

State-segmented intervals — process/task states ("execute", "halted", "waiting", "recovery"). Each entry has a start and end plus a state field that looks up a color in the lane config.

Chunk format

  • Format: jsonl
  • Decoder: jsonlDecoder

JSONL shape

{
  ts: number
  te: number
  state?: string                 // looked up via the dtype's `stateField` default
  color?: SemanticColor          // per-entry color override
  stripes?: boolean              // diagonal-stripe overlay on the bar
  halted?: boolean               // dashed segment + orange "Halted" tag
  [extra]: unknown
}

Sample data

{"ts":  0.3, "te":  1.2, "state": "init",    "color": "green"}
{"ts":  1.2, "te": 11.8, "state": "execute", "color": "blue", "stripes": true}
{"ts": 11.8, "te": 13.4, "state": "halted",  "halted": true}
{"ts": 13.4, "te": 24.0, "state": "execute", "color": "blue"}
{"ts": 24.0, "te": 29.5, "state": "done",    "color": "green"}

Compatible timeline lanes

LaneNotes
PillLaneDefault. Rendered as state-colored pills; halted: true draws a dashed bar with an orange "Halted" badge that smoothly scales with zoom.

Compatible standalone views

— (no dedicated standalone view)

Default props

FieldValue
stateField'state'

Python generator

from dreamlake import Episode
 
ep = Episode.create("ep1")
states = ep.track("pipeline/run_state", dtype="ribbon_state")
 
states.append({"ts":  0.0, "te":  1.0, "state": "init",    "color": "green"})
states.append({"ts":  1.0, "te": 10.0, "state": "execute", "color": "blue", "stripes": True})
states.append({"ts": 10.0, "te": 12.0, "state": "halted",  "halted": True})
states.append({"ts": 12.0, "te": 25.0, "state": "execute", "color": "blue"})
states.append({"ts": 25.0, "te": 30.0, "state": "done",    "color": "green"})

registerDtype override

registerDtype({
  id: 'ribbon_state',
  name: 'Ribbon state',
  defaults: { stateField: 'status' },  // if your JSONL uses `status`
})