fix(web): the Top-Level Pages cards led nowhere, and /privacy was not a page (#114)
Some checks are pending
CI / build (push) Waiting to run
test / test (push) Waiting to run

The "Top-Level Pages" band advertises eight stable routes, but the cards
were plain <h3> text with no anchors -- nothing on that band was
clickable. Wrap each card title in a link to its route.

/privacy was the worst of the eight. It had no page and no homepage
section, so it fell through to [[...slug]], which served the entire
homepage (82KB, byte-identical to /openspec, /credential-sharing, and
/hire-us) and then scrolled to the card that merely described the page
that did not exist. Give it a real page covering what the site actually
does: CrawlProof analytics, the Hire Us form, the CoinPay OAuth session
cookie, and the credshare boundary -- ciphertext and salted-hash
fingerprints are stored, secret values never reach the server.

The cards also reused the ids openspec, credential-sharing, and hire-us,
which already name sections further up the same document. Duplicate ids
made those scroll targets ambiguous, so the cards are now page-<route>.
With that, the scroll list in home-interactivity only needs the three
routes [[...slug]] still serves; docs, blog, about, terms, and privacy
are real routes and were only ever aiming scrollIntoView at a card.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-07-30 14:35:51 -07:00 committed by GitHub
parent bb09c145cd
commit f9ebf9b342
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 212 additions and 17 deletions

View file

@ -24,15 +24,40 @@ test.describe("LogicSRC PWA", () => {
await expect(page.getByText("logicsrc credentials providers")).toBeVisible();
});
test("renders top-level docs and legal route targets", async ({ page }) => {
await page.goto("/privacy");
test("links every Top-Level Pages card at its route", async ({ page }) => {
await page.goto("/");
await expect(page.getByRole("heading", { name: "Top-Level Pages" })).toBeVisible();
await expect(page.getByText("/docs · Docs")).toBeVisible();
await expect(page.getByText("/blog · Blog")).toBeVisible();
await expect(page.getByText("/credential-sharing · Credential Sharing")).toBeVisible();
await expect(page.getByText("/terms · Terms")).toBeVisible();
await expect(page.getByText("/privacy · Privacy")).toBeVisible();
// Each card advertises a stable route, so each card has to be a link to it.
for (const route of [
"docs",
"blog",
"openspec",
"credential-sharing",
"hire-us",
"about",
"terms",
"privacy",
]) {
await expect(
page.locator(`#page-${route} a[href="/${route}"]`),
`/${route} card should link to /${route}`,
).toBeVisible();
}
});
test("renders a real Privacy page rather than the homepage", async ({ page }) => {
await page.goto("/privacy");
await expect(page.getByRole("heading", { name: "Privacy", exact: true })).toBeVisible();
await expect(page.getByRole("heading", { name: "Analytics" })).toBeVisible();
await expect(page.getByRole("heading", { name: "Cookies" })).toBeVisible();
await expect(page.getByText("Secret values are encrypted end-to-end")).toBeVisible();
// The old /privacy fell through to [[...slug]] and served the whole
// homepage; the Top-Level Pages band is the tell that it regressed.
await expect(page.getByRole("heading", { name: "Top-Level Pages" })).toHaveCount(0);
});
test("renders Hire Us project request flow", async ({ page }) => {