Skip to content

fix(ask-user): restore the wait countdown and tighten the question card layout - #3448

Merged
bobleer merged 3 commits into
GCWing:mainfrom
bobleer:openbitfun/ask-user-wait-timing
Oct 18, 2026
Merged

bobleer merged 3 commits into
GCWing:mainfrom
bobleer:openbitfun/ask-user-wait-timing

Conversation

@bobleer

@bobleer bobleer commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The AskUserQuestion card lost its whole wait-timing affordance in two ordinary
    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-acknowledged
    card showed an empty right slot with no countdown and no xmark.
  • Wait timing now belongs to the AskUser design-system contract (waitTiming).
    While a host deadline runs the header shows the m:ss countdown plus its
    dismiss control; when no deadline governs the answer it shows a settled
    No time limit label. An acknowledged interaction still clears the slot, which
    keeps the existing "click the countdown or its xmark to settle the wait" behavior.
  • Option copy in the FlowChat card is stacked instead of split: the description
    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.
  • Fixed the dead space between the last option and the footer. A 1fr grid row in
    an 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 — passed
  • node --test design-system/packages/ui/tests/*.test.mjs — passed (343 tests, includes the new waitTiming contract 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 — passed
  • tsc -p src/web-ui/tsconfig.json --noEmit — passed
  • node scripts/i18n-audit.mjs — passed with 0 warnings
  • node scripts/audit-frontend-colors.mjs — passed (all 26 surfaces)
  • node scripts/validate-theme-visual-contract.mjs — passed
  • node scripts/verify-webkit-compatibility.cjs — passed
  • Rendered the built component with the token/theme/component CSS in a browser and
    measured the card: the header shows 2:31 ✕ and No time limit, options stack
    with 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: full vitest run reports 248 failing tests across 23 files with
    and without this change (environmental, e.g. localStorage unavailable here).
  • packages/flow-chat-presentation: tests/catalog.test.tsx fails on existing
    tool-catalog drift (AgentDelete/Task/AgentControl) with and without this
    change.

Remote scenarios

  • Remote workspace: no change; the card is a Web UI concern and the timing still
    comes from the host-projected deadline in the tool event payload.
  • Peer Device Mode: the timing slot still respects
    canSubmitUserQuestionsOnSurface; a peer without userQuestionInteraction
    renders no countdown (and no settled label) instead of offering a control it
    cannot use.
  • Remote control / Detached Dispatch: unchanged; both render their own surfaces,
    not this card. Not exercised end to end in this PR.

Risks

  • waitTiming is a new optional AskUser prop; headerTrailing is unchanged for
    other consumers. The removed control.askUser.descriptionMaxWidth entry was only
    a component token claim — the token itself is still pinned by the design-tokens
    contract test.
  • The countdown still disappears once an interaction is acknowledged, by design:
    the host cancels the timeout at that point. With the question timeout disabled the
    card now says No time limit instead of rendering nothing.
  • Mobile surfaces render their own question card and are unaffected.

Generated with OpenBitFun

bobleer and others added 3 commits October 18, 2026 18:10
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>
@bobleer
bobleer merged commit 18a7258 into GCWing:main Oct 18, 2026
9 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.

1 participant