Public: anyone can read this; the crew can change it.
The installed app's description says what the front page says #6053
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/6045-the-installed-app-s-description-says-wha → main 2 commits fork 1 thread · 1 unresolved
5 files
changed +17
−3
src/web/layout.ts +1 −1
| @@ -41,6 +41,7 @@ import { noRoom } from "../spawn/door.ts"; | ||
| 41 | 41 | import { quotaFull } from "../spawn/quota.ts"; |
| 42 | 42 | import { icon, iconSprite, inlineIcons, themeGlyph } from "./icons.ts"; |
| 43 | 43 | import { btn, copyField, kbd, menu, type MenuItem } from "./ui.ts"; |
| 44 | import { SITE_LINE } from "./site_line.ts"; | |
| 44 | 45 | |
| 45 | 46 | /** One row of the command palette: title, href, category. */ |
| 46 | 47 | export interface PaletteItem { |
| @@ -504,7 +505,6 @@ function footer(ctx: Ctx): Html { | ||
| 504 | 505 | |
| 505 | 506 | // ---- the page ---- |
| 506 | 507 | |
Two blank lines remain where the const used to be; drop one. |
||
| 507 | const SITE_LINE = "Your code, your machine."; | |
| 508 | 508 | |
| 509 | 509 | function pageDescription(options: PageOptions): string { |
| 510 | 510 | const own = options.description?.trim().split(/\r?\n/)[0]?.trim() ?? ""; |
src/web/site_line.ts added +2
| @@ -0,0 +1,2 @@ | ||
| 1 | /** The one sentence for what the forge is: manifest, meta and og:description, front page. */ | |
| 2 | export const SITE_LINE = "A software forge that builds and serves its own apps."; |
src/web/standards.ts +2 −1
| @@ -31,6 +31,7 @@ import { llmsRepos, sitemapRepos } from "../core/listings.ts"; | ||
| 31 | 31 | import { canRead, getRepo } from "../core/repos.ts"; |
| 32 | 32 | import type { Ctx } from "../http/context.ts"; |
| 33 | 33 | import { notFound } from "../http/respond.ts"; |
| 34 | import { SITE_LINE } from "./site_line.ts"; | |
| 34 | 35 | import { mcpCard, mcpPointers } from "../core/mcp_card.ts"; |
| 35 | 36 | import { timePhase } from "../core/route_timing.ts"; |
| 36 | 37 | |
| @@ -203,7 +204,7 @@ export function webManifest(ctx: Ctx): Response { | ||
| 203 | 204 | { |
| 204 | 205 | name, |
| 205 | 206 | short_name: name, |
| 206 | description: "Your code, your machine.", | |
| 207 | description: SITE_LINE, | |
| 207 | 208 | start_url: "/", |
| 208 | 209 | scope: "/", |
| 209 | 210 | id: "/", |
src/web/studio/home.ts +2 −1
| @@ -64,6 +64,7 @@ import { nextStepsCard, nextStepsOf } from "../pages/next-steps.ts"; | ||
| 64 | 64 | import { spawnedOrg } from "../../spawn/claim.ts"; |
| 65 | 65 | import { clientApps } from "./client_home.ts"; |
| 66 | 66 | import { passkeyJs } from "../passkey-client.ts"; |
| 67 | import { SITE_LINE } from "../site_line.ts"; | |
| 67 | 68 | |
| 68 | 69 | /** The events that can change what is on you. */ |
| 69 | 70 | const ON_YOU_LIVE = |
| @@ -517,7 +518,7 @@ export function studioDoor(ctx: Ctx): Response { | ||
| 517 | 518 | const ssh = sshCommand(ctx.app); |
| 518 | 519 | const body = html`<section class="narrow narrow-wide stack"> |
| 519 | 520 | <h1>Apps, live.</h1> |
| 520 | <p class="muted">A software forge that builds and serves its own apps.</p> | |
| 521 | <p class="muted">${SITE_LINE}</p> | |
| 521 | 522 | <div class="bar"> |
| 522 | 523 | ${ctx.auth.user !== undefined |
| 523 | 524 | ? null |
test/standards.test.ts +10
| @@ -20,6 +20,7 @@ import { createUser, type User } from "../src/core/users.ts"; | ||
| 20 | 20 | import { forgetListings, listingBuilds } from "../src/core/listings.ts"; |
| 21 | 21 | import { createOrg, retireOrg } from "../src/core/orgs.ts"; |
| 22 | 22 | import { getRepo, moveArchived } from "../src/core/repos.ts"; |
| 23 | import { SITE_LINE } from "../src/web/site_line.ts"; | |
| 23 | 24 | import { serve, type Servers } from "../src/http/server.ts"; |
| 24 | 25 | |
| 25 | 26 | describe("what the open web expects", () => { |
| @@ -330,4 +331,13 @@ describe("what the open web expects", () => { | ||
| 330 | 331 | expect(csp).toContain("manifest-src 'self'"); |
| 331 | 332 | expect(csp).toMatch(/img-src [^;]*'self'/); |
| 332 | 333 | }); |
| 334 | ||
| 335 | test("the manifest and the front page carry the same sentence", async () => { | |
| 336 | const manifest = (await (await fetch(`${base}/manifest.webmanifest`)).json()) as { description: string }; | |
| 337 | const html = await (await fetch(`${base}/`)).text(); | |
| 338 | expect(manifest.description).toBe(SITE_LINE); | |
| 339 | expect(html).toContain(`<meta name="description" content="${SITE_LINE}"`); | |
| 340 | expect(html).toContain(`<meta property="og:description" content="${SITE_LINE}"`); | |
| 341 | expect(html).toContain(SITE_LINE); | |
| 342 | }); | |
| 333 | 343 | }); |
new above
offline
Removing the const left two blank lines here; drop one.