From 9f9bca1077cda723519b3cc8ac04b061edd4ad80 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 3 Apr 2026 17:36:49 +0200 Subject: [PATCH] fix: settings page defaults to Profilo tab, banner links to Provider AI - Change default activeSection from 'piano' to 'profilo' - Support ?tab= query param to deep-link into settings sections - Update missing API key banner to link to /settings?tab=ai Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/ContentPage.jsx | 2 +- frontend/src/components/SettingsPage.jsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/ContentPage.jsx b/frontend/src/components/ContentPage.jsx index c80ac38..c12ce43 100644 --- a/frontend/src/components/ContentPage.jsx +++ b/frontend/src/components/ContentPage.jsx @@ -154,7 +154,7 @@ export default function ContentPage() {

Per generare contenuti devi prima configurare un provider AI (Claude, OpenAI, Gemini...) e inserire la tua API key.

- + Vai alle Impostazioni → diff --git a/frontend/src/components/SettingsPage.jsx b/frontend/src/components/SettingsPage.jsx index 5779810..35e5ced 100644 --- a/frontend/src/components/SettingsPage.jsx +++ b/frontend/src/components/SettingsPage.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useRef } from 'react' -import { useNavigate } from 'react-router-dom' +import { useNavigate, useSearchParams } from 'react-router-dom' import { api } from '../api' import { useAuth } from '../AuthContext' @@ -126,7 +126,8 @@ const SECTIONS = [ export default function SettingsPage() { const { user, isPro } = useAuth() const navigate = useNavigate() - const [activeSection, setActiveSection] = useState('piano') + const [searchParams] = useSearchParams() + const [activeSection, setActiveSection] = useState(searchParams.get('tab') || 'profilo') const [aiValues, setAiValues] = useState({ llm_provider: 'claude', llm_api_key: '', llm_model: '', llm_base_url: '', image_provider: 'dalle', image_api_key: '', image_base_url: '',