Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 1151b0317b7448e064b9639b44af5d137b473329
parent 4f868150e753f77773c2494d6dc1ed8b3b791a9d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 30 Sep 2026 09:14:25 -0400

homepage: the History block's head is the short sha, linking to its commit page; the history pages' clone line wraps at phone width

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Diffstat:
Mcommon/publish/sourceHistory.ts | 1+
Mhomepage/app/source/page.tsx | 12+++++++++---
Mhomepage/e2e/source-history.spec.ts | 4+++-
Mhomepage/e2e/source.spec.ts | 5++++-
4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/common/publish/sourceHistory.ts b/common/publish/sourceHistory.ts @@ -234,6 +234,7 @@ p.archilyzer-source { p.archilyzer-source a { color: var(--muted-foreground); text-decoration: none; } p.archilyzer-source a:hover { color: var(--foreground); text-decoration: underline; } h1, h2, h3, h4, h5, h6 { font-size: 1em; margin: 0; } +tr.url a { overflow-wrap: anywhere; } img, h1, h2 { vertical-align: middle; } img { border: 0; } a:target { background-color: var(--brand-soft); } diff --git a/homepage/app/source/page.tsx b/homepage/app/source/page.tsx @@ -3,6 +3,7 @@ import type { Metadata } from "next"; import { CLONE_URL, HISTORY_ATOM_HREF, + HISTORY_DIR, HISTORY_LOG_HREF, HISTORY_REFS_HREF, TREE_HREF, @@ -95,9 +96,14 @@ export default function SourcePage() { {manifest.history.commits.toLocaleString("en-US")} </span>{" "} commit{manifest.history.commits === 1 ? "" : "s"}, the newest{" "} - <span data-testid="source-history-head" className="tabular break-all"> - {manifest.history.head} - </span> + <a + data-testid="source-history-head" + href={`/source/${HISTORY_DIR}/commit/${manifest.history.head}.html`} + title={manifest.history.head} + className={`tabular ${linkClass}`} + > + {manifest.history.head.slice(0, 12)} + </a> . </p> <p className="text-sm text-[var(--muted-foreground)]"> diff --git a/homepage/e2e/source-history.spec.ts b/homepage/e2e/source-history.spec.ts @@ -27,7 +27,9 @@ test("with a history in the manifest: the History block names the commits and th await expect(block).toBeVisible(); await expect(block).toContainText("Every commit of main with its diff, as static pages"); await expect(page.getByTestId("source-history-commits")).toHaveText("1,234"); - await expect(page.getByTestId("source-history-head")).toHaveText(FIXTURE_HISTORY.head); + // The head, short, linking to its own commit page. + await expect(page.getByTestId("source-history-head")).toHaveText(FIXTURE_HISTORY.head.slice(0, 12)); + await expect(page.getByTestId("source-history-head")).toHaveAttribute("href", `/source/git/commit/${FIXTURE_HISTORY.head}.html`); await expect(page.getByTestId("source-history-log")).toHaveAttribute("href", "/source/git/log.html"); await expect(page.getByTestId("source-history-refs")).toHaveAttribute("href", "/source/git/refs.html"); await expect(page.getByTestId("source-history-atom")).toHaveAttribute("href", "/source/git/atom.xml"); diff --git a/homepage/e2e/source.spec.ts b/homepage/e2e/source.spec.ts @@ -119,7 +119,10 @@ test("the history pages: the log, a commit, the Files index into the raw tree; t await expect(page.getByTestId("source-history")).toHaveCount(0); return; } - await expect(page.getByTestId("source-history-head")).toHaveText(manifest.history.head); + await expect(page.getByTestId("source-history-head")).toHaveText(manifest.history.head.slice(0, 12)); + const headHref = await page.getByTestId("source-history-head").getAttribute("href"); + expect(headHref).toBe(`/source/git/commit/${manifest.history.head}.html`); + expect((await page.request.get(headHref!)).status()).toBe(200); const shown = (await page.getByTestId("source-history-commits").textContent())!.replace(/\D/g, ""); expect(shown).toBe(String(manifest.history.commits));