Skip to content

STU-1874: Improve Ask User option rendering - #3905

Merged
shaunandrews merged 12 commits into
trunkfrom
stu-1874-improve-ask-user-options
Jun 29, 2026
Merged

STU-1874: Improve Ask User option rendering#3905
shaunandrews merged 12 commits into
trunkfrom
stu-1874-improve-ask-user-options

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
image image image image

Related issues

How AI was used in this PR

Codex implemented the scoped Ask User rendering changes, added tests for historical answer handling, and ran the verification commands below. I reviewed the diff and adjusted the live answer cache update to avoid touching older duplicate questions.

Proposed Changes

  • Makes Ask User choices read as an ordered list with visible option descriptions, so users can compare the available choices without relying on hidden title text.
  • Adds a batched-question flow that shows one active question at a time, keeps answered questions as compact summaries, and lets users revisit earlier answers while the batch is still pending.
  • Keeps selected Ask User answers visible after submission and when reviewing historical sessions, including multi-question batches whose answers are stored as ask_user prompts.
  • Improves the batched-question handoff with selected-answer acknowledgement, reduced layout bounce, and scroll clearance so the next question and options stay comfortably above the composer.
  • Preserves accessible button semantics with aria-pressed for selected choices and description text connected via aria-describedby.

Testing Instructions

  • npx eslint --fix apps/ui/src/data/queries/use-agent-run.tsx apps/ui/src/ui-classic/components/session-view/conversation/index.tsx apps/ui/src/ui-classic/components/session-view/conversation/index.test.ts tools/common/ai/sessions/entry-types.ts apps/ui/src/ui-classic/components/session-view/conversation/style.module.css
    • CSS module reports the expected "File ignored because no matching configuration was supplied" warning.
  • npm run typecheck
  • npm test -- tools/common/ai/tests/tools.test.ts apps/cli/ai/tests/ui.test.ts apps/ui/src/ui-desks/chats/conversation/index.test.ts apps/ui/src/ui-classic/components/session-view/conversation/index.test.ts
  • Verified the Ask User option list in both light and dark themes with a temporary Vite harness and Playwright screenshots.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
Base automatically changed from stu-1873-add-tool-detail-panel to trunk June 24, 2026 12:57
@shaunandrews
shaunandrews marked this pull request as ready for review June 24, 2026 14:18
@wpmobilebot

wpmobilebot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 151228c vs trunk

app-size

Metric trunk 151228c Diff Change
App Size (Mac) 1315.59 MB 1315.61 MB +0.01 MB ⚪ 0.0%

site-editor

Metric trunk 151228c Diff Change
load 1047 ms 1063 ms +16 ms ⚪ 0.0%

site-startup

Metric trunk 151228c Diff Change
siteCreation 6493 ms 6578 ms +85 ms 🔴 1.3%
siteStartup 6488 ms 6576 ms +88 ms 🔴 1.4%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@shaunandrews
shaunandrews requested review from a team and bcotrim June 24, 2026 14:53
Comment thread apps/ui/src/ui-classic/components/session-view/conversation/index.tsx Outdated
Comment thread apps/ui/src/ui-classic/components/session-view/conversation/style.module.css Outdated
Comment thread apps/ui/src/ui-classic/components/session-view/conversation/style.module.css Outdated

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed end-to-end, dark and light mode, closed and re-opened the app. Everything works as described.
Just a few non-blocking nits inline. Nice work on this! 🚀

Light Dark
image image
Comment thread apps/ui/src/ui-classic/components/session-view/conversation/style.module.css Outdated
Comment thread apps/ui/src/ui-classic/components/session-view/conversation/style.module.css Outdated
Comment thread apps/ui/src/ui-classic/components/session-view/conversation/index.tsx Outdated
@shaunandrews

shaunandrews commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review, folks. I've fixed everything here. I also added some more work around batch questions. Appreciate another review. Thanks!

@shaunandrews
shaunandrews merged commit d42540c into trunk Jun 29, 2026
11 checks passed
@shaunandrews
shaunandrews deleted the stu-1874-improve-ask-user-options branch June 29, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants