Skip to content

fix(agent): move quick chips into the conversation on short screens - #74

Merged
Twcat0503 merged 1 commit into
mainfrom
fix/chat-large-text-layout
Nov 19, 2026
Merged

Twcat0503 merged 1 commit into
mainfrom
fix/chat-large-text-layout

Conversation

@Twcat0503

Copy link
Copy Markdown
Owner

改了什麼、為什麼

At 200% text in English with a wide font such as DejaVu Sans (the font on the Linux CI runner), the quick chips above the input wrap into four two-line rows. Together with the chat header, the fixed regions then leave 28px of the 839px Pixel 7 screen to the conversation, so result links such as "Open template: Water bills" cannot be tapped wherever they scroll (WCAG 1.4.4, 1.4.10). #73 worked around this in the bill e2e by resetting the text size before navigating and listed the layout fix as a follow-up; this is that fix.

  • A new QuickChips component renders the chips twice, above the input and after the conversation, with the same visibility rules as before.
  • .assistant-shell is now a size container. When it is shorter than 36rem, the limit composerCompact already uses, @container assistant-shell (height < 36rem) hides the copy in the dock and shows the one after the conversation, which scrolls with the content. Unlike in media queries, rem in a container query follows the page's text size, so the in-app setting, browser zoom and the system text size all count.
  • The copy after the conversation comes after the busy watermark, whose text overflows its box at 200% and would otherwise cover the "More suggestions" chip.
  • The small-phone rule (360×650 and smaller) still hides both copies.

Conversation height between the header and the dock, Pixel 7 profile (412×839), bill results:

Text size Before After
200%, English, Verdana 28px 546px
200%, Chinese 217px 595px
150%, English 342px 627px
150%, Chinese 482px 627px
100%, 125% 415–570px unchanged

Phones held sideways (839×412) are under 36rem even at 100%, so they show the chips after the conversation too, leaving it 275px instead of about 216px. This is intended.

如何驗證

Run on df16f6f (macOS) before rebasing onto 4f533b4; the rebased 783817e has the same tree.

  • frontend/agent-mvp: pnpm lint, pnpm format:check and pnpm build pass; pnpm test 585 passed; pnpm test:e2e 73 passed
  • The bill e2e (app.e2e.ts:174) now forces Verdana, navigates at 200% instead of resetting the text size, and checks in both languages that the conversation keeps more than half of the screen, that the dock copy of the chips is hidden and that the copy after the conversation works. Against the previous layout it fails at the first check (0.26 of the screen in Chinese).
  • axe WCAG 2.1 AA scan of the conversation at 200% with the chips after it, in Chinese and English: no violations
  • Checked in Chromium with the Pixel 7 profile only; not on an Android device or emulator, and not with TalkBack

Checklist

  • 一個 PR 只做一件事,沒有夾帶無關變更
  • 已執行所屬棧的自檢指令並將結果貼於上方(Flutter:fvm flutter analyze/fvm flutter test;前端:pnpm lint/pnpm test)
  • Flutter 變更已於 Android 裝置/模擬器驗證 (no Flutter change)
  • 設計自檢通過(WCAG 2.1 AA、TalkBack、字級 200%、觸控目標 48dp、語言標示;見 CONTRIBUTING.md「設計規範」) (200% text and axe WCAG 2.1 AA checked; the chips keep min-height: 48px; not checked with TalkBack or on Android)
  • diff 中沒有 API key、token 等機密,也沒有個人環境檔或內部文件(見 CONTRIBUTING.md「個人開發環境與內部文件」)
  • 新增的相依套件為開源且與 AGPL-3.0 相容,並已於內文說明理由 (no new dependencies)

相關 issue(若有)

Follow-up to #73.

At 200% text in English with a wide font such as DejaVu Sans, the
quick chips above the input wrap into four two-line rows. Together
with the chat header, the fixed regions then leave 28px of the 839px
Pixel 7 screen to the conversation, so results such as "Open
template: Water bills" cannot be tapped wherever they scroll.

Render the chips both above the input and after the conversation
through a new QuickChips component, with the same visibility rules.
When the shell is shorter than 36rem, the limit composerCompact
already uses, a size container query shows the copy after the
conversation instead, so the chips scroll with the content. Unlike in
media queries, rem in a container query follows the page's text size,
so the in-app setting, browser zoom and system text size all count.

On Pixel 7 the conversation gets 546px at 200% in English with Verdana
(was 28px) and 595px in Chinese (was 217px). Portrait screens at 100%
and 125% are unchanged; a phone on its side is under 36rem even at
100%, so it shows the chips after the conversation too.

The bill e2e forces Verdana, navigates at 200% again instead of
resetting the text size, and checks in both languages that the
conversation keeps over half of the screen and that the chips after
it work. The accessibility checklist gains the rule.
Copilot AI balanced review requested due to automatic review settings November 19, 2026 01:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Twcat0503
Twcat0503 merged commit 2cac8e7 into main Nov 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants