feat(lanes): record which CLI tool drives a lane
This commit is contained in:
@@ -486,6 +486,22 @@ try {
|
||||
db.prepare("ALTER TABLE lanes ADD COLUMN slug TEXT").run();
|
||||
}
|
||||
|
||||
// Migrate: which CLI drives this lane — `claude` (default) or `codex`. Additive
|
||||
// with a default, so every existing lane keeps today's behavior. A lane's tool
|
||||
// is immutable (never in PATCHABLE): the tmux pane, the run history and the
|
||||
// binary probe all key off it, so flipping it under a live pane would describe
|
||||
// a run that isn't what's actually attached.
|
||||
try {
|
||||
db.prepare("SELECT tool FROM lanes LIMIT 1").get();
|
||||
} catch {
|
||||
db.prepare("ALTER TABLE lanes ADD COLUMN tool TEXT NOT NULL DEFAULT 'claude'").run();
|
||||
}
|
||||
try {
|
||||
db.prepare("SELECT tool FROM dashboard_runs LIMIT 1").get();
|
||||
} catch {
|
||||
db.prepare("ALTER TABLE dashboard_runs ADD COLUMN tool TEXT NOT NULL DEFAULT 'claude'").run();
|
||||
}
|
||||
|
||||
// Migrate: label a dashboard run with the lane it was started through, so the
|
||||
// Workspace page can show one lane's run history. Additive and nullable —
|
||||
// POST /api/run keeps writing rows with no lane. One probe for the one column.
|
||||
|
||||
Reference in New Issue
Block a user