fix(chat): follow active response at bottom
Staging Backend Quality Gate / validate (push) Successful in 11m13s
Staging Backend Quality Gate / publish (push) Has been cancelled

This commit is contained in:
Jesse_Chen
2026-08-09 01:19:39 +08:00
parent 17430a1f21
commit 34395e902c
6 changed files with 33 additions and 14 deletions
@@ -270,6 +270,12 @@ test("starter cards use transient pressed feedback instead of sticky hover shadi
assert.equal(starterHoverSurfaceRules.length, 0);
assert.match(styles, /\.product-entrypoint-card:has\(\.product-entrypoint-hitarea:not\(:disabled\):active\)\s*\{[^}]*background\s*:/);
assert.match(styles, /\.starter-theme-card:not\(:disabled\):active\s*\{[^}]*background\s*:/);
const disabledProductRules = [...styles.matchAll(
/\.product-entrypoint-card:has\(\.product-entrypoint-hitarea:disabled\)\s*\{([^}]*)\}/g,
)];
assert.equal(disabledProductRules.length, 2);
for (const rule of disabledProductRules) assert.match(rule[1], /opacity:\s*1\s*;/);
});
test("starter homepage stays editorial and hides technical chart parameters", () => {
@@ -156,6 +156,15 @@ test("Agentic rectification uses one case-level entitlement and the session-pinn
assert.doesNotMatch(route, /loadLanguageModelCatalog|resolveLanguageModelFromCatalog|\bresolveLanguageModel\(|\bdefaultLanguageModel\(/);
});
test("Agentic rectification scrolls the conversation container as streamed messages grow", () => {
assert.match(chat, /const conversation = useRef<HTMLElement>\(null\)/);
assert.match(chat, /<section ref=\{conversation\} className="conversation"/);
assert.match(chat, /const container = conversation\.current/);
assert.match(chat, /top: container\.scrollHeight/);
assert.match(chat, /\}, \[busy, error, messages, savedTime\]\);/);
assert.doesNotMatch(chat, /conversationEnd|scrollIntoView/);
});
test("candidate state streams before done and renders reusable multi-column choices", () => {
assert.match(route, /send\(\{ type: "candidates", result: candidateResult \}\)[\s\S]*send\(\{ type: "done", emitted: true \}\)/);
assert.match(chat, /fetch\(`\/api\/rectification\/agent\?sessionId=/);
+4 -1
View File
@@ -165,7 +165,10 @@ test("keeps the empty starter home at the top instead of auto-scrolling", () =>
);
assert.match(autoScrollEffect, /if \(starterHomeVisible\) return/);
assert.match(autoScrollEffect, /conversationEnd\.current\?\.scrollIntoView/);
assert.match(autoScrollEffect, /const container = conversation\.current/);
assert.match(autoScrollEffect, /container\.scrollTo\(\{ top: container\.scrollHeight/);
assert.match(pageSource, /ref=\{conversation\} className=\{`conversation/);
assert.doesNotMatch(pageSource, /conversationEnd|scrollIntoView/);
});
test("does not submit the composer while an IME composition is active", () => {