test: stabilize release test shards

This commit is contained in:
Peter Steinberger
2026-04-30 08:31:13 +01:00
parent bd739cf851
commit f677c8c201
2 changed files with 11 additions and 5 deletions

View File

@@ -247,9 +247,14 @@ describe("buildWorkspaceSkillSnapshot", () => {
);
// We should only have loaded a small subset.
expect(snapshot.skills.length).toBeLessThanOrEqual(5);
expect(snapshot.prompt).toContain("repo-skill-00");
expect(snapshot.prompt).not.toContain("repo-skill-07");
const skillNames = snapshot.skills.map((skill) => skill.name);
expect(skillNames.length).toBeGreaterThan(0);
expect(skillNames.length).toBeLessThanOrEqual(5);
expect(new Set(skillNames).size).toBe(skillNames.length);
for (const name of skillNames) {
expect(name).toMatch(/^repo-skill-\d{2}$/);
expect(snapshot.prompt).toContain(name);
}
});
it("skips skills whose SKILL.md exceeds maxSkillFileBytes", async () => {

View File

@@ -591,10 +591,11 @@ export function syncUrlWithTab(host: SettingsHost, tab: Tab, replace: boolean) {
}
export function syncUrlWithSessionKey(host: SettingsHost, sessionKey: string, replace: boolean) {
if (typeof window === "undefined") {
const href = typeof window === "undefined" ? undefined : window.location?.href;
if (!href) {
return;
}
const url = new URL(window.location.href);
const url = new URL(href);
url.searchParams.set("session", sessionKey);
updateBrowserHistory(url, replace);
}