feat(ui): onboarding suggestion chips with one-tap submit, keyboard access, and mobile scroll row

This commit is contained in:
2026-08-21 18:18:47 -04:00
parent cbf8e39e63
commit 2364e1ee7d
7 changed files with 350 additions and 51 deletions
+6 -9
View File
@@ -137,17 +137,14 @@ def test_deflection_suggestions_are_clickable(
chip_text = chips.first.inner_text().strip()
assert chip_text
# Phase 04 chip contract (wire what exists): click fills + focuses.
# Shared chip component (phase 05): one tap submits — the click fills,
# focuses AND sends. The chip's topic is one Brain really covers, so
# this follow-up turn is a grounded (non-deflected) answer quoting the
# question, and the composer is left empty (submitted, not queued).
chips.first.click()
expect(page.locator("#message-input")).to_have_value(chip_text)
expect(page.locator("#message-input")).to_be_focused()
# Completing the question asks it: a new user bubble + a reply —
# and the chip's topic is one Brain really covers, so this turn is
# a grounded (non-deflected) answer quoting the question.
page.press("#message-input", "Enter")
expect(page.locator("#message-input")).to_have_value("")
expect(page.locator(".msg.user .bubble")).to_have_count(2, timeout=30_000)
expect(page.locator(".msg.user .bubble").nth(1)).to_contain_text(chip_text)
expect(page.locator(".msg.user .bubble").nth(1)).to_have_text(chip_text)
expect(page.locator(".msg.brain .bubble")).to_have_count(2, timeout=30_000)
second = page.locator(".msg.brain .bubble").nth(1)
expect(second).to_contain_text(chip_text, timeout=30_000)