Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "thinkwatch-lite",
"private": true,
"description": "Desktop app for a local AI API gateway on macOS, Windows and Linux",
"version": "2026.11.25",
"version": "2026.12.2",
"type": "module",
"packageManager": "pnpm@11.13.1",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions release-notes/2026.12.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Drag any upstream row to reorder the list. Keep dragging below the last row to move it to the end, or hold near a window edge to scroll a longer list. Lite remembers the display order for each connection.
- Add JSON fields to a provider's outgoing generation requests under **Connection → Advanced settings → Extra request body**. To preserve a client-provided prompt cache key across protocol conversion, enable **Reuse the client's prompt cache key**.
- Bundles ThinkWatch Core 0.101.0, including a control-channel security update.
41 changes: 41 additions & 0 deletions scripts/ui/upstreams.pw.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { expect, test } from "@playwright/test";
import type {} from "../shots/drive";

test("an upstream row can be dropped below the table and the order survives reload", async ({ page }) => {
await page.goto("/scripts/shots/index.html?scene=upstreams&lang=zh");
await page.waitForFunction(() => window.__shot?.state === "ready");
const rows = page.locator("tr[data-reorder-scope]");
const names = () => rows.evaluateAll((list) => list.map((row) => row.getAttribute("data-row")));
await expect.poll(() => rows.count()).toBeGreaterThan(1);
const initial = await names();
const checkbox = rows.first().getByRole("checkbox");
await checkbox.click();
await expect(checkbox).toBeChecked();

const cell = rows.first().locator("td").nth(1);
await cell.click();
const editor = page.getByRole("dialog", { name: "编辑上游" });
await expect(editor).toBeVisible();
await page.keyboard.press("Escape");
await expect(editor).toBeHidden();

const from = (await cell.boundingBox())!;
const x = from.x + from.width / 2;
const y = from.y + from.height / 2;
const bottom = page.viewportSize()!.height - 4;
await page.mouse.move(x, y);
await page.mouse.down();
await page.mouse.move(x, bottom, { steps: 12 });
const preview = page.locator(".row-reorder-overlay");
await expect(preview).toBeVisible();
await expect(rows.last()).toHaveClass(/shadow-\[inset_0_-2px/);
await page.mouse.up();

const reordered = [...initial.slice(1), initial[0]];
await expect.poll(names).toEqual(reordered);
await expect(editor).toBeHidden();
await expect(preview).toHaveCount(0);
await page.reload();
await page.waitForFunction(() => window.__shot?.state === "ready");
await expect.poll(names).toEqual(reordered);
});
Loading
Loading