Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: keep LoRA download progress visible off Discover and drop the focus-stealing autofocus (#7231)
[._.]/ Adam Eivyb1eff2edb49b
diff --git a/client/src/pages/Loras.jsx b/client/src/pages/Loras.jsxindex 95ab4b80ec..335211cd6d 100644--- a/client/src/pages/Loras.jsx+++ b/client/src/pages/Loras.jsx@@ -447,6 +447,17 @@ export default function Loras() {</div></div>+ {/* A HuggingFace download keeps running when the user leaves Discover,+ but every readout of it (the form's bar, the card's percent) lives in+ that panel — so a multi-gigabyte transfer would silently have no+ indicator anywhere. Mirror it here, and only while Discover is closed,+ so the two are never on screen at once. */}+ {view !== VIEW_DISCOVER && (hfInstalling || installingVideoKey) && (+ <div className="bg-port-card border border-port-border rounded-lg p-3">+ <HfDownloadProgress progress={hfProgress} />+ </div>+ )}+{view === VIEW_DISCOVER && (<div id={`${VIEW_PANEL_PREFIX}-${VIEW_DISCOVER}`} role="tabpanel" aria-labelledby={`tab-${VIEW_DISCOVER}`} className="space-y-6">{lastInstalled && (@@ -480,6 +491,10 @@ export default function Loras() {</div><CivitaiKeyBadge auth={auth} onManage={() => setAuthPrompt({ url: null, message: '' })} /></div>+ {/* No `autoFocus`: this form used to mount once with the page, so+ focusing it was a landing convenience. It now remounts on every+ switch into Discover, where it would steal focus from the tab+ the user just activated and swallow their next arrow key. */}<div className="flex gap-2"><inputtype="text"@@ -489,7 +504,6 @@ export default function Loras() {placeholder="https://civitai.com/models/2600698/realstagram"className="flex-1 bg-port-bg border border-port-border rounded px-3 py-2 text-sm text-gray-200 placeholder:text-gray-600"disabled={installing}- autoFocus/><buttontype="submit"diff --git a/client/src/pages/Loras.test.jsx b/client/src/pages/Loras.test.jsxindex 90b117efa1..e85f8a95a9 100644--- a/client/src/pages/Loras.test.jsx+++ b/client/src/pages/Loras.test.jsx@@ -133,6 +133,43 @@ describe('Loras Installed / Discover views', () => {expect(screen.queryByLabelText('Civitai model URL')).not.toBeInTheDocument();});+ it('does not steal focus from the tab that opened Discover', async () => {+ renderPage();+ await screen.findByText('Example LoRA');++ const discoverTab = screen.getByRole('tab', { name: /Discover \/ install/ });+ fireEvent.click(discoverTab);+ await screen.findByLabelText('Civitai model URL');++ // The install form remounts on every switch now, so an autoFocus on it+ // would swallow the arrow key that should walk back to Installed.+ expect(screen.getByLabelText('Civitai model URL')).not.toHaveFocus();+ });++ // A multi-gigabyte HuggingFace download survives the switch to Installed,+ // but every readout of it lives in the Discover panel — without a mirror the+ // transfer runs with no indicator anywhere on the page.+ it('keeps an in-flight download visible after switching away from Discover', async () => {+ listLorasFull.mockResolvedValue([]);+ let reportProgress;+ installLoraFromHuggingfaceStream.mockImplementation(({ onProgress }) => new Promise(() => {+ reportProgress = onProgress;+ }));+ await renderDiscover();++ const input = await screen.findByLabelText('HuggingFace LoRA URL');+ fireEvent.change(input, { target: { value: 'https://huggingface.co/example-org/example-lora' } });+ fireEvent.submit(input.closest('form'));+ await clickStartDownload();+ await waitFor(() => expect(reportProgress).toBeTypeOf('function'));+ act(() => reportProgress({ received: 512, total: 1024, progress: 0.5 }));+ expect(await screen.findByText('Downloading… 50%')).toBeInTheDocument();++ fireEvent.click(screen.getByRole('tab', { name: /Installed/ }));++ expect(await screen.findByText('Downloading… 50%')).toBeInTheDocument();+ });+it('offers a discovery hand-off from the empty Installed state', async () => {listLorasFull.mockResolvedValue([]);renderPage();