Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Dec 25, 2025

@Tyriar Tyriar added this to the December / January 2026 milestone Dec 25, 2025
@Tyriar Tyriar self-assigned this Dec 25, 2025
Copilot AI review requested due to automatic review settings December 25, 2025 14:08
@Tyriar Tyriar marked this pull request as draft December 25, 2025 14:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes performance issues in the terminal tabs feature, specifically addressing slow typing in the terminal caused by getContainerWidthCachedForTask being called frequently during text rendering. The changes optimize layout calculations and eliminate forced reflows by moving width checks to the layout cycle and replacing dynamic CSS calculations with static values.

Key Changes:

  • Refactored terminal tabs width calculation from per-render to layout-based caching
  • Added debouncing (500ms) to shell integration status refresh to avoid impacting typing latency
  • Replaced dynamic CSS margin calculation with static value in terminal command guide

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
markNavigationAddon.ts Removes dynamic getComputedStyle() call for marginLeft calculation that was causing forced layout
terminalTooltip.ts Removes refreshShellIntegrationInfoStatus function (moved to terminalInstance.ts) and cleans up unused imports
terminalTabsList.ts Refactors width-based visibility checks to use layout-driven state (hasText, hasActionBar) instead of checking container width on every render
terminalInstance.ts Moves refreshShellIntegrationInfoStatus as a private debounced method to prevent it from impacting input latency during typing
terminal.css Adds static margin-left: -20px to replace the removed dynamic calculation

@Tyriar Tyriar marked this pull request as ready for review December 25, 2025 21:11
@Tyriar Tyriar enabled auto-merge December 25, 2025 21:11
@Tyriar Tyriar merged commit 6979e72 into main Dec 25, 2025
28 checks passed
@Tyriar Tyriar deleted the tyriar/285032__285031 branch December 25, 2025 21:31
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.

getContainerWidthCachedForTask is slow when typing in the terminal

3 participants