fix(web): summarize session titles, sort by activity, and paginate history (BUG-553)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import test from "node:test";
|
||||
import { chatSessionCreateSchema, chatSessionMetadataPatchSchema, chatSessionWriteSchema, writeChatSession, type ChatSessionWrite } from "../src/lib/chat-session-write-contract.ts";
|
||||
import { metadataUpdateValues } from "../src/lib/session-metadata-update.ts";
|
||||
import { homeSurface } from "./home-surface.ts";
|
||||
|
||||
const sessionId = "11111111-1111-4111-8111-111111111111";
|
||||
@@ -230,3 +231,11 @@ test("self-hosted staging bootstrap reads profile and sessions through same-orig
|
||||
assert.match(accountRoute, /profile,/);
|
||||
assert.doesNotMatch(accountRoute, /rectificationCase/);
|
||||
});
|
||||
|
||||
test("metadata PATCH no longer writes updated_at", () => {
|
||||
const values = metadataUpdateValues({ title: "半年内换工作时机" });
|
||||
assert.ok(values);
|
||||
assert.equal("updated_at" in values, false);
|
||||
const itemRoute = readFileSync(new URL("../src/app/api/sessions/[id]/route.ts", import.meta.url), "utf8");
|
||||
assert.doesNotMatch(itemRoute, /updated_at: new Date\(\)\.toISOString\(\)/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user