From 0f778522877511ee6ba45434e92320d5f690466e Mon Sep 17 00:00:00 2001 From: Gagancreates Date: Mon, 8 Jun 2026 01:07:15 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20correct=20right-to-left=20collapse=20ord?= =?UTF-8?q?er=20(code=E2=86=92perm=E2=86=92search=E2=86=92workDir)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/chat-input-with-mentions.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx b/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx index ec98aa88..878ba8ca 100644 --- a/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx +++ b/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx @@ -302,12 +302,12 @@ function ChatInputInner({ const permFullW = 65 + 8 // "Auto" label const permIconW = 28 + 8 const base = 28 + 80 + 28 + 2 * 8 // +btn + model + submit + 2 outer gaps - // Min container width to fit each level without overflowing - const t0 = base + permFullW + workDirFullW + searchFullW + codeFullW // all full - const t1 = base + permFullW + workDirFullW + searchFullW + codeIconW // code → icon - const t2 = base + permFullW + workDirFullW + searchIconW + codeIconW // search → icon - const t3 = base + permFullW + workDirIconW + searchIconW + codeIconW // workDir → icon - const t4 = base + permIconW + workDirIconW + searchIconW + codeIconW // perm → icon + // Collapse order right→left: code(1) → perm(2) → search(3) → workDir(4) + const t0 = base + workDirFullW + searchFullW + permFullW + codeFullW // all full + const t1 = base + workDirFullW + searchFullW + permFullW + codeIconW // code → icon + const t2 = base + workDirFullW + searchFullW + permIconW + codeIconW // perm → icon + const t3 = base + workDirFullW + searchIconW + permIconW + codeIconW // search → icon + const t4 = base + workDirIconW + searchIconW + permIconW + codeIconW // workDir → icon setCollapseLevel(w >= t0 ? 0 : w >= t1 ? 1 : w >= t2 ? 2 : w >= t3 ? 3 : w >= t4 ? 4 : 4) }) ro.observe(el) @@ -897,7 +897,7 @@ function ChatInputInner({ {workDir && ( - {collapseLevel >= 3 ? ( + {collapseLevel >= 4 ? (