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

A run page's jump, live and steer controls draw §5's bar and btn, and .run-jump, .run-live, .run-steer leave the markup #4310

Parked opened this
Closed without merging

scout/forge:scout/4263-a-run-page-s-jump-live-and-steer-control → main 3 commits fork 3 threads · 3 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
4 files changed +45 −16
docs/DESIGN.md +1 −1
@@ -398,7 +398,7 @@ gone, so this list only shrinks.
398398 - **`style/content.ts`, code view** — the source view and the syntax-highlight token classes `highlight-html.ts` builds as `tok-${kind}`: `.blob-view` `.ln` `.tok-attribute` `.tok-comment` `.tok-constant` `.tok-decorator` `.tok-deleted` `.tok-emphasis` `.tok-function` `.tok-heading` `.tok-inserted` `.tok-keyword` `.tok-link` `.tok-meta` `.tok-number` `.tok-operator` `.tok-plain` `.tok-property` `.tok-punctuation` `.tok-regex` `.tok-string` `.tok-tag` `.tok-type` `.tok-variable`
399399 - **`style/content.ts`, prose (markdown)** — table cell alignment, built by `markdown.ts` as `ta-${align}`: `.ta-c` `.ta-r`
400400 - **`style/content.ts`, diff viewer** — the diff table: its gutters, line kinds, file head and inline review comments: `.add` `.del` `.dh` `.diff` `.diff-body` `.diff-head` `.diff-note` `.diff-path` `.diff-stat` `.diff-stub` `.diff-summary` `.diff-table` `.dl` `.dl-review` `.dn` `.dn-comment` `.nonl` `.rc-hidden` `.rc-resolve` `.rc-resolved` `.wd`
401 - **`style/content.ts`, apps, runs, and the crew** — run pages, their logs and checks (a pull's look is §5's **look**): `.ln-forge` `.ln-pulse` `.ln-say` `.ln-tool` `.ln-you` `.log-tail-row` `.pinned-failures` `.pinned-slot` `.run-jump` `.run-live` `.run-steer` `.txt` `.who`
401 - **`style/content.ts`, apps, runs, and the crew** — run pages, their logs and checks (a pull's look is §5's **look**): `.ln-forge` `.ln-pulse` `.ln-say` `.ln-tool` `.ln-you` `.log-tail-row` `.pinned-failures` `.pinned-slot` `.txt` `.who`
402402 - **`style/content.ts`, search results** — search results, the inbox's ask cards: `.ask-acts` `.ask-card` `.ask-group` `.ask-kind` `.ask-meta` `.ask-more-acts` `.ask-pick` `.ask-pick-hit` `.ask-short` `.ask-waiting` `.live-toggle` `.needs-you`
403403 - **`pages/board.ts`** — the board itself is §5's **board**; the spend tables `spend.ts` draws wear §5's `.table` and `.stack`, no class of their own
404404 - **`pages/map.ts`** — the map of what waits for what: `.map-ask` `.map-breath` `.map-canvas` `.map-card` `.map-counts` `.map-dot` `.map-edge` `.map-edge-crit` `.map-edge-done` `.map-empty` `.map-list` `.map-main` `.map-meta` `.map-node` `.map-pillars` `.map-rule` `.map-svg` `.map-title` `.map-tool` `.map-tools` `.map-who` `.map-who-i` `.map-who-n` `.map-word` `.map-wrap`
src/web/studio/run.ts +11 −4
@@ -332,7 +332,7 @@ export async function runView(
332332 },
333333 )}
334334 ${vitalsBlock(run, logHidden, looks)}
335 <div class="run-live" id="run-live" data-state="${run.state}">
335 <div class="mt" id="run-live" data-state="${run.state}">
outdated

The sticky and relative positioning that .run-live gave is gone, and the old .run-live:has(.run-steer) corner rule matches nothing now. Delete those rules in this pull.

