mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-05 00:15:41 -08:00
Sync upstream v3.2.6: Loop checkboxes, Notes drag handle, US English replies, app update fetch (v3.2.6)
- Implement's and Review's confirm panes carry a Loop checkbox in place of the dashboard's loop cards; loop end-screen buttons show a spinner. - The stacked Notes panel gets a drag handle. - Every skill prompt and the console contracts say to reply in US English. - The desktop app offers Update to latest when the skills are newer, and plan2code update refetches an app that install.json does not record. - Devin Balanced maps to Sonnet 5.5 Medium.
This commit is contained in:
1 parent
9629961f36
commit
658c813428
70 files changed
+818
-242
No files matched your search
@@ -51,3 +51,44 @@ test("the one-column layout (900px and narrower) keeps its page scroll", async (
|
||||
const narrow = await s.page.evaluate(() => getComputedStyle(document.documentElement).overflowY);
|
||||
assert.equal(narrow, "visible", "its content sits under the first screen, so the lock must not apply");
|
||||
});
|
||||
|
||||
test("a stacked Notes panel has a handle that drags its height, keeps it and resets on double-click", async (t) => {
|
||||
const s = await openSession(await suite.browser(), { t, workflow: "plan", payload: PLAN_QUESTION });
|
||||
await s.page.setViewportSize({ width: 1000, height: 700 });
|
||||
await s.page.locator("#main [data-item=\"q1\"]").first().waitFor();
|
||||
const grip = s.page.locator("#aside .aside-grip");
|
||||
await grip.waitFor();
|
||||
const asideHeight = async () => Math.round((await s.page.locator("#aside").boundingBox()).height);
|
||||
const auto = await asideHeight();
|
||||
|
||||
const drag = async (dy) => {
|
||||
const box = await grip.boundingBox();
|
||||
const x = box.x + box.width / 2;
|
||||
const y = box.y + box.height / 2;
|
||||
await s.page.mouse.move(x, y);
|
||||
await s.page.mouse.down();
|
||||
await s.page.mouse.move(x, y + dy / 2, { steps: 4 });
|
||||
await s.page.mouse.move(x, y + dy, { steps: 4 });
|
||||
await s.page.mouse.up();
|
||||
};
|
||||
|
||||
await drag(-120);
|
||||
const taller = await asideHeight();
|
||||
assert.ok(taller >= auto + 100, `dragging the handle up makes the panel taller (${auto} -> ${taller})`);
|
||||
await s.page.waitForFunction((h) => Number(document.querySelector("#aside .aside-grip").getAttribute("aria-valuenow")) === h, taller);
|
||||
await drag(60);
|
||||
const shorter = await asideHeight();
|
||||
assert.ok(shorter <= taller - 40 && shorter >= 96, `dragging it down makes the panel shorter (${taller} -> ${shorter})`);
|
||||
|
||||
// Kept with the saved looks, so the next session opens at this height.
|
||||
const saved = async () => s.page.evaluate(async () => (await (await fetch("/looks")).json()).looks?.asideHeight);
|
||||
await s.page.waitForFunction(async (h) => (await (await fetch("/looks")).json()).looks?.asideHeight === h, shorter);
|
||||
assert.equal(await saved(), shorter, "the height is kept in the saved looks");
|
||||
|
||||
await grip.dblclick();
|
||||
assert.equal(await asideHeight(), auto, "a double-click goes back to the automatic height");
|
||||
assert.equal(await s.page.evaluate(() => document.documentElement.hasAttribute("data-aside-h")), false);
|
||||
|
||||
await s.page.setViewportSize({ width: 1400, height: 700 });
|
||||
assert.equal(await grip.isVisible(), false, "side by side, the panel has no handle");
|
||||
});
|
||||
Reference in new issue
Block a user