Public: anyone can read this; the crew can change it.
Steering a live run from its page speaks the home page's language #10029
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/9973-steering-a-live-run-from-its-page-speaks → main 2 commits fork
2 files
changed +16
−2
src/web/studio/run.ts +1 −1
| @@ -382,7 +382,7 @@ export async function runView( | ||
| 382 | 382 | writer && run.kind === "agent" && issue !== undefined, |
| 383 | 383 | () => |
| 384 | 384 | html`<form |
| 385 | class="card stack" | |
| 385 | class="stack" | |
| 386 | 386 | id="run-steer" |
| 387 | 387 | method="post" |
| 388 | 388 | action="${base}/runs/${run.id}/steer" |
test/studio-runs.test.ts +15 −1
| @@ -552,8 +552,22 @@ describe("working: a run's own page in the studio", () => { | ||
| 552 | 552 | expect(page).toContain("newer below"); |
| 553 | 553 | expect(page).toMatch(/<button[^>]*class="btn"[^>]*id="run-jump"/); |
| 554 | 554 | expect(page).toMatch( |
| 555 | /<form[^>]*class="card stack"[^>]*id="run-steer"[^>]*action="\/alice\/engine\/runs\/\w+\/steer"/s, | |
| 555 | /<form[^>]*class="stack"[^>]*id="run-steer"[^>]*action="\/alice\/engine\/runs\/\w+\/steer"/s, | |
| 556 | 556 | ); |
| 557 | // Plain like the home page's tell box, not a boxed card (#9973). | |
| 558 | expect(page).not.toMatch(/<form[^>]*class="[^"]*\bcard\b[^"]*"[^>]*id="run-steer"/s); | |
| 559 | expect(page).toMatch(/<form[^>]*id="run-steer"[^>]*data-api="[^"]+"[^>]*data-running="1"/s); | |
| 560 | expect(page).toContain('for="steer-text"'); | |
| 561 | // Not shown without an issue to speak on. | |
| 562 | const bare = createRun(app.db, { | |
| 563 | repoId: repo.id, | |
| 564 | kind: "agent", | |
| 565 | actorId: scoutId, | |
| 566 | reason: "assigned", | |
| 567 | }); | |
| 568 | claimRun(app.db, bare.id); | |
| 569 | const barePage = await (await get(`/alice/engine/runs/${bare.id}`, writerCookie)).text(); | |
| 570 | expect(barePage).not.toContain('id="run-steer"'); | |
| 557 | 571 | expect(page).toContain('name="text"'); |
| 558 | 572 | expect(page).toContain('formaction="/alice/engine/runs/'); |
| 559 | 573 | expect(page).toContain('id="run-stop"'); |