Conversation
Introduces WelcomePopup and SupportPopup components to enhance user onboarding and encourage starring the GitHub repo. Updates App.jsx to display these popups, AppSidebar to add a GitHub star link, and useGeneration.js to track generation count for triggering the support popup. Also updates Dockerfile for frontend build and adds railway.json for deployment configuration.
There was a problem hiding this comment.
Pull request overview
Adds onboarding and support UX elements to the frontend, and updates deployment/build configuration to support shipping the UI with the backend service.
Changes:
- Introduces
WelcomePopup(first-visit) andSupportPopup(after N generations) modal components. - Updates app layout and sidebar to surface the popups and a GitHub “Star” call-to-action.
- Updates Docker/Railway deployment configuration and frontend build steps.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| railway.json | Adds Railway build/deploy configuration (dockerfile-based deploy, healthcheck, start command). |
| frontend/src/hooks/useGeneration.js | Tracks successful generations in localStorage and emits an in-app event for triggering support UX. |
| frontend/src/components/shared/WelcomePopup.jsx | New first-run welcome modal with quick-start messaging and GitHub star link. |
| frontend/src/components/shared/SupportPopup.jsx | New support/star modal triggered after a generation threshold. |
| frontend/src/components/layout/AppSidebar.jsx | Adds a persistent “Star on GitHub” link in the sidebar footer. |
| frontend/src/App.jsx | Wires the new popups into the main app layout(s). |
| Dockerfile | Installs Node and builds the Vite frontend during the Docker image build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "dockerfilePath": "Dockerfile" | ||
| }, | ||
| "deploy": { | ||
| "startCommand": "agentsite serve --host 0.0.0.0 --port ${PORT:-6391}", |
There was a problem hiding this comment.
startCommand uses bash-specific parameter expansion (${PORT:-6391}). If the deploy runner executes the command without a shell, this will be passed literally and the server may bind to an invalid port. Prefer using $PORT directly (or set AGENTSITE_PORT from PORT) and keep the defaulting behavior in app settings.
| }, | ||
| "deploy": { | ||
| "startCommand": "agentsite serve --host 0.0.0.0 --port ${PORT:-6391}", | ||
| "healthcheckPath": "/api/models", |
There was a problem hiding this comment.
/api/models performs model discovery via prompture.get_available_models(include_capabilities=True), which can be slow and/or depend on external provider availability. For a deployment healthcheck, consider a lightweight endpoint (e.g. /api/models/default or a dedicated /api/health that does no network work) to avoid false unhealthy restarts.
| // Increment generation counter for support popup | ||
| const count = parseInt(localStorage.getItem("agentsite_generation_count") || "0", 10) + 1; | ||
| localStorage.setItem("agentsite_generation_count", String(count)); |
There was a problem hiding this comment.
The localStorage key for the generation counter is duplicated here as a string, while SupportPopup defines its own COUNT_KEY constant. Consider centralizing these keys in a shared constants module (and importing it in both places) to avoid future mismatches silently breaking the popup trigger.
| COPY frontend/package.json frontend/package-lock.json* frontend/ | ||
| RUN cd frontend && npm install | ||
| COPY frontend/ frontend/ | ||
| RUN cd frontend && npm run build |
There was a problem hiding this comment.
For deterministic and cache-friendly installs in Docker, prefer npm ci (with the lockfile) over npm install. Also consider pruning build-only deps/artifacts (or using a multi-stage build) so the final runtime image doesn’t retain Node/npm and node_modules, which can significantly increase image size.
| RUN apt-get update && apt-get install -y --no-install-recommends curl \ | ||
| && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | ||
| && apt-get install -y --no-install-recommends nodejs \ | ||
| && apt-get clean && rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
The curl -fsSL https://deb.nodesource.com/setup_20.x | bash - pattern downloads and executes a remote script as root during the image build without any integrity verification. If an attacker can compromise DNS/TLS or the remote host, they can inject arbitrary code into this script and silently backdoor the built image or exfiltrate build-time secrets. Use a method that relies on signed packages (e.g., official repositories) or verify the script’s integrity via a pinned checksum or signature before execution instead of piping it directly to bash.
Introduces WelcomePopup and SupportPopup components to enhance user onboarding and encourage starring the GitHub repo. Updates App.jsx to display these popups, AppSidebar to add a GitHub star link, and useGeneration.js to track generation count for triggering the support popup. Also updates Dockerfile for frontend build and adds railway.json for deployment configuration.