Compare commits

...

2 Commits

Author SHA1 Message Date
Aiden Cline aa83d6936b test(app): match renamed command payload key 2026-09-14 16:07:35 -05:00
Aiden Cline 69e41204a9 fix: unbreak v2 CI 2026-09-14 15:59:14 -05:00
3 changed files with 9 additions and 8 deletions
@@ -72,7 +72,8 @@ test("renames, exports, and deletes a home session from its context menu", async
expect(await container.evaluate((element) => getComputedStyle(element).outlineStyle)).toBe("none")
await title.fill("Renamed from Home")
const renamed = page.waitForRequest(
(request) => request.method() === "POST" && new URL(request.url()).pathname.endsWith("/rename"),
(request) =>
request.method() === "PATCH" && new URL(request.url()).pathname.endsWith(`/api/session/${fixture.targetID}`),
)
await title.press("Enter")
expect((await renamed).postDataJSON()).toEqual({ title: "Renamed from Home" })
+1 -1
View File
@@ -140,7 +140,7 @@ describe("Composer submission", () => {
await committed.promise
},
command: async (request) => {
expect(request).toMatchObject({ command: "review", text: "changes", delivery: "steer" })
expect(request).toMatchObject({ name: "review", text: "changes", delivery: "steer" })
expect(request).not.toHaveProperty("model")
expect(request).not.toHaveProperty("agent")
calls.push("command")
+6 -6
View File
@@ -218,12 +218,12 @@ export const stringGlobal = <R>(runner: Runner<R>) => {
`String.matchAll requires a regular expression with the global (g) flag: write /${pattern.source}/${pattern.flags}g, or use String.match for a single match.`,
)
}
const matches: Array<unknown> = []
for (const match of value.matchAll(pattern)) {
checkArrayLength(matches.length + 1)
matches.push(matchToValue(protos, match))
}
return new ProgramArray(protos.Array, matches)
// Count natively first: converting each match is the expensive part, and an oversized result must fail before that.
checkArrayLength(value.match(pattern)?.length ?? 0)
return new ProgramArray(
protos.Array,
Array.from(value.matchAll(pattern), (match) => matchToValue(protos, match)),
)
}),
simple("search", 1, (value, args) => value.search(toHostRegex(args[0], "search"))),
simple("repeat", 1, (value, args) => {