Merge remote-tracking branch 'origin/main' into refactor/task-15f-full-guide-restore

This commit is contained in:
Marcos Paulo
2026-09-06 00:03:07 +00:00
2 changed files with 12 additions and 3 deletions
+7 -3
View File
@@ -22,11 +22,15 @@ import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { chromium } from 'playwright';
// `index` is the landing page: it lives at the repository root, not in a
// directory of its own, so it needs a different path on the legacy side.
const route = process.argv[2];
if (!route) {
console.error('usage: rendered-text-diff.mjs <route> e.g. full-guide');
console.error('usage: rendered-text-diff.mjs <route> e.g. full-guide, or index');
process.exit(2);
}
const legacyPath = route === 'index' ? 'index.html' : `${route}/index.html`;
const astroPath = route === 'index' ? '' : `${route}/`;
// The built site expects to be served under the configured base path.
const staging = mkdtempSync(join(tmpdir(), 'af-rtd-'));
@@ -75,8 +79,8 @@ try {
return spans;
};
const legacy = await grab(`http://localhost:4197/${route}/index.html`);
const astro = await grab(`http://localhost:4196/ai-for-dummies/${route}/`);
const legacy = await grab(`http://localhost:4197/${legacyPath}`);
const astro = await grab(`http://localhost:4196/ai-for-dummies/${astroPath}`);
await browser.close();
const rendered = new Set(astro);
@@ -403,8 +403,13 @@ fix(api): scope session query</code></pre>
select('[data-skill]', id, 'skill');
}
// Keys whose copy carries markup, so the swap must write innerHTML.
// `skillsText` was missing while the markup renders it with `set:html`:
// the island rewrote it as text on load and every visitor saw a literal
// `<code>.agents/skills/</code>` in the paragraph.
const HTML_KEYS = {
heroTitle: 1,
skillsText: 1,
pipelineTitle: 1,
skillsTitle: 1,
ratchetTitle: 1,