merge console noise cleanup into rectification title result
Independent Staging Quality Gate / publish (push) Canceled after 0s
Independent Staging Quality Gate / validate (push) Canceled after 7m13s

Keep both changelog notes and BUG-906, BUG-907, and BUG-1001.
This commit is contained in:
jesse-ux
2026-09-25 02:07:00 +08:00
11 changed files with 117 additions and 7 deletions
+9
View File
@@ -330,6 +330,15 @@ test("chart skeleton has one scoped breath rule and reduced motion is static", (
assert.match(globalStyles, /@media \(prefers-reduced-motion: reduce\)\s*\{\s*\.chart-page-skeleton \{ animation: none; opacity: 0\.5; \}/);
});
test("chart svgs omit the invalid height attribute and western height stays in css", () => {
const westernSvg = readFileSync(new URL("../src/components/chart-page/western-wheel-svg.tsx", import.meta.url), "utf8");
assert.doesNotMatch(vedicSvg, /height="auto"/);
assert.doesNotMatch(westernSvg, /height="auto"/);
assert.match(westernSvg, /width="100%"/);
assert.match(vedicSvg, /width="100%"/);
assert.match(globalStyles, /\.chart-page-western-svg \{[^}]*height: auto/);
});
test("the (app) layout mounts one sidebar for home and the four secondary routes", () => {
// 原值:`(secondary)/layout.tsx` 挂只读侧栏,`useSidebarData` 另拉一份列表
// 新值:`(app)/layout.tsx` 一份 SessionListProvider + SidebarProvider,首页也在里面
@@ -152,3 +152,26 @@ test("status expires stale reservations after fifteen minutes but leaves fresh r
assert.match(leaseBlock, /\.eq\("session_id", statusData\.session_id\)[\s\S]*\.eq\("request_id", statusData\.request_id\)/);
assert.doesNotMatch(statusRoute.slice(0, statusRoute.indexOf('if (statusData.status === "reserved"')), /cancel_consultation_credit/);
});
test("an empty active consultation lookup is 204 and a missing bound request stays 404", () => {
const activeEmpty = statusRoute.slice(
statusRoute.lastIndexOf("if (activeLookup)"),
statusRoute.indexOf("咨询请求不存在"),
);
assert.match(activeEmpty, /!data \|\| typeof data\.session_id !== "string"/);
assert.match(activeEmpty, /new NextResponse\(null, \{ status: 204 \}\)/);
assert.doesNotMatch(activeEmpty, /咨询请求不存在|status: 404/);
assert.match(statusRoute, /return NextResponse\.json\(\{ error: "咨询请求不存在" \}, \{ status: 404 \}\)/);
const cloud = read("src/lib/home-cloud-sync.ts");
const activeFn = cloud.slice(
cloud.indexOf("export async function fetchActiveConsultationStatus"),
cloud.indexOf("export async function patchSessionModel"),
);
const boundFn = cloud.slice(
cloud.indexOf("export async function fetchConsultationStatus"),
cloud.indexOf("export async function fetchActiveConsultationStatus"),
);
const statusGuard = activeFn.indexOf("if (response.status === 204 || response.status === 404) return null;");
assert.ok(statusGuard >= 0 && statusGuard < activeFn.indexOf("response.json()"));
assert.doesNotMatch(boundFn, /status === 204/);
});