Public: anyone can read this; the crew can change it.
A run page's and a tell page's heads draw §5's page head and meta row, with their tests updated to match #4393
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4387-a-run-page-s-and-a-tell-page-s-heads-dra → main 1 commit fork 1 thread · 1 unresolved
4 files
changed +33
−5
src/web/studio/run.ts +2 −2
| @@ -145,14 +145,14 @@ export async function runView( | ||
| 145 | 145 | // finishing shows its final state without a reload. Its id stays once the |
| 146 | 146 | // run is over, so the last swap still finds its match. |
| 147 | 147 | const head = html`<div |
| 148 | class="issue-head" | |
| 148 | class="page-head" | |
| 149 | 149 | id="run-head" |
| 150 | 150 | ${unfinished |
| 151 | 151 | ? html`data-live="run.*" data-live-repo="${repo.ownerName}/${repo.name}"` |
| 152 | 152 | : null} |
| 153 | 153 | > |
| 154 | 154 | <h1>${title}</h1> |
| 155 | <div class="issue-meta"> | |
| 155 | <div class="sub bar"> | |
| 156 | 156 | ${wordBadge(word, "run-word")} |
| 157 | 157 | ${when( |
| 158 | 158 | issue, |
src/web/studio/tell.ts +2 −2
| @@ -364,9 +364,9 @@ async function studioTell( | ||
| 364 | 364 | ]); |
| 365 | 365 | |
| 366 | 366 | const marks = marksByName(db, [issue.authorName, issue.assigneeName ?? ""]); |
| 367 | const head = html`<div class="issue-head"> | |
| 367 | const head = html`<div class="page-head"> | |
| 368 | 368 | <h1>${issue.title} <span class="number">#${issue.number}</span></h1> |
| 369 | <div class="issue-meta"> | |
| 369 | <div class="sub bar"> | |
| 370 | 370 | ${direction |
| 371 | 371 | ? html`<span class="muted small" |
| 372 | 372 | >${icon("map")} the repository's standing direction — always |
test/studio-runs.test.ts +27 −1
| @@ -489,6 +489,30 @@ describe("working: a run's own page in the studio", () => { | ||
| 489 | 489 | await rm(dataDir, { recursive: true, force: true }); |
| 490 | 490 | }); |
| 491 | 491 | |
| 492 | test("a run's and a tell's heads draw §5's page head and meta row, not .issue-head or .issue-meta", async () => { | |
| 493 | const tell = openIssue(app, alice, repo, { title: "Head check" }); | |
| 494 | if (!tell.ok) throw new Error(String(tell.error)); | |
| 495 | const run = createRun(app.db, { | |
| 496 | repoId: repo.id, | |
| 497 | kind: "agent", | |
| 498 | issueId: tell.value.id, | |
| 499 | actorId: scoutId, | |
| 500 | reason: "assigned", | |
| 501 | }); | |
| 502 | const runPage = await ( | |
| 503 | await get(`/alice/engine/runs/${run.id}`, writerCookie) | |
| 504 | ).text(); | |
| 505 | const tellPage = await ( | |
| 506 | await get(`/alice/engine/issues/${tell.value.number}`, writerCookie) | |
| 507 | ).text(); | |
| 508 | for (const page of [runPage, tellPage]) { | |
| 509 | expect(page).not.toContain("issue-head"); | |
| 510 | expect(page).not.toContain("issue-meta"); | |
| 511 | expect(page).toContain('class="page-head"'); | |
| 512 | expect(page).toContain('class="sub bar"'); | |
| 513 | } | |
| 514 | }); | |
| 515 | ||
| 492 | 516 | test("the studio transcript names the tell, the cost, and the steer box", async () => { |
| 493 | 517 | const tell = openIssue(app, alice, repo, { |
| 494 | 518 | title: "Fix the flicker on load", |
| @@ -619,8 +643,10 @@ describe("working: a run's own page in the studio", () => { | ||
| 619 | 643 | // Word, cost and clock sit in one region, swapped in place on any |
| 620 | 644 | // run.* event about this repository and no other. |
| 621 | 645 | expect(going).toMatch( |
| 622 | /<div\s+class="issue-head"\s+id="run-head"\s+data-live="run\.\*"\s+data-live-repo="alice\/engine"/, | |
| 646 | /<div\s+class="page-head"\s+id="run-head"\s+data-live="run\.\*"\s+data-live-repo="alice\/engine"/, | |
| 623 | 647 | ); |
| 648 | expect(going).not.toContain("issue-head"); | |
| 649 | expect(going).not.toContain("issue-meta"); | |
| 624 | 650 | expect(head(going)).toContain('data-word="working"'); |
| 625 | 651 | expect(head(going)).toContain("$0.25 spent"); |
| 626 | 652 | expect(head(going)).toContain("running for"); |
test/web-apps.test.ts +2
| @@ -461,6 +461,8 @@ describe("apps, runs and the crew on the web", () => { | ||
| 461 | 461 | expect(page).toContain("<h1>Deploy production</h1>"); |
| 462 | 462 | expect(page).toContain('id="run-log"'); |
| 463 | 463 | expect(page).toContain('id="run-word"'); |
| 464 | expect(page).not.toContain("issue-head"); | |
| 465 | expect(page).not.toContain("issue-meta"); | |
| 464 | 466 | // The log is drawn line by line, each by what kind of line it is: the |
| 465 | 467 | // forge's own words ("checking out …") are marked as such. |
| 466 | 468 | expect(page).toContain('class="ln ln-forge"'); |
new above
offline
.numberis only styled as.issue-head h1 .number(content.ts:202). Under.page-headthe#Nnow renders in full foreground colour at 620 weight, and the h1 loses its clamp(20px…26px) size. change.ts:196 has had the same drift since #4309. When #4273 moves the stylesheet, it should give.page-head h1 .numberthe muted 400 treatment, so issue, change and tell heads keep a quiet number.