Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(frontend): Responsive issue - the horizontal scrollbar is showing when resizing the browser window (#9446)

Hiep Lea691e3148ad4
diff --git a/frontend/__tests__/routes/home-screen.test.tsx b/frontend/__tests__/routes/home-screen.test.tsx
index ac35a8e782..0c18e10d8a 100644
--- a/frontend/__tests__/routes/home-screen.test.tsx
+++ b/frontend/__tests__/routes/home-screen.test.tsx
@@ -90,7 +90,7 @@ describe("HomeScreen", () => {
const mainContainer = screen
.getByTestId("home-screen")
.querySelector("main");
- expect(mainContainer).toHaveClass("flex", "flex-col", "md:flex-row");
+ expect(mainContainer).toHaveClass("flex", "flex-col", "lg:flex-row");
});
it("should filter the suggested tasks based on the selected repository", async () => {
diff --git a/frontend/src/components/shared/modals/settings/model-selector.tsx b/frontend/src/components/shared/modals/settings/model-selector.tsx
index 56cdb72873..abfa622464 100644
--- a/frontend/src/components/shared/modals/settings/model-selector.tsx
+++ b/frontend/src/components/shared/modals/settings/model-selector.tsx
@@ -68,7 +68,7 @@ export function ModelSelector({
const { t } = useTranslation();
return (
- <div className="flex flex-col md:flex-row w-[full] md:w-[680px] justify-between gap-4 md:gap-[46px]">
+ <div className="flex flex-col md:flex-row w-[full] max-w-[680px] justify-between gap-4 md:gap-[46px]">
<fieldset className="flex flex-col gap-2.5 w-full">
<label className="text-sm">{t(I18nKey.LLM$PROVIDER)}</label>
<Autocomplete
diff --git a/frontend/src/routes/app-settings.tsx b/frontend/src/routes/app-settings.tsx
index d8513d7c93..5e3c832dc8 100644
--- a/frontend/src/routes/app-settings.tsx
+++ b/frontend/src/routes/app-settings.tsx
@@ -192,7 +192,7 @@ function AppSettingsScreen() {
placeholder={t(I18nKey.SETTINGS$MAXIMUM_BUDGET_USD)}
min={1}
step={1}
- className="w-[680px]" // Match the width of the language field
+ className="w-full max-w-[680px]" // Match the width of the language field
/>
</div>
)}
diff --git a/frontend/src/routes/home.tsx b/frontend/src/routes/home.tsx
index 5c4203936f..258e03fe95 100644
--- a/frontend/src/routes/home.tsx
+++ b/frontend/src/routes/home.tsx
@@ -24,7 +24,7 @@ function HomeScreen() {
<hr className="border-[#717888]" />
- <main className="flex flex-col md:flex-row justify-between gap-8">
+ <main className="flex flex-col lg:flex-row justify-between gap-8">
<RepoConnector
onRepoSelection={(title) => setSelectedRepoTitle(title)}
/>
diff --git a/frontend/src/routes/root-layout.tsx b/frontend/src/routes/root-layout.tsx
index 92e90f5a4c..6ba03b0fea 100644
--- a/frontend/src/routes/root-layout.tsx
+++ b/frontend/src/routes/root-layout.tsx
@@ -197,7 +197,7 @@ export default function MainApp() {
return (
<div
data-testid="root-layout"
- className="bg-base p-3 h-screen md:min-w-[1024px] flex flex-col md:flex-row gap-3"
+ className="bg-base p-3 h-screen lg:min-w-[1024px] flex flex-col md:flex-row gap-3"
>
<Sidebar />