diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 35d0b8c..3bd366e 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -34,13 +34,7 @@ jobs: - name: Run yarn audit run: yarn audit --level high - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: javascript - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 docker-security: name: Docker Security Scan @@ -59,4 +53,3 @@ jobs: image-ref: 'quixotic:scan' format: 'sarif' output: 'trivy-results.sarif' - diff --git a/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl b/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl index e14eee3..3b4acf1 100644 Binary files a/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl and b/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl differ diff --git a/.serena/memories/layout_issue_analysis.md b/.serena/memories/layout_issue_analysis.md new file mode 100644 index 0000000..ecdc886 --- /dev/null +++ b/.serena/memories/layout_issue_analysis.md @@ -0,0 +1,31 @@ +# Layout Issue Analysis + +## Problem Description +User reports that the application layout is broken: +1. "Nothing found" notification shows always +2. Search field that was at bottom is now at top + +## Current Structure Analysis +Based on code review of public/index.html and public/script.ts: + +### HTML Structure (Current): +1. Search form (input + button) - at TOP +2. Welcome placeholder - initially visible +3. Loading spinner - hidden by default +4. Results list - hidden by default +5. No results placeholder - hidden by default + +### JavaScript Logic Issues Found: +1. **No Results always showing**: In `showNoResults()` method, the noResults element is made visible with `classList.remove('tg-hidden')` but there's no logic to hide it when new search starts or results are found. + +2. **Search field position**: The search form is structurally at the top in HTML, which matches user complaint. + +### Display Logic Flow: +- `showLoading()`: Hides welcome, shows loading, hides results, hides noResults +- `displayResults()`: Calls `hideLoading()`, shows results if any, otherwise calls `showNoResults()` +- `showNoResults()`: Calls `hideLoading()`, hides results, SHOWS noResults (but doesn't hide welcome) + +## Root Causes: +1. **NoResults visibility issue**: The noResults element is never hidden when starting a new search +2. **Welcome placeholder management**: Not properly hidden when showing noResults +3. **Search position**: Structurally at top, needs to be moved to bottom if that was the intended design \ No newline at end of file diff --git a/.serena/memories/telegram_token_fix.md b/.serena/memories/telegram_token_fix.md new file mode 100644 index 0000000..8320e1f --- /dev/null +++ b/.serena/memories/telegram_token_fix.md @@ -0,0 +1,18 @@ +# Telegram Bot Token Fix + +## Problem +Docker container was showing "⚠️ TELEGRAM_BOT_TOKEN not found or invalid - bot will not start" error despite the token being present in `.env.docker` file. + +## Root Cause +The `docker-compose.yml` file was missing the `env_file` configuration to load environment variables from `.env.docker`. + +## Solution +Added `env_file: - .env.docker` at the top level of docker-compose.yml to ensure all services load environment variables from the .env.docker file. + +## Files Modified +- `docker-compose.yml`: Added env_file configuration + +## Token Details +- Token is present in `.env.docker`: `8262100335:AAFUBycadhKwV4oWPtF_Uq3c_R95SfWUElM` +- WEB_APP_URL is configured: `https://quixy.uk` +- Environment variables are properly referenced in services \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0d34124..5dcac30 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: image: traefik:v3.0 container_name: quixotic-traefik restart: unless-stopped + env_file: + - .env.docker command: - --api.dashboard=true - --api.insecure=false @@ -37,6 +39,8 @@ services: image: postgres:15-alpine container_name: quixotic-postgres restart: unless-stopped + env_file: + - .env.docker environment: POSTGRES_DB: ${POSTGRES_DB:-quixotic} POSTGRES_USER: ${POSTGRES_USER:-quixotic} @@ -59,10 +63,13 @@ services: dockerfile: Dockerfile container_name: quixotic-app restart: unless-stopped + env_file: + - .env.docker environment: - NODE_ENV=production - PORT=3000 - DATABASE_URL=postgresql://${POSTGRES_USER:-quixotic}:${POSTGRES_PASSWORD:-quixotic123}@postgres:5432/${POSTGRES_DB:-quixotic} + - DATABASE_SSL=false volumes: - downloads:/app/downloads labels: diff --git a/public/index.html b/public/index.html index e4b9875..d65d72c 100644 --- a/public/index.html +++ b/public/index.html @@ -12,34 +12,28 @@