* Recommend Claude Opus 5.5 by bumping the Pi model catalog The pinned pi-ai 0.85.1 had no Claude Opus 5.5, so the connect flow fell back to Opus 5. pi-ai and pi-agent-core 0.87.1 add it, and the keyless recommendation now preselects it. The new catalog names router aliases "Qwen Max Latest (Qwen3.8 Max)"; those now read "(auto-updates)" like the other alias labels, so no picker entry claims to be "latest". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Name HTTPS as the cause when dictation is unavailable, and translate it Over plain HTTP on a LAN address, Safari hides the microphone and speech recognition, so voice mode said the browser had no dictation, in English inside a German UI. Dictation now checks for a secure context first and says to open the address with https://. Its other errors go through Lingui too, and Safari's blocked recognizer gets a clear message instead of "Dictation failed: not-allowed". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Serve a fake Kokoro voice server in the E2E harness Onboarding's voice step connects to the local Kokoro server on its default port, so the shell E2E failed on any machine where nothing (or a misbehaving server) listened there: the failed request shows up as a browser console error. The harness now starts an offline stand-in and points KOKORO_BASE_URL at it, so the suite no longer depends on the runner host's own voice server. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Show only the recommended sign-in until a model is connected With no model connected, "Connect model" opened the full model settings: provider list, tiers and a model picker, even though the recommendation was already preselected. Until something is connected, the Models panel now shows just the preselected model with its sign-in and API key field; "Other providers" reveals the full settings. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Give the second chart-links test the same cold-load allowance as the first Each Playwright test runs in a fresh browser context, so the second test's first navigation re-fetches the lazily imported Plot chunk just like the first test's warm-up does. On a loaded CI runner that exceeded the default 20 s expect timeout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Use the recommended model as the Anthropic deployment default A deployment that sets only ANTHROPIC_API_KEY and PI_DEFAULT_PROVIDER=anthropic now runs Claude Opus 5.5, the same model the connect flow preselects, instead of an older default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Run every space on the deployment's local models without a connect step A deployment with PI_DEFAULT_PROVIDER=local and RAKAZO_LOCAL_MODELS set still asked every user to connect a model, because only OpenRouter and Anthropic counted as a deployment model. Configured local models now do, keylessly. RAKAZO_LOCAL_TIERS assigns local models to the tiers the agent delegates to, for spaces that have not mapped their own, and a RAKAZO_LOCAL_MODELS entry can name its own server (id=url) when the models run behind different endpoints. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Hide model choices when the deployment routes models itself When the server provides its own models, the system picks and routes them per task, so Settings no longer offers Models and bot settings no longer offer Model and Thinking, on web and mobile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Wait for the workspace pane's width transition before measuring it The pane animates its width over 300 ms, so a single boundingBox read right after it opens can land mid-transition on a slow runner. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD * Allow chart re-renders inside the chart-links loops to take longer Each navigation in the loops renders Observable Plot again. On a loaded CI runner that exceeded the default expect timeout even after the warm-up, so the per-iteration visibility checks get 30 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KWEAjTw26eRf3ZXTXfRjmD --------- Co-authored-by: Claude <noreply@anthropic.com>
92 lines
4.1 KiB
TypeScript
92 lines
4.1 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { captureScreenshot } from "./helpers";
|
|
|
|
const fixture = "/e2e/fixtures/chart-links.html";
|
|
|
|
test("chart links cannot execute script when clicked or expanded", async ({ page }, testInfo) => {
|
|
test.setTimeout(120_000);
|
|
// ChartCanvas lazy-loads Observable Plot; pay the import cost once before the matrix below.
|
|
await page.goto(`${fixture}?${new URLSearchParams({ href: "#details", inspect: "0" })}`);
|
|
await expect(page.locator("svg circle").first()).toBeVisible({ timeout: 90_000 });
|
|
for (const inspect of ["0", "1"]) {
|
|
for (const href of [
|
|
'javascript:void(document.body.dataset.plotExecuted="yes")',
|
|
' \u0000\u001fJaVa\tScRi\nPt:void(document.body.dataset.plotExecuted="yes")',
|
|
'javascript:%76oid(document.body.dataset.plotExecuted="yes")',
|
|
"data:text/html,<script>document.body.dataset.plotExecuted='yes'</script>",
|
|
"file:///example.txt",
|
|
]) {
|
|
await page.goto(`${fixture}?${new URLSearchParams({ href, inspect })}`);
|
|
const circle = page.locator("svg circle").first();
|
|
// Every navigation renders Plot again, which takes seconds on a loaded CI runner.
|
|
await expect(circle).toBeVisible({ timeout: 30_000 });
|
|
const assertInert = async () => {
|
|
const links = page.locator("svg a");
|
|
expect(await links.count()).toBeGreaterThan(0);
|
|
expect(
|
|
await links.evaluateAll((anchors) =>
|
|
anchors.every(
|
|
(anchor) =>
|
|
!anchor.hasAttribute("href") &&
|
|
!anchor.hasAttributeNS("http://www.w3.org/1999/xlink", "href"),
|
|
),
|
|
),
|
|
).toBe(true);
|
|
await expect(page.locator("body")).not.toHaveAttribute("data-plot-executed");
|
|
};
|
|
await assertInert();
|
|
await circle.click();
|
|
// Hover inspection still works, without reintroducing unsafe links.
|
|
if (inspect === "1") await expect(page.locator('[aria-label="tip"]')).toBeVisible();
|
|
await assertInert();
|
|
await page.getByRole("button", { name: "Expand", exact: true }).click();
|
|
const dialog = page.getByRole("dialog");
|
|
await expect(dialog.locator("svg circle")).toBeVisible({ timeout: 30_000 });
|
|
await dialog.locator("svg circle").click();
|
|
await assertInert();
|
|
await expect(page).toHaveURL(`${fixture}?${new URLSearchParams({ href, inspect })}`);
|
|
await page.getByRole("button", { name: "Close chart" }).click();
|
|
}
|
|
}
|
|
await captureScreenshot(page, testInfo, "chart-with-inert-link");
|
|
});
|
|
|
|
test("chart links retain supported URLs and browser encoding semantics", async ({ page }) => {
|
|
test.setTimeout(120_000);
|
|
await page.route("https://example.test/**", (route) =>
|
|
route.fulfill({ body: "Chart destination" }),
|
|
);
|
|
await page.route("**/e2e/fixtures/java*", (route) =>
|
|
route.fulfill({ body: "Chart destination" }),
|
|
);
|
|
// Each test gets a fresh browser context, so this one pays the cold Plot import too.
|
|
await page.goto(`${fixture}?${new URLSearchParams({ href: "#details" })}`);
|
|
await expect(page.locator("svg circle").first()).toBeVisible({ timeout: 90_000 });
|
|
for (const href of [
|
|
"https://example.test/chart?a=1&b=2",
|
|
"mailto:chart@example.test",
|
|
"tel:+15555550123",
|
|
"#details",
|
|
"javascript:void(0)",
|
|
"javascript%3Avoid(0)",
|
|
"java%73cript:void(0)",
|
|
]) {
|
|
await page.goto(`${fixture}?${new URLSearchParams({ href })}`);
|
|
await expect(page.locator("svg circle").first()).toBeVisible({ timeout: 30_000 });
|
|
const link = page.locator("svg a").first();
|
|
await expect(link).toBeAttached();
|
|
expect(
|
|
await link.evaluate((anchor) =>
|
|
anchor.getAttributeNS("http://www.w3.org/1999/xlink", "href"),
|
|
),
|
|
).toBe(href);
|
|
const destination = new URL(href, page.url());
|
|
expect(destination.protocol).not.toBe("javascript:");
|
|
if (destination.protocol === "http:" || destination.protocol === "https:") {
|
|
await link.locator("circle").click();
|
|
await expect(page).toHaveURL(destination.href);
|
|
await expect(page.locator("body")).not.toHaveAttribute("data-plot-executed");
|
|
}
|
|
}
|
|
});
|