дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 17:21:13 +02:00
fix(boot): name an outdated system web engine on the startup failure page (#2587)
On macOS 11 with the original Safari 14 the system web engine cannot parse the Safari 16 bundle, and startup failed with only "Could not load startup script". When the engine lacks Safari 16 features, the failure page now says the system Safari (or WebKitGTK) is too old and how to update it. Refs #2008
Цей коміт міститься в:
1 джерело
8ef5132b5e
коміт
6d82b94b69
2 files changed
+44
-1
No files matched your search
@@ -190,3 +190,26 @@ it("preserves Safari error messages when its stack only lists locations", () =>
|
||||
expect(document.querySelector("textarea")?.value).toContain("SyntaxError: Unsupported regular expression");
|
||||
expect(document.querySelector("textarea")?.value).toContain(error.stack);
|
||||
});
|
||||
|
||||
it("names an outdated system web engine as the cause", () => {
|
||||
const supports = vi.fn(() => false);
|
||||
vi.stubGlobal("CSS", { supports });
|
||||
vi.spyOn(navigator, "userAgent", "get").mockReturnValue(
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)",
|
||||
);
|
||||
window.dispatchEvent(new ErrorEvent("error", { error: new SyntaxError("Unexpected token '.'") }));
|
||||
const hint = document.querySelector("#boot-error p")?.textContent;
|
||||
expect(supports).toHaveBeenCalledWith("container-type", "inline-size");
|
||||
expect(hint).toContain("needs Safari 16 or later");
|
||||
expect(hint).toContain("Software Update");
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
it("keeps the plain report hint on a current engine", () => {
|
||||
vi.stubGlobal("CSS", { supports: () => true });
|
||||
window.dispatchEvent(new ErrorEvent("error", { error: new Error("startup failed") }));
|
||||
expect(document.querySelector("#boot-error p")?.textContent).toBe(
|
||||
"Copy the details below and include them in a GitHub issue.",
|
||||
);
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
Reference in new issue
Заблокувати користувача