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

The installed app's description says what the front page says #6053

Merged opened this

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

Merged

scout/forge:scout/6045-the-installed-app-s-description-says-wha → main 2 commits fork 1 thread · 1 unresolved

  • Merged. scout/6045-the-installed-app-s-description-says-wha was merged into main as 719eebc.

Review

Sign in to review this change.
5 files changed +17 −3
src/web/layout.ts +1 −1
@@ -41,6 +41,7 @@ import { noRoom } from "../spawn/door.ts";
4141 import { quotaFull } from "../spawn/quota.ts";
4242 import { icon, iconSprite, inlineIcons, themeGlyph } from "./icons.ts";
4343 import { btn, copyField, kbd, menu, type MenuItem } from "./ui.ts";
44 import { SITE_LINE } from "./site_line.ts";
4445
4546 /** One row of the command palette: title, href, category. */
4647 export interface PaletteItem {
@@ -504,7 +505,6 @@ function footer(ctx: Ctx): Html {
504505
505506 // ---- the page ----
506507

Removing the const left two blank lines here; drop one.

Two blank lines remain where the const used to be; drop one.

507 const SITE_LINE = "Your code, your machine.";
508508
509509 function pageDescription(options: PageOptions): string {
510510 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";
3131 import { canRead, getRepo } from "../core/repos.ts";
3232 import type { Ctx } from "../http/context.ts";
3333 import { notFound } from "../http/respond.ts";
34 import { SITE_LINE } from "./site_line.ts";
3435 import { mcpCard, mcpPointers } from "../core/mcp_card.ts";
3536 import { timePhase } from "../core/route_timing.ts";
3637
@@ -203,7 +204,7 @@ export function webManifest(ctx: Ctx): Response {
203204 {
204205 name,
205206 short_name: name,
206 description: "Your code, your machine.",
207 description: SITE_LINE,
207208 start_url: "/",
208209 scope: "/",
209210 id: "/",
src/web/studio/home.ts +2 −1
@@ -64,6 +64,7 @@ import { nextStepsCard, nextStepsOf } from "../pages/next-steps.ts";
6464 import { spawnedOrg } from "../../spawn/claim.ts";
6565 import { clientApps } from "./client_home.ts";
6666 import { passkeyJs } from "../passkey-client.ts";
67 import { SITE_LINE } from "../site_line.ts";
6768
6869 /** The events that can change what is on you. */
6970 const ON_YOU_LIVE =
@@ -517,7 +518,7 @@ export function studioDoor(ctx: Ctx): Response {
517518 const ssh = sshCommand(ctx.app);
518519 const body = html`<section class="narrow narrow-wide stack">
519520 <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>
521522 <div class="bar">
522523 ${ctx.auth.user !== undefined
523524 ? null
test/standards.test.ts +10
@@ -20,6 +20,7 @@ import { createUser, type User } from "../src/core/users.ts";
2020 import { forgetListings, listingBuilds } from "../src/core/listings.ts";
2121 import { createOrg, retireOrg } from "../src/core/orgs.ts";
2222 import { getRepo, moveArchived } from "../src/core/repos.ts";
23 import { SITE_LINE } from "../src/web/site_line.ts";
2324 import { serve, type Servers } from "../src/http/server.ts";
2425
2526 describe("what the open web expects", () => {
@@ -330,4 +331,13 @@ describe("what the open web expects", () => {
330331 expect(csp).toContain("manifest-src 'self'");
331332 expect(csp).toMatch(/img-src [^;]*'self'/);
332333 });
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 });
333343 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs