From 52ada010f342b15909e671541f46b20870f45701 Mon Sep 17 00:00:00 2001 From: leemour Date: Thu, 26 Nov 2026 02:01:51 +0100 Subject: [PATCH] fix(docs): load the site's own images from the build, not from wirecat.dev tg 0.136.0 names its login screenshot by its full address, https://wirecat.dev/telegram-app-login.png, so it shows on GitHub too. #755 carried that into the tg sessions pages, and the deploy's browser test, which looks for /telegram-app-login.png, failed in all three languages. It blocks every deploy since, the attio pages of #752 among them. Co-Authored-By: Claude Opus 5.5 --- lib/remark-doc-usability.ts | 4 ++++ scripts/docs-usability.test.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/remark-doc-usability.ts b/lib/remark-doc-usability.ts index 81ecb58b..ba2f448b 100644 --- a/lib/remark-doc-usability.ts +++ b/lib/remark-doc-usability.ts @@ -93,6 +93,10 @@ export function remarkDocUsability(indexes = loadCommandIndexes()) { } const visit = (node: Node) => { + // Tool docs name the site's own images by their full address so they show on GitHub too; here they load from + // this build, not from the deployed site. + if (node.type === "image" && node.url?.startsWith("https://wirecat.dev/")) + node.url = node.url.slice("https://wirecat.dev".length) if (node.type === "table") { tableNumber++ node.data = { diff --git a/scripts/docs-usability.test.ts b/scripts/docs-usability.test.ts index dc402b9e..1e304cf9 100644 --- a/scripts/docs-usability.test.ts +++ b/scripts/docs-usability.test.ts @@ -84,7 +84,7 @@ describe("documentation command references", () => { }) it("keeps browser-login screenshots in an accessible closed disclosure", () => { const tree = fromMarkdown( - "> **See the my.telegram.org login screen**\n>\n> ![Empty login form](/telegram-app-login.png)\n>\n> Website login comes before account authorization.\n", + "> **See the my.telegram.org login screen**\n>\n> ![Empty login form](https://wirecat.dev/telegram-app-login.png)\n>\n> Website login comes before account authorization.\n", ) remarkDocUsability(new Map())(tree, { path: "/project/content/docs/tg/sessions.md" }) expect(tree.children[0]).toMatchObject({