anomalyco / anomalyco/opencode

[Desktop] Session panel width animation costs ~0.24s of main-thread work per toggle

Open
#48,701 0 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Sep 12, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Opening/closing the review panel, terminal or file tree animates the width of the chat panel and the side panel over 240ms (packages/app/src/pages/session.tsx and packages/app/src/pages/session/session-side-panel.tsx).

Measured in a real desktop instance (1.18.29, via CDP), per panel toggle:

  • layout: ~64ms
  • script: ~16ms
  • total main-thread task time: ~239ms

I also tried contain: layout paint and contain: layout on the panel: no measurable gain (the cost is inside the panel — content reflow plus the virtualized timeline re-measuring rows each frame).

Shortening the animation to 160ms cuts the work by ~25% (task 239ms → 181ms, layout 64ms → 45ms) while keeping the slide. A no-animation control comes in at ~32ms, but that changes the feel, so it is not proposed.

Plugins

none

OpenCode version

OpenCode Desktop 1.18.29

Steps to reproduce
  1. Open a session with content
  2. Toggle the review panel (or terminal/file tree)
  3. Profile with DevTools Performance: layout runs every frame during the 240ms animation
Screenshot and/or share link

No screenshot — no visual difference at rest.

Operating System

CachyOS (Arch Linux), KDE Plasma 6.7.5, Wayland

Terminal

n/a (desktop app)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.