Skip to content

Conversation

@stevei101
Copy link
Collaborator

Summary

This PR adds a thin Nginx proxy layer for routing requests to multiple applications (agentnav, prompt-vault, cursor-ide) through a single entry point.

Changes

Nginx Proxy Service

  • ✅ Complete nginx-proxy service with Dockerfile and configuration
  • ✅ Landing page with navigation to all apps
  • ✅ Route handling for agentnav, prompt-vault, and cursor-ide
  • ✅ Support for optional services (graceful handling when disabled)
  • ✅ WebSocket support for Vite HMR
  • ✅ Health check endpoint

Prompt Vault Fixes

  • ✅ Fixed vite.config.ts (removed base path for proxy compatibility)
  • ✅ Added restart script for stability
  • ✅ Resolved port conflicts and 502 errors

CI/CD Integration

  • ✅ Added proxy build and deploy steps to GitHub Actions
  • ✅ Terraform configuration for Cloud Run proxy service
  • ✅ Environment variable handling for service URLs

Documentation

  • ✅ Comprehensive README for nginx-proxy
  • ✅ Local testing scripts and guides
  • ✅ Port mapping documentation

Testing

  • ✅ Tested locally with all three apps running
  • ✅ Verified proxy routes work correctly
  • ✅ Fixed stability issues (502 errors)
  • ✅ Confirmed landing page displays correctly

Related Issues

  • Resolves stability issues with prompt-vault 502 errors
  • Enables multi-app routing through single entry point
  • Prepares for Cloud Run deployment with unified access

Deployment Notes

The proxy will be deployed to Cloud Run and serve as the main entry point for all applications. Service URLs are configured via environment variables.

dependabot bot and others added 4 commits November 5, 2025 23:21
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 15.0.7 to 16.3.0.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](testing-library/react-testing-library@v15.0.7...v16.3.0)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…#185)

* Initial plan

* chore(deps): add missing peer dependencies for @testing-library/react@16.3.0

Co-authored-by: stevei101 <287896+stevei101@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stevei101 <287896+stevei101@users.noreply.github.com>
- Keep @types/react and @types/react-dom (required for @testing-library/react v16.3.0)
- Use @typescript-eslint/parser ^8.0.0 to match typescript-eslint ^8.46.2
- Keep @typescript-eslint/eslint-plugin ^8.0.0

Resolves merge conflict from PR #185
- Add nginx-proxy service for routing agentnav, prompt-vault, and cursor-ide
- Configure nginx with landing page and route handling
- Fix prompt-vault vite config (remove base path for proxy compatibility)
- Add proxy build and deploy steps to CI/CD workflow
- Add Terraform configuration for proxy Cloud Run service
- Add restart script for prompt-vault stability
- Fix nginx config to handle optional services gracefully

Resolves stability issues with 502 errors and port conflicts.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @stevei101, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a crucial Nginx proxy layer to centralize access and routing for several independent applications: agentnav, prompt-vault, and cursor-ide. The proxy acts as a unified entry point, intelligently directing traffic to the correct service components, including frontends, backends, and specialized endpoints like WebSockets. This architectural enhancement not only streamlines the user experience by providing a single URL for all applications but also prepares the system for robust Cloud Run deployments. It includes necessary configurations, such as environment variable management and port conflict resolution, alongside thorough documentation to ensure ease of setup and maintenance.

Highlights

  • Nginx Proxy Layer: Introduces a new Nginx proxy service designed to route requests to multiple applications (agentnav, prompt-vault, cursor-ide) through a single entry point, simplifying access and deployment.
  • Multi-Application Routing: The proxy includes comprehensive routing rules for each application's frontend, backend APIs, WebSockets, and specific services like Agentnav's Gemma GPU service, ensuring proper traffic distribution.
  • Prompt Vault Integration & Fixes: The Prompt Vault frontend has been fully integrated, including necessary fixes for Vite configuration (removing base path for proxy compatibility) and port conflict resolution, ensuring stable operation behind the proxy.
  • CI/CD and Cloud Run Deployment: New CI/CD steps and Terraform configurations have been added to facilitate building and deploying the Nginx proxy service to Cloud Run, complete with environment variable handling for service URLs.
  • Comprehensive Documentation & Local Testing: Extensive documentation has been added, including a detailed README for the proxy, multi-app setup guides, local testing scripts, and troubleshooting steps to aid development and deployment.
  • Interactive Landing Page: A new HTML/CSS landing page is served by the proxy at the root, providing a central hub with navigation cards and quick links to all integrated applications.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/build.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR introduces a comprehensive Nginx proxy layer to route traffic to multiple applications, which is a great step towards unifying the services. The setup includes Docker configuration, a landing page, and extensive local testing scripts. The changes are well-structured. However, I've found a few critical issues in the Nginx configuration and Dockerfile that need to be addressed to ensure the proxy functions correctly. There are also some medium-severity issues related to maintainability, consistency in documentation, and scripting that I've highlighted for improvement.

