Fix runtime PRIMITIVES for dom/browser library functions
dom.sx and browser.sx are library source (not transpiled into the bundle), so their functions need explicit PRIMITIVES registration for runtime-eval'd SX code (islands, data-init scripts). Restore registrations for all dom/ browser functions used at runtime. Revert bootstrap.py transpilation of dom-lib/browser-lib which overrode native platform implementations that have essential runtime integration (cekCall wrapping, post-render hooks). Add Playwright regression test for [object Object] nav link issue. Replace console-log calls with log-info in init-client.sx.txt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,24 @@ test.describe('Isomorphic SSR', () => {
|
||||
await context.close();
|
||||
});
|
||||
|
||||
test('navigation links have valid URLs (no [object Object])', async ({ page }) => {
|
||||
await page.goto(BASE_URL + '/sx/', { waitUntil: 'networkidle' });
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
// Check all nav links for [object Object] — regression for FFI primitive overrides
|
||||
const brokenLinks = await page.evaluate(() => {
|
||||
const links = document.querySelectorAll('a[href]');
|
||||
const broken = [];
|
||||
for (const a of links) {
|
||||
if (a.href.includes('[object') || a.href.includes('object%20Object')) {
|
||||
broken.push({ href: a.href, text: a.textContent.trim().slice(0, 40) });
|
||||
}
|
||||
}
|
||||
return broken;
|
||||
});
|
||||
expect(brokenLinks).toEqual([]);
|
||||
});
|
||||
|
||||
test('navigation preserves header island state', async ({ page }) => {
|
||||
await page.goto(BASE_URL + '/sx/', { waitUntil: 'networkidle' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user