336336 ${when(
337337 // The head above is what makes \`liveRegionsJs\` open the one
338338 // /events connection this log and its finish ride on.
@@ -363,7 +363,14 @@ export async function runView(
363363 }
364364 : {}),
365365 pulse: run.state === "running",
366 extra: html`<button type="button" class="run-jump" id="run-jump" hidden>
366 extra: html`<button

The .run-jump rule (position:sticky; float:right; pill) no longer matches, so this button is no longer a floating jump control. Also verify that .btn does not override [hidden].

367 type="button"
368 class="btn"
369 data-size="sm"
370 data-variant="primary"
371 id="run-jump"
372 hidden
373 >
367374 newer below
368375 </button>`,
369376 }))}
@@ -375,7 +382,7 @@ export async function runView(
375382 writer && run.kind === "agent" && issue !== undefined,
376383 () =>
377384 html`<form
378 class="run-steer"
385 class="card stack"

The old .run-steer rule gave sticky bottom, a flush join to the log and the textarea sizing (min/max-height, resize:none). All of that is lost, and the CSS is not removed. Finish it here.

379386 id="run-steer"
380387 method="post"
381388 action="${base}/runs/${run.id}/steer"
@@ -386,7 +393,7 @@ export async function runView(
386393 >Say something to ${who}</label
387394 >
388395 <textarea
389 class="input"
396 class="input break"
390397 id="steer-text"
391398 name="text"
392399 rows="1"
src/web/style/content.ts +9 −11
@@ -765,13 +765,13 @@ form.inline { display: inline; margin-left: auto; }
765765 .pinned-failures pre { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-min); }
766766 /* A run, live: a transcript with a speaker column, bounded so the page
767767 head stays reachable, and a composer that sits under it. */
768 .run-live { position: relative; margin-top: 12px; }
768 #run-live { position: relative; }
769769 .run-log {
770770 margin: 0; padding: 10px 14px 8px; max-height: calc(100dvh - 300px); min-height: 12em; overflow: auto;
771771 background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius);
772772 font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; tab-size: 4;
773773 }
774 .run-live:has(.run-steer) .run-log { border-radius: var(--radius) var(--radius) 0 0; }
774 #run-live:has(#run-steer) .run-log { border-radius: var(--radius) var(--radius) 0 0; }
775775 .run-log .ln { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 2px 0; }
776776 .run-log .who { color: var(--faint); font-size: 12.5px; font-weight: 600; padding-top: 2px; user-select: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
777777 .run-log .txt { white-space: pre-wrap; }
@@ -790,17 +790,15 @@ form.inline { display: inline; margin-left: auto; }
790790 .run-log .ln-pulse i:nth-child(2) { animation-delay: .2s; }
791791 .run-log .ln-pulse i:nth-child(3) { animation-delay: .4s; }
792792 @keyframes run-pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
793 .run-jump {
794 position: sticky; bottom: 6px; float: right; margin-top: 6px; padding: 4px 10px; font: inherit; font-size: 12.5px;
795 color: var(--bg); background: var(--fg); border: 0; border-radius: 999px; cursor: pointer; box-shadow: var(--shadow-2);
793 #run-jump {
794 position: sticky; bottom: 6px; float: right; margin-top: 6px; border-radius: 999px; box-shadow: var(--shadow-2);
796795 }
797 .run-steer {
798 position: sticky; bottom: 0; display: grid; gap: 6px; padding: 10px 12px; background: var(--bg);
799 border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
796 #run-steer {
797 position: sticky; bottom: 0; gap: 6px; padding: 10px 12px; background: var(--bg);
798 border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none;
800799 }
801 .run-steer textarea { min-height: 38px; max-height: 160px; resize: none; }
802 .run-steer .bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
803 .run-steer .bar .muted { flex: 1 1 200px; }
800 #run-steer textarea { min-height: 38px; max-height: 160px; resize: none; }
801 #run-steer .bar .muted { flex: 1 1 200px; }
804802 /* A tail beside a running row (studio/app.ts): the same log, a peek at it
805803 — fixed height so nothing around it shifts as lines arrive, and it
806804 scrolls itself rather than the page. */
test/studio-runs.test.ts +24
@@ -517,6 +517,17 @@ describe("working: a run's own page in the studio", () => {
517517 expect(page).toContain('data-who="scout"');
518518 expect(page).toContain('id="run-steer"');
519519 expect(page).toContain("Steer scout");
520 // Jump, live and steer draw §5's btn, bar and card (#4263).
521 for (const old of ["run-jump", "run-live", "run-steer"]) {
522 expect(page).not.toMatch(new RegExp(`class="[^"]*\\b${old}\\b`));
523 }
524 expect(page).toContain("newer below");
525 expect(page).toMatch(/<button[^>]*class="btn"[^>]*id="run-jump"/);
526 expect(page).toMatch(
527 /<form[^>]*class="card stack"[^>]*id="run-steer"[^>]*action="\/alice\/engine\/runs\/\w+\/steer"/s,
528 );
529 expect(page).toContain('name="text"');
530 expect(page).toContain('formaction="/alice/engine/runs/');
520531 expect(page).toContain('id="run-stop"');
521532 // The transcript is on the page, and there is no second reading of it.
522533 expect(page).toContain('id="run-log"');
@@ -2295,3 +2306,16 @@ describe("a deploy that just landed is news on the front door", () => {
22952306 * as `canWrite` today — that every surface carrying money, the crew or the
22962307 * decision ledger must ask before it computes or renders one of those.
22972308 */
2309
2310 describe("run page controls leave the old classes behind (#4263)", () => {
2311 test("no run-jump, run-live or run-steer class selector is defined, and [hidden] still beats .btn", async () => {
2312 const { css } = await import("../src/web/style.ts");
2313 for (const old of ["run-jump", "run-live", "run-steer"]) {
2314 expect(css).not.toMatch(new RegExp(`\\.${old}(?![\\w-])`));
2315 }
2316 // The layout is kept under the ids the client script already uses.
2317 expect(css).toMatch(/#run-steer \{[^}]*position: sticky/);
2318 expect(css).toMatch(/#run-jump \{[^}]*position: sticky/);
2319 expect(css).toMatch(/\[hidden\] \{ display: none !important; \}/);
2320 });
2321 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs