fix(run): plumb the recorded prompt back into live runs, fix lane routing when the cwd doesn't match the selected lane

- pty-run.js's publicRun() now reads promptPreview back from the
  dashboard_runs row it already wrote at spawn time (was persisted,
  never read back) — RunHandle carries it through to the client.
- Workspace.tsx's onStartFromSetup no longer trusts RunSetup's
  always-populated laneId prop to decide whether a new lane needs
  ensuring — it re-resolves the target lane from the cwd the user
  actually typed, so starting a run with a different cwd than the
  currently-selected lane correctly ensures/creates the right lane
  instead of silently starting in the wrong one.

Fixes findings from the Task 8+9+10 review that a prior fix attempt
left unresolved (2f39f4e's --no-verify commit, and an incomplete
diagnosis of the lane-routing bug as a test-harness artifact).
This commit is contained in:
2026-08-12 13:18:04 +07:00
parent 2f39f4ec98
commit b951f64321
7 changed files with 724 additions and 25 deletions
+1
View File
@@ -152,6 +152,7 @@ function publicRun(id) {
resumeSessionId: row?.resume_session_id || null,
sessionId: row?.session_id || null,
startedAt: row?.started_at || null,
promptPreview: row?.prompt_preview || null,
};
}