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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/4387-a-run-page-s-and-a-tell-page-s-heads-dra → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/4387-a-run-page-s-and-a-tell-page-s-heads-dra was merged into main as 1ba07bb.

Review

Sign in to review this change.
4 files changed +33 −5
src/web/studio/run.ts +2 −2
@@ -145,14 +145,14 @@ export async function runView(
145145 // finishing shows its final state without a reload. Its id stays once the
146146 // run is over, so the last swap still finds its match.
147147 const head = html`<div
148 class="issue-head"
148 class="page-head"
149149 id="run-head"
150150 ${unfinished
151151 ? html`data-live="run.*" data-live-repo="${repo.ownerName}/${repo.name}"`
152152 : null}
153153 >
154154 <h1>${title}</h1>
155 <div class="issue-meta">
155 <div class="sub bar">
156156 ${wordBadge(word, "run-word")}
157157 ${when(
158158 issue,
src/web/studio/tell.ts +2 −2
@@ -364,9 +364,9 @@ async function studioTell(
364364 ]);
365365
366366 const marks = marksByName(db, [issue.authorName, issue.assigneeName ?? ""]);
367 const head = html`<div class="issue-head">
367 const head = html`<div class="page-head">
368368 <h1>${issue.title} <span class="number">#${issue.number}</span></h1>

.number is only styled as .issue-head h1 .number (content.ts:202). Under .page-head the #N now 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 .number the muted 400 treatment, so issue, change and tell heads keep a quiet number.

369 <div class="issue-meta">
369 <div class="sub bar">
370370 ${direction
371371 ? html`<span class="muted small"
372372 >${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", () => {
489489 await rm(dataDir, { recursive: true, force: true });
490490 });
491491
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
492516 test("the studio transcript names the tell, the cost, and the steer box", async () => {
493517 const tell = openIssue(app, alice, repo, {
494518 title: "Fix the flicker on load",
@@ -619,8 +643,10 @@ describe("working: a run's own page in the studio", () => {
619643 // Word, cost and clock sit in one region, swapped in place on any
620644 // run.* event about this repository and no other.
621645 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"/,
623647 );
648 expect(going).not.toContain("issue-head");
649 expect(going).not.toContain("issue-meta");
624650 expect(head(going)).toContain('data-word="working"');
625651 expect(head(going)).toContain("$0.25 spent");
626652 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", () => {
461461 expect(page).toContain("<h1>Deploy production</h1>");
462462 expect(page).toContain('id="run-log"');
463463 expect(page).toContain('id="run-word"');
464 expect(page).not.toContain("issue-head");
465 expect(page).not.toContain("issue-meta");
464466 // The log is drawn line by line, each by what kind of line it is: the
465467 // forge's own words ("checking out …") are marked as such.
466468 expect(page).toContain('class="ln ln-forge"');

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs