Skip to content

fix(web): stabilize voice input focus restore and agent workspace test - #45169

Merged
lyzno1 merged 1 commit into
mainfrom
yyh/fix-voice-input-focus-flaky-test
Oct 30, 2026
Merged

lyzno1 merged 1 commit into
mainfrom
yyh/fix-voice-input-focus-flaky-test

Conversation

@lyzno1

@lyzno1 lyzno1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member
  • ChatInputArea owns returning focus when the voice input closes: a layout effect runs after the close commits and focuses the trigger (or the textarea with the caret at the end after a transcription) only when focus was lost to body. This replaces the activeElement snapshot plus two competing queueMicrotask callbacks that made should preserve the current query and report transcription failure flaky in CI.
  • The keeps restart disabled when the existing debug conversation has no messages agent-v2 test waits for the build composer with the same 5s timeout its sibling history tests use.

@lyzno1
lyzno1 requested review from iamjoel and zxhlyh as code owners October 30, 2026 15:04
@github-actions github-actions Bot added size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Oct 30, 2026
@lyzno1
lyzno1 enabled auto-merge October 30, 2026 15:06
Return focus to the voice input trigger from a layout effect after the recorder unmounts instead of snapshotting activeElement and deciding in a microtask, and give the empty debug conversation test the same wait as its siblings.
@lyzno1
lyzno1 force-pushed the yyh/fix-voice-input-focus-flaky-test branch from 1ebbfa8 to e62c587 Compare October 30, 2026 15:07
@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.82%. Comparing base (34c9438) to head (e62c587).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #45169      +/-   ##
==========================================
- Coverage   89.82%   89.82%   -0.01%     
==========================================
  Files        6244     6244              
  Lines      397256   397363     +107     
  Branches    80000    80156     +156     
==========================================
+ Hits       356849   356943      +94     
- Misses      34111    34124      +13     
  Partials     6296     6296              
Flag Coverage Δ
dify-ui 92.64% <ø> (ø)
web 89.82% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 30, 2026
@lyzno1
lyzno1 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit be31456 Oct 30, 2026
56 checks passed
@lyzno1
lyzno1 deleted the yyh/fix-voice-input-focus-flaky-test branch October 30, 2026 15:20
@laipz8200 laipz8200 mentioned this pull request Nov 3, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants