diff --git a/app/utils/db_wizard.py b/app/utils/db_wizard.py index c6e83e03..e8d53a89 100644 --- a/app/utils/db_wizard.py +++ b/app/utils/db_wizard.py @@ -82,7 +82,9 @@ def build_connection_string( ValueError: If required fields are missing for the chosen backend. """ if backend == "sqlite": - path = sqlite_path.strip() if sqlite_path else "./app/database.db" + path = sqlite_path.strip() if sqlite_path else "" + if not path: + path = "./app/database.db" return f"sqlite:///{path}" # Resolve driver prefix diff --git a/app/utils/settings_service.py b/app/utils/settings_service.py index 39f527b6..742a12d6 100644 --- a/app/utils/settings_service.py +++ b/app/utils/settings_service.py @@ -23,11 +23,13 @@ SETTING_METADATA = { # Core Settings "database_url": { "category": "Core", - "description": "Database connection URL (e.g., sqlite:///path/to/db.sqlite)", + "description": "Database connection URL (e.g., sqlite:///path/to/db.sqlite). Use the Database Wizard for guided setup.", "type": "string", "sensitive": False, "required": True, "restart_required": True, + "help_link": "/database-wizard", + "help_link_label": "Open Database Wizard", }, "redis_url": { "category": "Core", diff --git a/frontend/templates/db_wizard.html b/frontend/templates/db_wizard.html index 6035f3dd..901f160e 100644 --- a/frontend/templates/db_wizard.html +++ b/frontend/templates/db_wizard.html @@ -13,6 +13,14 @@ .migration-table th, .migration-table td { padding: 0.5rem 1rem; text-align: left; } @keyframes pulse-bar { 0%,100%{opacity:1} 50%{opacity:.5} } .animate-pulse-bar { animation: pulse-bar 1.5s ease-in-out infinite; } + /* Dark mode overrides for db-wizard specific styles */ + html.dark .from-blue-50 { --tw-gradient-from: #1e3a5f; } + html.dark .to-indigo-100 { --tw-gradient-to: #1e1b4b; } + html.dark .db-card { background-color: #1f2937; border-color: #374151; } + html.dark .db-card:hover { border-color: #818cf8; } + html.dark .db-card.selected { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,0.3); } + /* Ensure smooth scroll only when user permits */ + @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } } {% endblock %} @@ -124,8 +132,9 @@ -

Leave blank to use the default path ./app/database.db.

+ placeholder="./app/database.db" + aria-describedby="sqlite_path_help" /> +

Leave blank to use the default path ./app/database.db.

@@ -169,13 +178,14 @@
-

Use require for managed cloud databases (AWS RDS, Supabase, etc.).

+

Use require for managed cloud databases (AWS RDS, Supabase, etc.).

@@ -238,7 +248,7 @@
-