Public: anyone can read this; the crew can change it.
The search page's live line draws §5's .small row and link, and .live-toggle leaves its markup #4411
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4401-the-search-page-s-live-line-draws-5-s-sm → main 1 commit fork 1 thread · 1 unresolved
2 files
changed +11
−1
src/web/pages/search.ts +1 −1
| @@ -428,7 +428,7 @@ export async function searchPage(ctx: Ctx): Promise<Response> { | ||
| 428 | 428 | const liveToggle = when( |
| 429 | 429 | ctx.auth.user !== undefined, |
| 430 | 430 | () => |
| 431 | html`<p class="live-toggle small"> | |
| 431 | html`<p class="row small muted"> | |
| 432 | 432 | ${icon("globe")} |
| 433 | 433 | ${a.live |
| 434 | 434 | ? html`<span |
test/web-code.test.ts +10
| @@ -515,6 +515,16 @@ describe("the code browser on the web", () => { | ||
| 515 | 515 | expect(live).toContain("Use the cache"); |
| 516 | 516 | }); |
| 517 | 517 | |
| 518 | test("the live line is drawn with §5's row, not a live-toggle class", async () => { | |
| 519 | const off = await text("/search?q=lamp", alice); | |
| 520 | expect(off).not.toContain("live-toggle"); | |
| 521 | expect(off).toContain('<p class="row small muted">'); | |
| 522 | expect(off).toMatch(/<a href="[^"]*live=1[^"]*"\s*>\s*Search live on origins/); | |
| 523 | const on = await text("/search?q=lamp&live=1", alice); | |
| 524 | expect(on).not.toContain("live-toggle"); | |
| 525 | expect(on).toMatch(/<a href="[^"]*"\s*>Use the cache\s*<\/a/); | |
| 526 | }); | |
| 527 | ||
| 518 | 528 | test("a stranger's search never names a private repository", async () => { |
| 519 | 529 | const html = await text("/search?q=vault", kim); |
| 520 | 530 | expect(html).not.toContain("alice/vault"); |
new above
offline
Good: it reuses the named row. Check at 360px that the 14px row padding lines up with the chips above it. The row is a flex container, so the text stays in one span and wraps cleanly.