Skip to content

fix(ui): prevent tool status blank frame#34547

Merged
Hona merged 1 commit into
devfrom
tool-status-frame
Jun 30, 2026
Merged

fix(ui): prevent tool status blank frame#34547
Hona merged 1 commit into
devfrom
tool-status-frame

Conversation

@Hona

@Hona Hona commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

  • keep the perf optimization that only mounts both tool status labels during animation
  • flip data-active synchronously, then defer the target-width measurement to the next frame so the incoming label is mounted/measurable
  • preserve the measured-width transition for the Exploring → Explored status title without the blank/drop frame

Chrome trace benchmark

Setup:

  • 1000 timeline status rows on one page
  • Chrome trace via CDP
  • 4x CPU slowdown
  • 5 traced runs per variant
  • same isolated real-component harness/CSS/theme across variants
Variant Visual Runs Main avg Main median Max task avg Max task range Long tasks avg Script avg Style/Layout avg Paint/Composite avg
Current dev ❌ blank/drop frame 5 82488ms 81526ms 2695ms 2327.9–2838.0ms 198.0 1380ms 5447ms 34522ms
Old correct, pre-perf revert ✅ correct 5 77271ms 74614ms 8700ms 7820.4–9301.9ms 174.8 5125ms 5087ms 28365ms
Fixed PR ✅ correct 5 47638ms 30071ms 8029ms 7913.3–8194.8ms 59.6 6194ms 4227ms 16426ms

Readout:

  • Fixed PR restores the visual transition without returning to the old always-mounted behavior.
  • Versus old visual-correct behavior: lower main-thread trace time, fewer long tasks, slightly lower max task, lower style/layout, and lower paint/composite.
  • Versus current broken dev: fixed has a higher max task because it performs the real target-width measurement/animation work, but lower total main-thread time and fewer long tasks while preserving correctness.

Validation

  • bun typecheck from packages/session-ui
  • push hook full turbo typecheck passed
  • recorded isolated real-component harness video for Exploring → Explored after the fix

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 30, 2026 02:24

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Hona
Hona merged commit 2fe68b5 into dev Jun 30, 2026
24 checks passed
@Hona
Hona deleted the tool-status-frame branch June 30, 2026 02:26
zz99mz-212 pushed a commit to zz99mz-212/opencode-New-Horizons that referenced this pull request Jul 16, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
avion23 pushed a commit to avion23/opencode that referenced this pull request Jul 20, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
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.

2 participants