Workflow and Source Panels
Work Queue Panel
Model queue-like work as a deterministic Swift array and loop.
Work Queue Panel
work_queue_panel.swift
Replay: real traced execution (multi-file project)
let extra = "audit"
var tasks = ["read", extra, "write"]
var log: [String] = []
var total = 0
for task in tasks {
log.append("run:\(task)")
total += 1
}
let joined = log.joined(separator: ",")
print("extra=\(extra)")
print("log=\(joined)")
print("total=\(total)")
let extra = "review"
var tasks = ["read", extra, "write"]
var log: [String] = []
var total = 0
for task in tasks {
log.append("run:\(task)")
total += 1
}
let joined = log.joined(separator: ",")
print("extra=\(extra)")
print("log=\(joined)")
print("total=\(total)")
let extra = "ship"
var tasks = ["read", extra, "write"]
var log: [String] = []
var total = 0
for task in tasks {
log.append("run:\(task)")
total += 1
}
let joined = log.joined(separator: ",")
print("extra=\(extra)")
print("log=\(joined)")
print("total=\(total)")
extra ← audit, tasks ← ["read", "audit", "write"], log ← [], total ← 0
1let extra→ audit = "audit" //@extra="review", "ship"2var tasks→ ["read", "audit", "write"] = ["read", extraaudit, "write"]3var log→ []: [String] = []4var total→ 0 = 0log ← ["run:read"], total ← 1
pass 1 of 36for taskread in tasks["read", "audit", "write"] {7 log→ ["run:read"].append("run:\(taskread)")8 total→ 1 += 19}All 3 passes — pass 1 is the card above pass tasklogtotal1 read [] → ["run:read"] 0 → 1 2 audit ["run:read"] → ["run:read", "run:audit"] 1 → 2 3 write ["run:read", "run:audit"] → ["run:read", "run:audit", "run:write"] 2 → 3 joined ← run:read,run:audit,run:write
11let joined→ run:read,run:audit,run:write = log["run:read", "run:audit", "run:write"].joined(separator: ",")1213print("extra=\(extraaudit)")14print("log=\(joinedrun:read,run:audit,run:write)")15print("total=\(total3)")outputextra=audit log=run:read,run:audit,run:write total=3
extra ← review, tasks ← ["read", "review", "write"], log ← []
1let extra→ review = "review"2var tasks→ ["read", "review", "write"] = ["read", extrareview, "write"]3var log→ []: [String] = []4var total→ 0 = 0log ← ["run:read"], total ← 1
pass 1 of 36for taskread in tasks["read", "review", "write"] {7 log→ ["run:read"].append("run:\(taskread)")8 total→ 1 += 19}All 3 passes — pass 1 is the card above pass tasklogtotal1 read [] → ["run:read"] 0 → 1 2 review ["run:read"] → ["run:read", "run:review"] 1 → 2 3 write ["run:read", "run:review"] → ["run:read", "run:review", "run:write"] 2 → 3 joined ← run:read,run:review,run:write
11let joined→ run:read,run:review,run:write = log["run:read", "run:review", "run:write"].joined(separator: ",")1213print("extra=\(extrareview)")14print("log=\(joinedrun:read,run:review,run:write)")15print("total=\(total3)")outputextra=review log=run:read,run:review,run:write total=3
extra ← ship, tasks ← ["read", "ship", "write"], log ← [], total ← 0
1let extra→ ship = "ship"2var tasks→ ["read", "ship", "write"] = ["read", extraship, "write"]3var log→ []: [String] = []4var total→ 0 = 0log ← ["run:read"], total ← 1
pass 1 of 36for taskread in tasks["read", "ship", "write"] {7 log→ ["run:read"].append("run:\(taskread)")8 total→ 1 += 19}All 3 passes — pass 1 is the card above pass tasklogtotal1 read [] → ["run:read"] 0 → 1 2 ship ["run:read"] → ["run:read", "run:ship"] 1 → 2 3 write ["run:read", "run:ship"] → ["run:read", "run:ship", "run:write"] 2 → 3 joined ← run:read,run:ship,run:write
11let joined→ run:read,run:ship,run:write = log["run:read", "run:ship", "run:write"].joined(separator: ",")1213print("extra=\(extraship)")14print("log=\(joinedrun:read,run:ship,run:write)")15print("total=\(total3)")outputextra=ship log=run:read,run:ship,run:write total=3
queue panel
A queue can be replayed as list updates and a bounded loop when the work items are fixed inputs.