wrap inputs in real forms, so enter submits instead of doing nothing

24 panel and screen files had their fields sitting in a <div> instead of a
<form> — typing a value and pressing Enter did nothing, and the button was
the only way in. Fixed the sites that are a real form, a single field with
an obvious action, or a multi-field editor; left search/filter boxes and a
few genuinely ambiguous sites alone (see TODO.md for the full breakdown).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 10:51:58 +00:00
co-authored by Claude Opus 5
parent 319afe2c5d
commit 994de45296
24 changed files with 510 additions and 408 deletions
@@ -1,3 +1,4 @@
import type { FormEvent } from 'react';
import { useState, useEffect } from 'react';
import { toast } from 'sonner';
import { Input } from '@/components/ui/input';
@@ -31,7 +32,8 @@ export const ApifyConfig = () => {
.finally(() => setIsLoading(false));
}, []);
const handleSave = async () => {
const handleSave = async (ev?: FormEvent) => {
ev?.preventDefault();
if (isSaving) return;
setIsSaving(true);
try {
@@ -60,7 +62,7 @@ export const ApifyConfig = () => {
</div>
)}
<div className="grid gap-5">
<form onSubmit={handleSave} className="grid gap-5">
<Label className="grid gap-2">
<span className="text-duck-dark/70 dark:text-foreground/70">API Token</span>
<Input
@@ -84,14 +86,13 @@ export const ApifyConfig = () => {
</Label>
<Button
type="button"
onClick={handleSave}
type="submit"
disabled={isSaving || !apiToken.trim()}
className="w-full h-11 bg-duck-yellow hover:bg-duck-yellow/90 text-duck-teal font-bold transition-all duration-200 hover:scale-105 cursor-pointer disabled:opacity-50 disabled:hover:scale-100"
>
{isSaving ? 'Saving...' : 'Save'}
</Button>
</div>
</form>
</div>
);
};