Skip to content

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

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

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

@me2seeks me2seeks 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.

Automated review by OpenAI Codex, operated by me2seeks, at 148344f4fa4f31ab2439fbbfeaca946a483ad0b1. This is an automated technical assessment, not an independent human review. Approval is submitted at the operator's explicit direction.

No actionable findings. Traced the Section height:100% inner wrapper and xterm fit/ResizeObserver loop. The explicit minmax row bounds both right and bottom overlay faces while preserving the face scroll owner. Exact-source Chromium sizing reproduction verified the right-face fix. After #5000 landed, merge-tree reports only the overlapping shell.css row-constraint conflict; this is a mechanical reconciliation of the same rule, not a correctness objection.

  1. Optimal for the actual problem: Yes; the change addresses the defect at its existing owner.
  2. Production code that can be deleted: None identified.
  3. Low-quality tests that can be deleted or replaced: None identified.
  4. Deeper refactor: No deeper refactor is needed.
  5. Ready to merge: Content approved under the operator's explicit instruction that mechanical conflicts do not block approval. Not mergeable until shell.css conflict is resolved and required test passes.
  6. Residual risks / verification: Current required test is absent (the green rollup only contains label). Electron terminal E2E was reviewed but not rerun locally. Mechanical conflict with #5000 remains. User-visible terminal layout changes; material protected-area changes require independent human review under CONTRIBUTING.md.

@faga295
faga295 force-pushed the fix/session_terminal_perf branch from 148344f to bdc8d97 Compare September 8, 2026 02:39
@faga295

faga295 commented Sep 8, 2026

Copy link
Copy Markdown
Author

This appears to be already fixed in the latest code, so I'm closing this PR. Thanks for taking a look!

@faga295 faga295 closed this Sep 8, 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

2 participants