FROM nginx:1.25-alpine

# Install envsubst for environment variable substitution
RUN apk add --no-cache gettext
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The HEALTHCHECK instruction on line 43 uses wget, but it is not installed in the nginx:1.25-alpine base image. This will cause the health check to fail, and container orchestrators like Cloud Run will consider the container unhealthy and restart it. Please install wget along with gettext.

RUN apk add --no-cache gettext wget

# Main server block
server {
listen ${PORT};
server_name _;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

When using variables in proxy_pass directives for upstream hostnames (like ${AGENTNAV_BACKEND_URL}), Nginx needs a resolver to resolve these domain names at runtime. Without it, Nginx will fail to start or will be unable to route requests to the upstream services, resulting in 502 errors. Please add a resolver directive inside the server block. For Cloud Run, using a public DNS resolver is a good choice.

        server_name _;
        resolver 8.8.8.8 valid=300s;

Comment on lines +1 to +169
# Nginx Proxy Configuration for Agentnav Cloud Run
# Thin proxy layer for request routing and load balancing

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
use epoll;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

# Performance optimizations for Cloud Run
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 10M;

# Gzip compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml text/javascript
application/json application/javascript application/xml+rss
application/rss+xml font/truetype font/opentype
application/vnd.ms-fontobject image/svg+xml;

# Upstream backend services
# These will be set via environment variables at runtime
upstream backend_service {
server ${BACKEND_SERVICE_URL};
keepalive 32;
}

upstream frontend_service {
server ${FRONTEND_SERVICE_URL};
keepalive 32;
}

upstream gemma_service {
server ${GEMMA_SERVICE_URL};
keepalive 32;
}

# Main server block
server {
listen ${PORT:-8080};
server_name _;

# Health check endpoint
location /healthz {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}

# API routes - proxy to backend
location /api/ {
proxy_pass ${BACKEND_SERVICE_URL};
proxy_http_version 1.1;

# Headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";

# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;

# Buffering
proxy_buffering on;
proxy_buffer_size 4k;
proxy_buffers 8 4k;
}

# WebSocket support for streaming
location /ws/ {
proxy_pass ${BACKEND_SERVICE_URL};
proxy_http_version 1.1;

# WebSocket headers
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# WebSocket timeouts (longer for streaming)
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}

# Gemma GPU service routes
location /gemma/ {
rewrite ^/gemma/(.*) /$1 break;
proxy_pass ${GEMMA_SERVICE_URL};
proxy_http_version 1.1;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";

# Longer timeouts for GPU operations
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}

# Frontend static assets and SPA routing
location / {
proxy_pass ${FRONTEND_SERVICE_URL};
proxy_http_version 1.1;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";

# SPA routing - return index.html for non-file requests
proxy_intercept_errors on;
error_page 404 = @frontend_fallback;
}

# Fallback for SPA routing
location @frontend_fallback {
proxy_pass ${FRONTEND_SERVICE_URL};
proxy_set_header Host $host;
}

# FastAPI docs (if needed)
location /docs {
proxy_pass ${BACKEND_SERVICE_URL}/docs;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /openapi.json {
proxy_pass ${BACKEND_SERVICE_URL}/openapi.json;
proxy_http_version 1.1;
proxy_set_header Host $host;
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This new configuration file appears to be broken and is likely not used by the Docker build (which uses nginx.conf.template).
Specifically:

  • listen ${PORT:-8080}; uses a default value syntax not supported by envsubst.
  • upstream blocks are defined with variables like server ${BACKEND_SERVICE_URL};, which is not a valid way to use variables for upstream servers. Nginx will fail to parse this.

If this file is intended for use, it needs to be fixed. If it's a leftover or an example, it should be removed or clearly marked as such to avoid confusion.

Comment on lines +19 to +36
RUN echo '#!/bin/sh' > /docker-entrypoint.sh && \
echo 'set -e' >> /docker-entrypoint.sh && \
echo 'export PORT=${PORT:-8080}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_BACKEND_URL=${AGENTNAV_BACKEND_URL:-${BACKEND_SERVICE_URL:-}}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_FRONTEND_URL=${AGENTNAV_FRONTEND_URL:-${FRONTEND_SERVICE_URL:-}}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_GEMMA_URL=${AGENTNAV_GEMMA_URL:-${GEMMA_SERVICE_URL:-_disabled_}}' >> /docker-entrypoint.sh && \
echo 'export PROMPT_VAULT_BACKEND_URL=${PROMPT_VAULT_BACKEND_URL:-_disabled_}' >> /docker-entrypoint.sh && \
echo 'export PROMPT_VAULT_FRONTEND_URL=${PROMPT_VAULT_FRONTEND_URL:-_disabled_}' >> /docker-entrypoint.sh && \
echo 'export CURSOR_IDE_BACKEND_URL=${CURSOR_IDE_BACKEND_URL:-_disabled_}' >> /docker-entrypoint.sh && \
echo 'export CURSOR_IDE_FRONTEND_URL=${CURSOR_IDE_FRONTEND_URL:-_disabled_}' >> /docker-entrypoint.sh && \
echo 'envsubst '"'"'$$PORT $$AGENTNAV_BACKEND_URL $$AGENTNAV_FRONTEND_URL $$AGENTNAV_GEMMA_URL $$PROMPT_VAULT_BACKEND_URL $$PROMPT_VAULT_FRONTEND_URL $$CURSOR_IDE_BACKEND_URL $$CURSOR_IDE_FRONTEND_URL'"'"' < /etc/nginx/templates/nginx.conf.template > /etc/nginx/nginx.conf' >> /docker-entrypoint.sh && \
echo 'echo "✅ Nginx config generated"' >> /docker-entrypoint.sh && \
echo 'echo " PORT=${PORT}"' >> /docker-entrypoint.sh && \
echo 'echo " AGENTNAV_BACKEND_URL=${AGENTNAV_BACKEND_URL}"' >> /docker-entrypoint.sh && \
echo 'echo " AGENTNAV_FRONTEND_URL=${AGENTNAV_FRONTEND_URL}"' >> /docker-entrypoint.sh && \
echo 'nginx -t' >> /docker-entrypoint.sh && \
echo 'exec nginx -g "daemon off;"' >> /docker-entrypoint.sh && \
chmod +x /docker-entrypoint.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Creating the docker-entrypoint.sh script using a long chain of echo commands inside the Dockerfile makes it difficult to read, modify, and maintain. It's better practice to create a separate docker-entrypoint.sh file in the nginx-proxy directory and COPY it into the image. This will significantly improve the readability and maintainability of your Docker setup.

Comment on lines +53 to +79
cd /Users/stevenirvin/Documents/GitHub/agentnav
bun run dev # Runs on port 5173
```

**Terminal 2: Agentnav Backend**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav/backend
PORT=8081 uvicorn main:app --host 0.0.0.0 --port 8081 --reload
```

**Terminal 3: Prompt-vault**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav/prompt-vault
./start-local.sh # Starts frontend (5176) and backend (8001)
```

**Terminal 4: Cursor-ide**
```bash
cd /Users/stevenirvin/Documents/GitHub/cursor-ide/frontend
bun run dev # Runs on port 5173 (conflicts with agentnav if both running)
```

**Terminal 5: Nginx Proxy**
```bash
cd /Users/stevenirvin/Documents/GitHub/stevei101/agentnav/nginx-proxy
./test-local.sh # Starts proxy on port 8082
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation contains hardcoded, user-specific absolute paths (e.g., /Users/stevenirvin/...). This makes the instructions not directly usable by other developers. Please replace these with generic placeholders like ~/path/to/your/repo/agentnav or relative paths from the project root to make the documentation more portable.

Comment on lines +26 to +88
cd /Users/stevenirvin/Documents/GitHub/agentnav
# Temporarily change port to 5174
export PORT=5174
bun run dev --port 5174
```

**Terminal 2: Agentnav Backend (use port 8083 to avoid gvproxy)**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav/backend
PORT=8083 uvicorn main:app --host 0.0.0.0 --port 8083 --reload
```

**Terminal 3: Prompt-vault (ports already configured)**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav/prompt-vault
./start-local.sh
# This starts:
# - Frontend on 5176
# - Backend on 8001
```

**Terminal 4: Cursor-ide (already running)**
- Frontend: Already on 5173 ✅
- Backend: Already on 8188 ✅

**Terminal 5: Nginx Proxy**
```bash
cd /Users/stevenirvin/Documents/GitHub/stevei101/agentnav/nginx-proxy
# Update ports in test script or set env vars:
export AGENTNAV_FRONTEND_PORT=5174
export AGENTNAV_BACKEND_PORT=8083
./test-local.sh
```

### Option 2: Run Without Cursor-ide (Simpler)

If you don't need cursor-ide running simultaneously:

**Terminal 1: Agentnav Frontend**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav
bun run dev # Uses port 5173 (cursor-ide not running)
```

**Terminal 2: Agentnav Backend**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav/backend
PORT=8083 uvicorn main:app --host 0.0.0.0 --port 8083 --reload
```

**Terminal 3: Prompt-vault**
```bash
cd /Users/stevenirvin/Documents/GitHub/agentnav/prompt-vault
./start-local.sh
```

**Terminal 4: Nginx Proxy**
```bash
cd /Users/stevenirvin/Documents/GitHub/stevei101/agentnav/nginx-proxy
export AGENTNAV_FRONTEND_PORT=5173
export AGENTNAV_BACKEND_PORT=8083
./test-local.sh
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This documentation file contains hardcoded user-specific paths (e.g., /Users/stevenirvin/...). This makes the instructions difficult for other developers to follow. Please replace them with generic placeholders like path/to/agentnav to improve portability.

<h2>Agentnav</h2>
<p class="app-description">Multi-agent knowledge exploration system with ADK and A2A Protocol</p>
<div class="app-preview">
<iframe src="/agentnav/" frameborder="0" class="preview-frame" title="Agentnav Preview"></iframe>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The frameborder="0" attribute on <iframe> elements is obsolete in HTML5. This attribute is used on lines 24, 45, and 65. For better standards compliance and maintainability, you should use CSS to control the border. You can add border: none; to your .preview-frame class in styles.css and remove this attribute from all iframe tags.

Suggested change
<iframe src="/agentnav/" frameborder="0" class="preview-frame" title="Agentnav Preview"></iframe>
<iframe src="/agentnav/" class="preview-frame" title="Agentnav Preview"></iframe>

Comment on lines 90 to 94
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
HOST_ADDR="172.17.0.1" # Default Docker bridge IP on Linux
else
HOST_ADDR="host.docker.internal"
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding the host address for Linux as 172.17.0.1 is not always reliable, as the Docker bridge network IP can vary. A more robust approach would be to dynamically determine the host's IP on the Docker network.

Suggested change
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
HOST_ADDR="172.17.0.1" # Default Docker bridge IP on Linux
else
HOST_ADDR="host.docker.internal"
fi
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Try to dynamically find the docker bridge IP, fallback to a common default
HOST_ADDR=$(ip -4 addr show docker0 | grep -oP 'inet \K[\d.]+' || echo "172.17.0.1")
else
HOST_ADDR="host.docker.internal"
fi

export default defineConfig({
plugins: [react()],
server: {
port: 5175,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This Vite config sets the development server port to 5175. However, other files in this PR, such as nginx-proxy/test-local.sh and nginx-proxy/MULTI_APP_SETUP.md, expect it to be on port 5176. This inconsistency can cause confusion and failures during local testing. Please align the port across all relevant files to 5176 for consistency.

Suggested change
port: 5175,
port: 5176,

if [ -f "package.json" ]; then
echo " Testing frontend..."
if command -v bun >/dev/null 2>&1; then
if bun test --run >/tmp/prompt-vault-tests.log 2>&1 2>/dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The command to run prompt-vault tests includes 2>/dev/null, which redirects stderr to null. This could suppress important error messages from the test runner, potentially hiding real test failures or configuration issues. It's better to let stderr be printed or logged to the file so that failures can be debugged.

Suggested change
if bun test --run >/tmp/prompt-vault-tests.log 2>&1 2>/dev/null; then
if bun test --run >/tmp/prompt-vault-tests.log 2>&1; then

Replace frameborder="0" with CSS border: none; for HTML5 compliance.
Fixes code review comment on PR #239.
Install wget along with gettext to support HEALTHCHECK instruction.
Fixes code review comment on PR #239.
- Fix Linux Docker bridge IP detection (dynamically determine instead of hardcoding)
- Align prompt-vault port to 5176 for consistency across all files
- Remove stderr suppression in test script to allow proper error reporting

Fixes code review comments on PR #239.
stevei101 added a commit that referenced this pull request Nov 9, 2025
Replace frameborder="0" with CSS border: none; for HTML5 compliance.
Fixes code review comment on PR #239.
stevei101 added a commit that referenced this pull request Nov 9, 2025
Install wget along with gettext to support HEALTHCHECK instruction.
Fixes code review comment on PR #239.
stevei101 added a commit that referenced this pull request Nov 9, 2025
- Fix Linux Docker bridge IP detection (dynamically determine instead of hardcoding)
- Align prompt-vault port to 5176 for consistency across all files
- Remove stderr suppression in test script to allow proper error reporting

Fixes code review comments on PR #239.
@stevei101 stevei101 requested a review from Copilot November 9, 2025 23:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive multi-app nginx proxy setup that unifies access to three applications (agentnav, prompt-vault, and cursor-ide) through a single entry point. The changes include a new prompt-vault frontend application with Supabase integration, nginx proxy configuration with routing for all apps, testing infrastructure, and CI/CD updates.

Key changes:

  • New nginx proxy service with multi-app routing and landing page
  • Prompt-vault frontend application (React/TypeScript with Supabase authentication)
  • Terraform variables and outputs for proxy configuration
  • Comprehensive testing scripts for local development
  • CI/CD pipeline updates to build and deploy the proxy service

Reviewed Changes

Copilot reviewed 38 out of 40 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
terraform/variables.tf Adds proxy region and container port variables
terraform/outputs.tf Adds proxy service URL output
nginx-proxy/* Complete nginx proxy implementation with multi-app routing, landing page, and documentation
prompt-vault/frontend/* New React/TypeScript frontend with Supabase, Tailwind CSS, and comprehensive UI components
scripts/test-all-apps.sh Testing script for all three applications
scripts/restart-prompt-vault.sh Utility script for restarting prompt-vault
package.json Updates testing library dependencies
.github/workflows/build.yml Adds proxy service to CI/CD pipeline

export default defineConfig({
plugins: [react()],
server: {
port: 5176,
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port mismatch detected. The vite.config.ts specifies port 5176, but scripts/restart-prompt-vault.sh references port 5175 (line 10, 15, 21). According to the project documentation (nginx-proxy/MULTI_APP_SETUP.md line 18 and START_SERVICES.md line 99), prompt-vault frontend should use port 5176. The restart script should be updated to match.

Copilot generated this review using guidance from repository custom instructions.
echo 'export PORT=${PORT:-8080}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_BACKEND_URL=${AGENTNAV_BACKEND_URL:-${BACKEND_SERVICE_URL:-}}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_FRONTEND_URL=${AGENTNAV_FRONTEND_URL:-${FRONTEND_SERVICE_URL:-}}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_GEMMA_URL=${AGENTNAV_GEMMA_URL:-${GEMMA_SERVICE_URL:-_disabled_}}' >> /docker-entrypoint.sh && \
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent whitespace/indentation. Line 24 has extra leading whitespace (8 spaces instead of 4) compared to surrounding lines (21-23, 25-28). This breaks the visual alignment of the shell script construction.

Suggested change
echo 'export AGENTNAV_GEMMA_URL=${AGENTNAV_GEMMA_URL:-${GEMMA_SERVICE_URL:-_disabled_}}' >> /docker-entrypoint.sh && \
echo 'export AGENTNAV_GEMMA_URL=${AGENTNAV_GEMMA_URL:-${GEMMA_SERVICE_URL:-_disabled_}}' >> /docker-entrypoint.sh && \

Copilot uses AI. Check for mistakes.

# Kill existing processes
pkill -f "vite.*prompt" 2>/dev/null || true
lsof -ti :5175 | xargs kill -9 2>/dev/null || true
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port mismatch. This script attempts to kill processes on port 5175, but the vite.config.ts and other documentation indicate prompt-vault should use port 5176. This will fail to kill the correct process.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +22
if lsof -i :5175 | grep -q LISTEN; then
echo "✅ Prompt Vault running on port 5175"
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port verification checks wrong port. Lines 21-26 verify port 5175, but should check port 5176 to match the vite.config.ts configuration.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants