Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/overlays/add-connection-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { toast } from "sonner";
import { Input } from "@/components/ui/input";
import { IntegrationIcon } from "@/components/ui/integration-icon";
import { Label } from "@/components/ui/label";
import { useIsMobile } from "@/hooks/use-mobile";
import {
aiGatewayStatusAtom,
aiGatewayTeamsAtom,
Expand Down Expand Up @@ -64,6 +65,7 @@ export function AddConnectionOverlay({
}: AddConnectionOverlayProps) {
const { push, closeAll } = useOverlay();
const [searchQuery, setSearchQuery] = useState("");
const isMobile = useIsMobile();

// AI Gateway state
const aiGatewayStatus = useAtomValue(aiGatewayStatusAtom);
Expand Down Expand Up @@ -138,7 +140,7 @@ export function AddConnectionOverlay({
<div className="relative">
<Search className="absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
<Input
autoFocus
autoFocus={!isMobile}
className="pl-9"
onChange={(e) => setSearchQuery(e.target.value)}
placeholder="Search services..."
Expand Down
4 changes: 3 additions & 1 deletion components/overlays/edit-connection-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { useIsMobile } from "@/hooks/use-mobile";
import { api, type Integration } from "@/lib/api-client";
import { getIntegration, getIntegrationLabels } from "@/plugins";
import { ConfirmOverlay } from "./confirm-overlay";
Expand Down Expand Up @@ -52,6 +53,7 @@ function SecretField({
onChange: (key: string, value: string) => void;
}) {
const [isEditing, setIsEditing] = useState(false);
const isMobile = useIsMobile();
const hasNewValue = value.length > 0;

// Show "Configured" state until user clicks Change
Expand Down Expand Up @@ -82,7 +84,7 @@ function SecretField({
<Label htmlFor={fieldId}>{label}</Label>
<div className="flex items-center gap-2">
<Input
autoFocus={isEditing}
autoFocus={isEditing && !isMobile}
className="flex-1"
id={fieldId}
onChange={(e) => onChange(configKey, e.target.value)}
Expand Down
4 changes: 3 additions & 1 deletion components/workflow/config/action-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { useIsMobile } from "@/hooks/use-mobile";
import { cn } from "@/lib/utils";
import { getAllActions } from "@/plugins";

Expand Down Expand Up @@ -166,6 +167,7 @@ export function ActionGrid({
const [viewMode, setViewMode] = useState<ViewMode>(getInitialViewMode);
const actions = useAllActions();
const inputRef = useRef<HTMLInputElement>(null);
const isMobile = useIsMobile();

const toggleViewMode = () => {
const newMode = viewMode === "list" ? "grid" : "list";
Expand Down Expand Up @@ -253,7 +255,7 @@ export function ActionGrid({
<div className="relative flex-1">
<Search className="absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
<Input
autoFocus={isNewlyCreated}
autoFocus={isNewlyCreated && !isMobile}
className="pl-9"
data-testid="action-search-input"
disabled={disabled}
Expand Down