From 356daf845cac3e43add21da914b688c5d173f26e Mon Sep 17 00:00:00 2001 From: Yuxin Qiao <104957188+Yuxin-Qiao@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:21:47 +0800 Subject: [PATCH] fix(gui): prevent custom select dropdown from overflowing viewport when placed on right --- .../SubagentDelegationSection.tsx | 2 ++ gui/src/pages/dashboard-overview-sections.tsx | 6 ++++++ gui/src/select-position.ts | 11 ++++++----- gui/tests/select-position.test.ts | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx b/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx index 2cf672b937..720b60874f 100644 --- a/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx +++ b/gui/src/components/subagents-workspace/SubagentDelegationSection.tsx @@ -51,6 +51,7 @@ export default function SubagentDelegationSection({ onChange={v => onSave({ model: v || null, effort: effort || null })} disabled={saving} label={t("dash.injectionLabel")} + align="right" /> {model && efforts.length > 0 && ( @@ -118,6 +120,7 @@ export function DashboardInjectionPanel({ d }: { apiBase: string; d: Dash }) { onChange={(v) => { void saveInjection({ model: v || null, effort: injectionEffort || null }); }} disabled={injectionSaving} label={t("dash.injectionLabel")} + align="right" /> {injectionModel && injectionEfforts.length > 0 && (