Skip to content

fix(ui): reduce UI flicker — throttle 60→100ms + startTransition + batch STREAM_TEXT - #6203

Closed
aspnmy wants to merge 2 commits into
QwenLM:mainfrom
aspnmy:fix/ui-flicker-throttle-tests
Closed

fix(ui): reduce UI flicker — throttle 60→100ms + startTransition + batch STREAM_TEXT#6203
aspnmy wants to merge 2 commits into
QwenLM:mainfrom
aspnmy:fix/ui-flicker-throttle-tests

Conversation

@aspnmy

@aspnmy aspnmy commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What

Three changes to reduce UI flicker, each with tests:

B1 — throttle 60→100ms

  • useGeminiStream.ts: STREAM_UPDATE_THROTTLE_MS 60 → 100
  • useGeminiStream.test.tsx: 7 test timers updated (60→100ms)

A2 — compactMode toggle via startTransition

  • App.tsx: wrap setCompactMode in startTransition

C1 — batch STREAM_TEXT per chunk

  • agent-core.ts: accumulate text parts, emit once per chunk

Why

Files

4 files changed, 40 insertions(+), 19 deletions(-)

@aspnmy aspnmy changed the title fix(ui): reduce UI flicker — throttle 60→100ms + startTransition compact toggle + batch STREAM_TEXT fix(ui): reduce UI flicker — throttle 60→100ms + startTransition + batch STREAM_TEXT Jul 2, 2026

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @aspnmy, thanks for the PR!

The code changes look focused and the direction is solid — UI flicker is a well-known pain point, and the three changes (throttle bump, startTransition, batched emits) are all reasonable approaches.

However, the PR body is missing several required sections from the PR template:

  • Reviewer Test Plan — How to verify, Before/After evidence, and Tested-on OS. This is especially important for UI flicker fixes since reviewers need to know what to look for and on which platforms the fix was validated.
  • Risk & Scope — Main risk or tradeoff, what's out of scope, any breaking changes.
  • Linked Issues — Please use Closes #N / Fixes #N in a dedicated section so issues auto-close on merge.
  • 中文说明 — The template includes a collapsible Chinese translation section.

Could you update the PR description to fill in these sections? Once that's done, the review can proceed.

中文说明

你好 @aspnmy,感谢你的 PR!

代码改动很聚焦,方向也是对的——UI 闪烁是一个已知的痛点,三个改动(节流值调整、startTransition、批量发送)都是合理的方案。

但 PR 描述缺少 PR 模板 中的几个必填部分:

  • Reviewer Test Plan — 验证方式、修复前后对比、测试过的操作系统。对于 UI 闪烁修复尤其重要,审查者需要知道该观察什么、在哪些平台上验证过。
  • Risk & Scope — 主要风险或权衡、不在范围内的内容、是否有破坏性变更。
  • Linked Issues — 请在专门的部分使用 Closes #N / Fixes #N,以便合并时自动关闭 issue。
  • 中文说明 — 模板包含一个可折叠的中文翻译部分。

请补充这些部分,之后可以继续审查流程。

Qwen Code · qwen3.7-max

@aspnmy aspnmy closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants