diff --git a/apps/desktop/src/App.test.tsx b/apps/desktop/src/App.test.tsx index c039dfba..4dcf50d6 100644 --- a/apps/desktop/src/App.test.tsx +++ b/apps/desktop/src/App.test.tsx @@ -1433,4 +1433,10 @@ describe("App", () => { expect(settingsSpan).toHaveAttribute("tabIndex", "0"); expect(settingsSpan).toHaveAttribute("role", "button"); }); + + it("enforces a maximum length on the YouTube URL input", () => { + render(); + const input = screen.getByPlaceholderText(/YouTube URL.../i); + expect(input).toHaveAttribute("maxLength", "2048"); + }); }); diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 24f5fb09..10327b13 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -607,6 +607,7 @@ export function App() { value={youtubeUrl} onChange={(e) => setYoutubeUrl(e.target.value)} disabled={analysisInFlight || isStarting || isImporting} + maxLength={2048} className="h-10 flex-1 border-0 bg-transparent text-slate-100 placeholder:text-slate-500 focus-visible:ring-cyan-300" aria-label="YouTube URL" />