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

The home's "waiting on you" line wraps on a narrow screen and its action stays tappable #6603

Merged opened this

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

Merged

scout/forge:scout/6068-the-home-s-waiting-on-you-line-wraps-on → main 3 commits fork

  • Merged. scout/6068-the-home-s-waiting-on-you-line-wraps-on was merged into main as f84deab.

Review

Sign in to review this change.
2 files changed +14 −4
src/web/studio/kpi_row.ts +2 −1
@@ -185,8 +185,9 @@ export function waitingLine(db: Database, user: User, now: Date = new Date()): H
185185 });
186186 const words = waitingWords(count, oldest, now);
187187 if (words === null && stale.length === 0) return html``;
188 // `.break` lets the words wrap; `.stack` puts the link on its own line. No ask title: the home stays bare of them.
188189 // The fold is a form, which cannot sit in the paragraph: it follows it.
189 return html`${words === null ? null : html`<p class="small muted"><a href="/review">${words}</a></p>`}${stale.length === 0 ? null : staleArchive(stale)}`;
190 return html`${words === null ? null : html`<p class="small muted break stack stack-tight"><span>${words}</span><a href="/review">Review them</a></p>`}${stale.length === 0 ? null : staleArchive(stale)}`;
190191 }
191192
192193 /** Home's flow vitals for an admin (#5935): one muted line of counts; the open count links to the boards. */
test/home-kpi-row.test.ts +12 −3
@@ -351,7 +351,7 @@ describe("home waiting line", () => {
351351 expect(waitingWords(1, "2026-10-21T11:40:00.000Z", now)).toBe("1 waiting on you, oldest under 1 h");
352352 });
353353
354 async function homeWith(stale: number[]): Promise<string> {
354 async function homeWith(stale: number[], title?: string): Promise<string> {
355355 const root = mkdtempSync(join(tmpdir(), "forge-home-wait-"));
356356 const app = createApp({ dataDir: root, port: 0 });
357357 const servers = await serve(app);
@@ -365,7 +365,7 @@ describe("home waiting line", () => {
365365 const number = app.db.query<{ issue_seq: number }, [string]>("UPDATE repo SET issue_seq = issue_seq + 1 WHERE id = ?1 RETURNING issue_seq").get(repo.value.id)!.issue_seq;
366366 app.db
367367 .query(`INSERT INTO issue (id, repo_id, number, kind, title, body, author_id, state, created_at) VALUES (?1, ?2, ?3, 'pull', ?4, '', ?5, 'open', ?6)`)
368 .run(issueId, repo.value.id, number, `Stale ${i}`, made.value.id, new Date(Date.now() - h * 3_600_000).toISOString());
368 .run(issueId, repo.value.id, number, title ?? `Stale ${i}`, made.value.id, new Date(Date.now() - h * 3_600_000).toISOString());
369369 app.db
370370 .query(`INSERT INTO pull (issue_id, base_branch, head_branch, base_oid, head_oid, head_repo_id) VALUES (?1, 'main', ?2, ?3, ?3, ?4)`)
371371 .run(issueId, `b/${i}`, "0".repeat(40), repo.value.id);
@@ -389,7 +389,16 @@ describe("home waiting line", () => {
389389
390390 test("three asks show one line linking to /review", async () => {
391391 const body = await homeWith([30, 40, 50]);
392 expect(body).toMatch(/<p class="small muted"><a href="\/review">3 waiting on you, oldest 5\d h<\/a><\/p>/);
392 expect(body).toMatch(/<p class="small muted break stack stack-tight"><span>3 waiting on you, oldest 5\d h<\/span><a href="\/review">Review them<\/a><\/p>/);
393 }, 30_000);
394
395 test("a 120-character title with no spaces: the line breaks, the link below, the title stays off home", async () => {
396 const long = "x".repeat(120);
397 const body = await homeWith([30], long);
398 const line = body.slice(body.indexOf('<p class="small muted break'), body.indexOf("Review them</a></p>"));
399 expect(line).toMatch(/^<p class="[^"]*\bbreak\b[^"]*\bstack\b/);
400 expect(line).toContain('</span><a href="/review">');
401 expect(line).not.toContain(long);
393402 }, 30_000);
394403
395404 test("with none, the line is absent", async () => {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs