Skip to content

The open-source app everyone uses to manage agents at work

Fix oversized toggle switches on mobile

dotta42c8d9b66007
diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx
index 0a35bd34d7..6b8519cdde 100644
--- a/ui/src/components/NewIssueDialog.tsx
+++ b/ui/src/components/NewIssueDialog.tsx
@@ -1213,6 +1213,7 @@ export function NewIssueDialog() {
<div className="flex items-center justify-between rounded-md border border-border px-2 py-1.5">
<div className="text-xs text-muted-foreground">Enable Chrome (--chrome)</div>
<button
+ data-slot="toggle"
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
assigneeChrome ? "bg-green-600" : "bg-muted"
diff --git a/ui/src/components/ProjectProperties.tsx b/ui/src/components/ProjectProperties.tsx
index 06645118d4..36caf20f65 100644
--- a/ui/src/components/ProjectProperties.tsx
+++ b/ui/src/components/ProjectProperties.tsx
@@ -887,6 +887,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
</div>
{onUpdate || onFieldUpdate ? (
<button
+ data-slot="toggle"
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
executionWorkspacesEnabled ? "bg-green-600" : "bg-muted",
@@ -925,6 +926,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
</div>
</div>
<button
+ data-slot="toggle"
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
executionWorkspaceDefaultMode === "isolated_workspace" ? "bg-green-600" : "bg-muted",
diff --git a/ui/src/components/agent-config-primitives.tsx b/ui/src/components/agent-config-primitives.tsx
index a9efa7c78d..3c0fd25b82 100644
--- a/ui/src/components/agent-config-primitives.tsx
+++ b/ui/src/components/agent-config-primitives.tsx
@@ -117,6 +117,7 @@ export function ToggleField({
{hint && <HintIcon text={hint} />}
</div>
<button
+ data-slot="toggle"
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
checked ? "bg-green-600" : "bg-muted"
@@ -165,6 +166,7 @@ export function ToggleWithNumber({
{hint && <HintIcon text={hint} />}
</div>
<button
+ data-slot="toggle"
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0",
checked ? "bg-green-600" : "bg-muted"
diff --git a/ui/src/index.css b/ui/src/index.css
index d6b1d35913..4c08a9a2aa 100644
--- a/ui/src/index.css
+++ b/ui/src/index.css
@@ -153,6 +153,10 @@
[data-slot="select-trigger"] {
min-height: 44px;
}
+
+ [data-slot="toggle"] {
+ min-height: 0;
+ }
}
/* Dark mode scrollbars */
diff --git a/ui/src/pages/AgentDetail.tsx b/ui/src/pages/AgentDetail.tsx
index ebb6a66726..00fb07997f 100644
--- a/ui/src/pages/AgentDetail.tsx
+++ b/ui/src/pages/AgentDetail.tsx
@@ -1513,6 +1513,7 @@ function ConfigurationTab({
<button
type="button"
role="switch"
+ data-slot="toggle"
aria-checked={canCreateAgents}
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0 disabled:cursor-not-allowed disabled:opacity-50",
@@ -1544,6 +1545,7 @@ function ConfigurationTab({
<button
type="button"
role="switch"
+ data-slot="toggle"
aria-checked={canAssignTasks}
className={cn(
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0 disabled:cursor-not-allowed disabled:opacity-50",
diff --git a/ui/src/pages/InstanceExperimentalSettings.tsx b/ui/src/pages/InstanceExperimentalSettings.tsx
index 07728a63c8..050166ffe6 100644
--- a/ui/src/pages/InstanceExperimentalSettings.tsx
+++ b/ui/src/pages/InstanceExperimentalSettings.tsx
@@ -84,6 +84,7 @@ export function InstanceExperimentalSettings() {
</div>
<button
type="button"
+ data-slot="toggle"
aria-label="Toggle isolated workspaces experimental setting"
disabled={toggleMutation.isPending}
className={cn(
@@ -113,6 +114,7 @@ export function InstanceExperimentalSettings() {
</div>
<button
type="button"
+ data-slot="toggle"
aria-label="Toggle guarded dev-server auto-restart"
disabled={toggleMutation.isPending}
className={cn(
diff --git a/ui/src/pages/InstanceGeneralSettings.tsx b/ui/src/pages/InstanceGeneralSettings.tsx
index 4f0d1cae05..5460e683de 100644
--- a/ui/src/pages/InstanceGeneralSettings.tsx
+++ b/ui/src/pages/InstanceGeneralSettings.tsx
@@ -81,6 +81,7 @@ export function InstanceGeneralSettings() {
</div>
<button
type="button"
+ data-slot="toggle"
aria-label="Toggle username log censoring"
disabled={toggleMutation.isPending}
className={cn(