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

Design: the front page's crew line and its issue list use §5's row and dot, and front-crew/live/issues/more leave §5d #3956

Parked opened this
Closed without merging

scout/forge:scout/3942-design-the-front-page-s-crew-line-and-it → main 8 commits fork 4 threads · 4 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
6 files changed +43 −33
docs/DESIGN.md +4
@@ -393,7 +393,11 @@ gone, so this list only shrinks.
393393 - **`style/base.ts`** — the page shell (topbar, main, footer) and the layout and text utilities every page leans on: `.bar` `.bare` `.foot` `.grow` `.hide-lg` `.hide-sm` `.js-only` `.live-pill` `.mark` `.mb` `.mt` `.muted` `.narrow` `.narrow-wide` `.num` `.reduced` `.shell` `.shell-wide` `.skip` `.small` `.spacer` `.sr-only` `.stack` `.stack-tight` `.topbar` `.topbar-tools` `.truncate` `.wordmark`
394394 - **`style/components.ts`** — parts of the §5 components that the table does not spell out — the palette's list, the menu's items, a dialog's head and foot, comments, the theme picker — and a few small helpers beside them: `.cat` `.clone` `.clone-text` `.comment` `.comment-body` `.comment-form` `.dash` `.dialog-body` `.dialog-foot` `.dialog-head` `.empty-title` `.error-note` `.field-row` `.form-actions` `.hex` `.ico` `.ico-loader` `.list` `.live-status` `.menu-item` `.menu-panel` `.menu-sep` `.menu-title` `.palette-empty` `.palette-foot` `.palette-group` `.palette-heading` `.palette-input` `.palette-item` `.palette-list` `.passkey` `.passkey-lead` `.passkey-note` `.passkey-off` `.passkey-on` `.preview` `.sep` `.split` `.sprite` `.swatch` `.table-scroll` `.tell-here` `.theme-apply` `.theme-option` `.tick` `.timeline` `.tl-dot` `.toast-body` `.topbar-search`
395395 - **`style/components.ts`, settings rows** — a list whose rows are settings (limits, capacity): the `<ul class="list setting-list">` lets title and meta wrap instead of ellipsizing, and a row's controls take their own line under 640px. `.row-fields` is the form in that row's trail (input, Save, Default): always visible, never hover-gated, wrapping under the text before it would clip. Use both for any page whose rows show a name, a current value, and a control to change it; use `.row-actions` only for secondary actions (delete, wake, pin, revoke). Flags, telemetry, cloud, people, crew roles and subscription headroom/budget use `.row-fields`. Classes: `.row-fields` `.setting-list`
396 <<<<<<< HEAD
397 - **`style/content.ts`, page furniture** — what frames a page's content: page and repo heads, the merge box, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, following, lineage: `.about` `.act` `.app-shelf` `.app-tile` `.app-tile-body` `.app-tile-desc` `.app-tile-look` `.app-tile-name` `.backups-drill` `.backups-error` `.backups-now` `.backups-restore` `.bform` `.bgrid` `.big` `.bmanage` `.boards-result` `.bp-h2` `.bp-h3` `.bp-w2` `.bp-w3` `.break` `.bt-bar` `.bt-grid` `.bt-group` `.bt-hist` `.bt-name` `.bt-procs` `.bt-row` `.bt-val` `.chart` `.chart-box` `.commit-body` `.commit-head` `.connect-more` `.connect-path` `.domain-records` `.explore-filters` `.explore-line` `.explore-main` `.explore-name` `.explore-row` `.fg-s0` `.fg-s1` `.fg-s2` `.fg-s3` `.fg-s4` `.fg-s5` `.fg-s6` `.fg-s7` `.filters` `.flag-form` `.following` `.following-actions` `.following-eyebrow` `.following-foot` `.following-head` `.following-sentence` `.fork-bar` `.front-admin` `.front-controls` `.front-featured` `.front-featured-body` `.front-featured-look` `.front-pick` `.front-pin-any` `.front-weights` `.frozen` `.frozen-form` `.frozen-sentence` `.handoff` `.handoff-links` `.headroom` `.hero` `.hero-terminal` `.issue-head` `.issue-meta` `.kv` `.lineage` `.lineage-children` `.lineage-here` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.origin-link` `.origin-mark` `.origin-name` `.origin-row` `.owner` `.page-head` `.path-head` `.policy-line` `.qf` `.quiet-details` `.repo-actions` `.repo-audience` `.repo-desc` `.repo-layout` `.repo-lineage` `.repo-title` `.search` `.slash` `.stage-detail` `.stage-dot` `.steps` `.sub` `.sys-pair` `.table-wrap` `.terminal-line` `.tok` `.tree-row` `.tree-total` `.wall-cells` `.where-sep`
398 =======
396399 - **`style/content.ts`, page furniture** — what frames a page's content: page and repo heads, the merge box, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, following, lineage: `.about` `.act` `.app-shelf` `.app-tile` `.app-tile-body` `.app-tile-desc` `.app-tile-look` `.app-tile-name` `.backups-drill` `.backups-error` `.backups-now` `.backups-restore` `.bform` `.bgrid` `.big` `.bmanage` `.boards-result` `.bp-h2` `.bp-h3` `.bp-w2` `.bp-w3` `.break` `.bt-bar` `.bt-grid` `.bt-group` `.bt-hist` `.bt-name` `.bt-procs` `.bt-row` `.bt-val` `.chart` `.chart-box` `.commit-body` `.commit-head` `.connect-more` `.connect-path` `.domain-records` `.explore-filters` `.explore-line` `.explore-main` `.explore-name` `.explore-row` `.fg-s0` `.fg-s1` `.fg-s2` `.fg-s3` `.fg-s4` `.fg-s5` `.fg-s6` `.fg-s7` `.filters` `.flag-form` `.following` `.following-actions` `.following-eyebrow` `.following-foot` `.following-head` `.following-sentence` `.fork-bar` `.front-admin` `.front-controls` `.front-crew` `.front-featured` `.front-featured-body` `.front-featured-look` `.front-issues` `.front-live` `.front-more` `.front-pick` `.front-pin-any` `.front-weights` `.frozen` `.frozen-form` `.frozen-sentence` `.handoff` `.handoff-links` `.headroom` `.hero` `.hero-terminal` `.issue-head` `.issue-meta` `.kv` `.lineage` `.lineage-children` `.lineage-here` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.origin-link` `.origin-mark` `.origin-name` `.origin-row` `.owner` `.page-head` `.path-head` `.policy-line` `.qf` `.repo-actions` `.repo-audience` `.repo-desc` `.repo-layout` `.repo-lineage` `.repo-title` `.search` `.slash` `.stage-detail` `.stage-dot` `.steps` `.sub` `.sys-pair` `.table-wrap` `.terminal-line` `.tok` `.tree-row` `.tree-total` `.wall-cells` `.where-sep`
400 >>>>>>> origin/main
397401 - **`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`
398402 - **`style/content.ts`, prose (markdown)** — table cell alignment, built by `markdown.ts` as `ta-${align}`: `.ta-c` `.ta-r`
399403 - **`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`
src/web/studio/home.ts +31 −22
@@ -33,10 +33,12 @@ import { liveClientJs } from "../live.ts";
3333 import {
3434 btn,
3535 card,
36 dot,
3637 empty,
3738 envStateBadge,
3839 icon,
3940 listCard,
41 row,
4042 timeAgo,
4143 } from "../ui.ts";
4244 import {
@@ -342,26 +344,28 @@ function featuredCard(featured: NonNullable<FrontPage["featured"]>): Html {
342344 const agents = `${crew.running} agent${crew.running === 1 ? "" : "s"}`;
343345 const work =
344346 crew.running > 0
345 ? html`<p class="front-crew">
346 <span class="front-live" aria-hidden="true"></span>
347 The crew is at work: ${agents} right now
348 </p>
349 <ul class="front-issues">
350 ${crew.issues.map(
351 (i) =>
352 html`<li>
353 <a href="${base}/issues/${i.number}"
354 ><span class="muted">#${i.number}</span> ${i.title}</a
355 >
356 </li>`,
357 )}
358 </ul>`
347 ? html`${listCard([
348 row({

The html template around listCard is redundant; pass listCard(...) directly, as the Shipped branch does.

349 lead: dot("success", true),
350 title: `The crew is at work: ${agents} right now`,
351 }),
352 ...crew.issues.map((i) =>
353 row({
354 href: `${base}/issues/${i.number}`,
355 title: html`<span class="muted">#${i.number}</span> ${i.title}`,
356 }),
357 ),
358 ])}`
359359 : signals.shippedAt !== null
360 ? html`<p class="front-crew muted">
361 Shipped ${timeAgo(signals.shippedAt)}${signals.ships > 0
362 ? ` · ${signals.ships} change${signals.ships === 1 ? "" : "s"} merged this month`
363 : ""}
364 </p>`
360 ? listCard([
361 row({
362 title: `Shipped ${timeAgo(signals.shippedAt)}${
363 signals.ships > 0
364 ? ` · ${signals.ships} change${signals.ships === 1 ? "" : "s"} merged this month`
365 : ""
366 }`,
367 }),
368 ])
365369 : null;
366370 return html`<section class="front-featured" aria-label="Featured">
367371 ${when(
@@ -542,9 +546,14 @@ export function studioDoor(ctx: Ctx): Response {
542546 ${when(
543547 front.total > tiles.length + (front.featured === undefined ? 0 : 1),
544548 () =>
545 html`<p class="mt front-more">
546 <a href="/explore?q=kind%3Aapp">All ${front.total} public apps</a>
547 </p>`,
549 html`<div class="mt">
550 ${listCard([
551 row({
552 href: "/explore?q=kind%3Aapp",
553 title: `All ${front.total} public apps`,
554 }),
555 ])}
556 </div>`,
548557 )}`
549558 : front.featured === undefined
550559 ? html`<div class="mt">
src/web/style/components.ts +1
@@ -248,6 +248,7 @@ progress:not(.tests-bar)::-moz-progress-bar { background: var(--success); }
248248 .dot[data-tone="danger"] { background: var(--danger); }
249249 .dot[data-tone="attn"] { background: var(--attn); }
250250 .dot[data-tone="merged"] { background: var(--merged); }
outdated

Fine. Keep this paired with the reduced-motion entry in content.ts, since components.ts forbids animation:none for the animationend guard.

251 .dot[data-pulse] { animation: run-pulse 1.6s ease-in-out infinite; }
251252 .dot[data-series="0"] { background: var(--series-0); }
252253 .dot[data-series="1"] { background: var(--series-1); }
253254 .dot[data-series="2"] { background: var(--series-2); }
src/web/style/content.ts +1 −10
@@ -476,15 +476,6 @@ form.inline { display: inline; margin-left: auto; }
476476 .front-featured-body h2 a { color: inherit; text-decoration: none; }
477477 .front-featured-body p { color: var(--muted-fg); text-wrap: pretty; }
478478 .front-featured:not(:has(.front-featured-look)) { grid-template-columns: 1fr; }
479 .front-crew { display: flex; align-items: center; gap: 8px; font-size: 14px; }
480 .front-live {
481 width: 8px; height: 8px; border-radius: 50%; background: var(--success);
482 animation: run-pulse 1.6s ease-in-out infinite;
483 }
484 .front-issues { display: grid; gap: 4px; font-size: 14px; list-style: none; padding: 0; margin: 0; }
485 .front-issues li { min-width: 0; }
486 .front-issues a { color: inherit; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
487 .front-more { text-align: center; }
488479 .front-admin { max-width: 1040px; margin-inline: auto; }
489480 .front-pick { gap: 8px; }
490481 .front-pick form.inline { margin-left: 0; }
@@ -1205,7 +1196,7 @@ textarea.editor:focus-visible { outline: none; }
12051196 /* Reduced motion: the pulses hold still at a legible level, the scroll-tied
12061197 fade stays at its resting width, and these transitions land at once. */
12071198 @media (prefers-reduced-motion: reduce) {
1208 .front-live, .run-log .ln-pulse i { animation: none; }
1199 .dot[data-pulse], .run-log .ln-pulse i { animation: none; }
12091200 .run-log .ln-pulse i { opacity: .6; }
12101201 .explore-filters { animation: none; }
12111202 .ex-dir > summary > .ico, .code-layout > #code-main[aria-busy="true"], .code-layout > [data-split]::after { transition: none; }
src/web/ui.ts +2 −1
@@ -686,10 +686,11 @@ export function pill(value: number | string, tone?: "accent" | "danger"): Html {
686686 >`;
687687 }
688688
689 export function dot(tone: Tone = "default"): Html {
689 export function dot(tone: Tone = "default", pulse = false): Html {
outdated

A pulsing dot is decorative since the row title says the same thing; add aria-hidden="true" when pulse is set so screen readers skip it.

690690 return html`<span
691691 class="dot"
692692 ${tone !== "default" ? html`data-tone="${tone}"` : null}
693 ${pulse ? raw("data-pulse") : null}
693694 ></span>`;
694695 }
695696
test/front.test.ts +4
@@ -549,6 +549,10 @@ describe("the front page", () => {
549549 claimRun(app.db, run.id);
550550 const body = await door();
551551 expect(body).toContain("The crew is at work: 1 agent right now");
552 // Drawn from the row and the dot, not bespoke classes (#3942).
553 for (const old of ["front-crew", "front-live", "front-issues", "front-more"])
554 expect(body).not.toContain(old);
555 expect(body).toContain("data-pulse");
552556 expect(body).toContain("Make the board faster");
553557 const json = (await (await fetch(`${base}/api/v1/front`)).json()) as any;
554558 expect(json.featured.crew).toEqual({

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs