From bfc1e3671cb8b3a983a7decabe6650c49f998d49 Mon Sep 17 00:00:00 2001 From: Yury Kossakovsky Date: Fri, 12 Dec 2025 18:14:25 -0700 Subject: [PATCH] refactor(welcome): simplify service cards and remove duplicates - remove min-height from card headers for natural sizing - remove duplicate postgres credentials from postgresus card - consolidate python-runner info into single multiline note - add spacing between credential rows and support for line breaks --- scripts/generate_welcome_page.sh | 16 +++------------- welcome/app.js | 7 +++---- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/scripts/generate_welcome_page.sh b/scripts/generate_welcome_page.sh index e375ba3..7cb74b7 100755 --- a/scripts/generate_welcome_page.sh +++ b/scripts/generate_welcome_page.sh @@ -93,13 +93,8 @@ fi if is_profile_active "postgresus"; then SERVICES_ARRAY+=(" \"postgresus\": { \"hostname\": \"$(json_escape "$POSTGRESUS_HOSTNAME")\", - \"credentials\": {}, - \"extra\": { - \"pg_host\": \"postgres\", - \"pg_port\": \"${POSTGRES_PORT:-5432}\", - \"pg_user\": \"$(json_escape "${POSTGRES_USER:-postgres}")\", - \"pg_password\": \"$(json_escape "$POSTGRES_PASSWORD")\", - \"pg_db\": \"$(json_escape "${POSTGRES_DB:-postgres}")\" + \"credentials\": { + \"note\": \"PostgreSQL credentials are shown in the PostgreSQL card\" } }") fi @@ -409,12 +404,7 @@ if is_profile_active "python-runner"; then SERVICES_ARRAY+=(" \"python-runner\": { \"hostname\": null, \"credentials\": { - \"note\": \"Internal service only\" - }, - \"extra\": { - \"mounted_dir\": \"./python-runner -> /app\", - \"entry_file\": \"/app/main.py\", - \"logs_command\": \"docker compose -p localai logs -f python-runner\" + \"note\": \"Mount: ./python-runner → /app\\nEntry: /app/main.py\\nLogs: make logs s=python-runner\" } }") fi diff --git a/welcome/app.js b/welcome/app.js index 1baacd9..ed615f1 100644 --- a/welcome/app.js +++ b/welcome/app.js @@ -630,12 +630,12 @@ */ function createBottomSection(creds, extra) { const section = document.createElement('div'); - section.className = 'mt-4 pt-4 border-t border-surface-400 space-y-0'; + section.className = 'mt-4 pt-4 border-t border-surface-400 space-y-1'; // Handle credentials note (special case - just show note text) if (creds && creds.note) { const noteP = document.createElement('p'); - noteP.className = 'text-sm text-gray-500 italic'; + noteP.className = 'text-sm text-gray-500 italic whitespace-pre-line'; noteP.textContent = creds.note; section.appendChild(noteP); } @@ -687,8 +687,7 @@ */ function createCardHeader(metadata, serviceData) { const header = document.createElement('div'); - // Fixed min-height so border is always at the same position (accounts for external + internal URLs) - header.className = 'flex items-start gap-4 min-h-[104px]'; + header.className = 'flex items-start gap-4'; // Icon const iconDiv = document.createElement('div');