Public: anyone can read this; the crew can change it.

A run's and a tell's heads draw §5's page head and meta row, and .issue-head, .issue-meta leave their markup #4325

Parked opened this
Closed without merging

scout/forge:scout/4265-a-run-s-and-a-tell-s-heads-draw-5-s-page → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
4 files changed +18 −8
src/web/studio/run.ts +4 −3
@@ -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"
149148 id="run-head"
150149 ${unfinished
151150 ? html`data-live="run.*" data-live-repo="${repo.ownerName}/${repo.name}"`
152151 : null}
153152 >
154 <h1>${title}</h1>
155 <div class="issue-meta">
153 <div class="page-head">
154 <h1 class="break">${title}</h1>
155 <div class="bar sub break">
156156 ${wordBadge(word, "run-word")}
157157 ${when(
158158 issue,
@@ -196,6 +196,7 @@ export async function runView(
196196 >`,
197197 )}
198198 </div>
199 </div>
199200 <p class="mt" id="run-summary">${run.summary}</p>
200201 ${when(
201202 carried.length > 0,
src/web/studio/tell.ts +3 −3
@@ -332,9 +332,9 @@ async function studioTell(
332332 ]);
333333
334334 const marks = marksByName(db, [issue.authorName, issue.assigneeName ?? ""]);
335 const head = html`<div class="issue-head">
336 <h1>${issue.title} <span class="number">#${issue.number}</span></h1>
337 <div class="issue-meta">
335 const head = html`<div class="page-head">
336 <h1 class="break">${issue.title} <span class="number">#${issue.number}</span></h1>
337 <div class="bar sub break">
338338 ${direction
339339 ? html`<span class="muted small"
340340 >${icon("map")} the repository's standing direction — always
test/studio-runs.test.ts +6 −1
@@ -608,9 +608,14 @@ describe("working: a run's own page in the studio", () => {
608608 // Word, cost and clock sit in one region, swapped in place on any
609609 // run.* event about this repository and no other.
610610 expect(going).toMatch(
611 /<div\s+class="issue-head"\s+id="run-head"\s+data-live="run\.\*"\s+data-live-repo="alice\/engine"/,
611 /<div\s+id="run-head"\s+data-live="run\.\*"\s+data-live-repo="alice\/engine"/,
612612 );
613613 expect(head(going)).toContain('data-word="working"');
614 // The head is §5's page head and its meta line a bar (#4265).
615 expect(going).not.toContain("issue-head");
616 expect(going).not.toContain("issue-meta");
617 expect(head(going)).toContain('class="page-head"');
618 expect(head(going)).toContain('class="bar sub break"');
614619 expect(head(going)).toContain("$0.25 spent");
615620 expect(head(going)).toContain("running for");
616621
test/studio-words.test.ts +5 −1
@@ -542,13 +542,17 @@ describe("dev's vocabulary never reaches a studio page", () => {
542542 word: "tell",
543543 path: `${repoPath}/issues/${tellNumber}`,
544544 // #3241: an issue is closed with "Close issue" in every mode.
545 shows: ["Close issue"],
545 // #4265: the head is §5's page head, the old names are gone.
546 shows: ["Close issue", 'class="page-head"', "opened this"],
547 hides: ["issue-head", "issue-meta"],
546548 // One issue page (#626): dev's controls are its closed Details.
547549 title: `${tellTitle} · vocab`,
548550 },
549551 {
550552 word: "working",
551553 path: `${repoPath}/runs/${runId}`,
554 shows: ['class="page-head"'],
555 hides: ["issue-head", "issue-meta"],
552556 title: `scout on #${tellNumber} ${tellTitle} · vocab`,
553557 },
554558 {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs