Repository navigation
fix(ask-user): restore the wait countdown and tighten the question card layout - #3448
Merged
Merged
Conversation
The question header only rendered the countdown while a host deadline was present and untouched, so two ordinary states left the slot completely empty: a host that reports no deadline (question timeout disabled) and any card that had already acknowledged an interaction. Move the wait timing into the design-system AskUser contract so the header always states the current wait rule: the dismissible host countdown with its xmark control while a deadline runs, and a settled "No time limit" label when no deadline governs the answer. An acknowledged interaction still clears the slot, matching the countdown's own dismissal rule. Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
Long option descriptions were right-aligned into a capped column, which left a wide hole between each label and its description and a ragged right edge in the FlowChat card. Stack the label above its description instead, left aligned, and trim the option row's vertical padding to the content. Also stop the details grid from reserving space past its content. A 1fr row in an auto-height grid inflated the expanded card by roughly 76px, so the last option sat well above the footer. Only the collapsing summary now transitions its row and carries the shrinking min-size, which keeps the collapse animation while the expanded card measures its content. Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
states. The header only rendered the countdown when the host reported a finite
deadline that had not been acknowledged yet, so a card with the question timeout
disabled (host reports
responseDeadlineMs: null) or an already-acknowledgedcard showed an empty right slot with no countdown and no
xmark.AskUserdesign-system contract (waitTiming).While a host deadline runs the header shows the
m:sscountdown plus itsdismiss control; when no deadline governs the answer it shows a settled
No time limitlabel. An acknowledged interaction still clears the slot, whichkeeps the existing "click the countdown or its xmark to settle the wait" behavior.
sat right-aligned in a capped column, which left a wide hole between the label
and its description and a ragged right edge. Labels now sit above a left-aligned
description, and the row's vertical padding follows the content.
1frgrid row inan auto-height grid inflated the expanded card by ~76px past its content. Only
the collapsing summary transitions its row and carries the shrinking min-size
now, so the collapse animation stays and the expanded card measures its content.
Validation
design-system/packages/ui:vite build+vite build --config vite.mobile.config.ts+tsc -p tsconfig.build.json— passednode --test design-system/packages/ui/tests/*.test.mjs— passed (343 tests, includes the newwaitTimingcontract test)node --test design-system/apps/design-lab/vite/component-detail-contract.test.mjs— passed (34 tests)src/web-ui:npx vitest run src/flow_chat/tool-cards/AskUserQuestionCard.test.tsx— passed (41 tests, adds unbounded-wait and acknowledged-wait assertions)packages/flow-chat-presentation:tsc -p tsconfig.json --noEmit— passedtsc -p src/web-ui/tsconfig.json --noEmit— passednode scripts/i18n-audit.mjs— passed with 0 warningsnode scripts/audit-frontend-colors.mjs— passed (all 26 surfaces)node scripts/validate-theme-visual-contract.mjs— passednode scripts/verify-webkit-compatibility.cjs— passedmeasured the card: the header shows
2:31 ✕andNo time limit, options stackwith no dead space, and the completed card is 76px shorter than before.
Pre-existing failures in this checkout, reproduced identically with both commits
reverted, so they are not regressions from this PR:
src/web-ui: fullvitest runreports 248 failing tests across 23 files withand without this change (environmental, e.g.
localStorageunavailable here).packages/flow-chat-presentation:tests/catalog.test.tsxfails on existingtool-catalog drift (
AgentDelete/Task/AgentControl) with and without thischange.
Remote scenarios
comes from the host-projected deadline in the tool event payload.
canSubmitUserQuestionsOnSurface; a peer withoutuserQuestionInteractionrenders no countdown (and no settled label) instead of offering a control it
cannot use.
not this card. Not exercised end to end in this PR.
Risks
waitTimingis a new optionalAskUserprop;headerTrailingis unchanged forother consumers. The removed
control.askUser.descriptionMaxWidthentry was onlya component token claim — the token itself is still pinned by the design-tokens
contract test.
the host cancels the timeout at that point. With the question timeout disabled the
card now says
No time limitinstead of rendering nothing.Generated with OpenBitFun