From 6d770f1c0565dc56e4c5deae0f401b922b9f2e2b Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Mon, 29 Jun 2026 01:33:26 +0000 Subject: [PATCH] fix(composer): refit on .composer-left resize, not just footer (Codex gate #4657) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex flagged that the fit ResizeObserver only watched .composer-footer, whose outer width may not change when right-side controls (status/context chips) appear — leaving the left control group's fit stale. Also observe .composer-left. Co-authored-by: Paladin173 --- static/ui.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/ui.js b/static/ui.js index a7d3e03b..04268146 100644 --- a/static/ui.js +++ b/static/ui.js @@ -3312,6 +3312,11 @@ function _initComposerFooterFit(){ try{ _composerFitResizeObserver=new ResizeObserver(_scheduleComposerFit); _composerFitResizeObserver.observe(footer); + // Also observe the left control group directly: the footer's outer width + // may not change when right-side controls (status/context chips) appear or + // resize, but that shrinks .composer-left's available room and must + // retrigger a refit. (Codex gate #4657.) + if(left && left!==footer){try{_composerFitResizeObserver.observe(left);}catch(_){ }} }catch(_){ } } if(window.MutationObserver){