Skip to content

inlineChat: use stepped resize for input widget width#303476

Merged
jrieken merged 2 commits intomainfrom
joh/inline-chat-stepped-resize
Mar 20, 2026
Merged

inlineChat: use stepped resize for input widget width#303476
jrieken merged 2 commits intomainfrom
joh/inline-chat-stepped-resize

Conversation

@jrieken
Copy link
Member

@jrieken jrieken commented Mar 20, 2026

This changes the inline chat input widget width to resize in discrete steps rather than continuously growing with content.

Before: The widget grew pixel-by-pixel from minWidth (220px) to maxWidth (600px) as the user typed, causing constant relayout.

After: The widget snaps between three sizes using the golden ratio:

  • minWidth = 220px (initial)
  • midWidth = ~371px (600 / 1.618)
  • maxWidth = 600px (with word wrap enabled)

This reduces visual jitter by limiting the resize to at most two transitions instead of continuous growth.

Resize the inline chat input widget width in discrete steps
(minWidth -> midWidth -> maxWidth) using the golden ratio instead
of continuously growing with content. This reduces visual jitter
by snapping to only three predefined sizes.
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

Adjusts the inline chat input overlay widget sizing behavior so width changes happen in discrete steps rather than continuously, aiming to reduce layout churn/jitter while typing.

Changes:

  • Replace continuous width clamping with a 3-step width model (min/mid/max).
  • Introduce a computed midWidth based on maxWidth and a golden-ratio divisor.

@jrieken jrieken merged commit f0a991b into main Mar 20, 2026
19 checks passed
@jrieken jrieken deleted the joh/inline-chat-stepped-resize branch March 20, 2026 14:40
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.

3 participants