Merge remote-tracking branch 'origin/staging' into codex/fix-rectification-focus-baseline
Independent Staging Quality Gate / validate (push) Failing after 12m10s
Independent Staging Quality Gate / publish (push) Has been skipped

# Conflicts:
#	docs/BUG_HISTORY.md
This commit is contained in:
Jesse_Chen
2026-08-15 17:51:29 +08:00
4 changed files with 61 additions and 44 deletions
@@ -5,6 +5,12 @@ import test from "node:test";
const css = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
test("mobile rectification welcome content starts at the scroll origin", () => {
assert.match(css, /@media \(max-width: 767px\)[\s\S]*?\.conversation\.is-empty\s*\{[^}]*display:\s*block/);
const centeredGrid = css.indexOf(".conversation.is-empty { display: grid");
const mobileOverride = css.indexOf(".conversation.is-empty {\n display: block", centeredGrid);
assert.ok(centeredGrid >= 0, "desktop empty state should remain centered");
assert.ok(mobileOverride > centeredGrid, "mobile display:block must be declared after the desktop grid rule");
assert.match(css, /\.conversation\s*\{[^}]*min-height:\s*0[^}]*overflow-y:\s*auto/);
assert.match(css.slice(mobileOverride), /\.conversation\.is-empty\s*\{[^}]*-webkit-overflow-scrolling:\s*touch/);
assert.match(css, /\.group\\\/sidebar-provider\[data-viewport\]\s*\{[^}]*height:\s*100vh;[^}]*height:\s*100dvh/);
});
@@ -0,0 +1,13 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const css = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
test("starter questions use readable responsive cards instead of a compressed flex row", () => {
assert.match(css, /\.starter-theme-accordion \{[^}]*display: grid;[^}]*grid-template-columns: repeat\(3, minmax\(0, 1fr\)\);/);
assert.match(css, /@media \(min-width: 768px\) and \(max-width: 900px\)[\s\S]*?\.starter-theme-accordion \{[^}]*grid-template-columns: repeat\(2, minmax\(0, 1fr\)\);/);
assert.match(css, /@media \(max-width: 767px\)[\s\S]*?\.starter-theme-accordion \{[^}]*grid-template-columns: 1fr;/);
assert.match(css, /\.starter-theme-card \{[^}]*min-height: 156px;[^}]*border: 1px solid var\(--color-border\);[^}]*border-radius: var\(--radius-lg\);/);
assert.doesNotMatch(css, /\.starter-theme-accordion \{[^}]*display: flex;/);
});