Skip to content

fix(desktop): bound the workbar panel grid row to stop terminal fit/resize loop - #4967

Open
faga295 wants to merge 1 commit into
apache:mainfrom
faga295:fix/session_terminal_perf
Open

fix(desktop): bound the workbar panel grid row to stop terminal fit/resize loop#4967
faga295 wants to merge 1 commit into
apache:mainfrom
faga295:fix/session_terminal_perf

Conversation

@faga295

@faga295 faga295 commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Fixes #4966
Root cause — a layout feedback loop:

  • .maka-session-workbar-panel[data-overlay][data-placement="right"] is display: grid but declared no explicit row track, so content fell into an implicit auto row;
  • an auto row's size includes its contents' min-content contribution, so the Section inner wrapper (height: 100%) and the terminal panel (height: 100%) grew with xterm's output;
  • that fired ResizeObserver → xterm fit() → layout changed → observer fired again: a ResizeObserver → fit → resize → grow loop on every burst of output.

The fix declares an explicit track, grid-template-rows: minmax(0, 1fr): the 1fr sizes the track purely from the container's definite height so content no longer participates in track sizing, and min 0 removes the auto row's min-content floor — cutting the loop at its root.

Testing

  • Added an e2e assertion (Terminal fits its panel without growing and stops when its Session changes): across 12 consecutive requestAnimationFrame ticks the xterm host stays within the panel bounds. Fails without the CSS change, passes with it.
  • Full session-workbar.spec.ts passes (6/6); verified the other overlay panels (review / browser / files / inspector / side-chat) have height: 100% roots and are unaffected, and the wide-window collapse animation's display: grid restore rule still applies.
  • npm run typecheck and check:e2e-budget pass.

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI becomes very laggy while a Session terminal panel is open

1 participant