Skip to content

Add welcome and support popups to frontend UI#5

Merged
jhd3197 merged 1 commit into
mainfrom
dev
Feb 2, 2026
Merged

Add welcome and support popups to frontend UI#5
jhd3197 merged 1 commit into
mainfrom
dev

Conversation

@jhd3197

@jhd3197 jhd3197 commented Feb 2, 2026

Copy link
Copy Markdown
Owner

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.

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.
Copilot AI review requested due to automatic review settings February 2, 2026 02:03
@jhd3197 jhd3197 merged commit 7a57c74 into main Feb 2, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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) and SupportPopup (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.

Comment thread railway.json
"dockerfilePath": "Dockerfile"
},
"deploy": {
"startCommand": "agentsite serve --host 0.0.0.0 --port ${PORT:-6391}",

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread railway.json
},
"deploy": {
"startCommand": "agentsite serve --host 0.0.0.0 --port ${PORT:-6391}",
"healthcheckPath": "/api/models",

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

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

/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.

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +66
// Increment generation counter for support popup
const count = parseInt(localStorage.getItem("agentsite_generation_count") || "0", 10) + 1;
localStorage.setItem("agentsite_generation_count", String(count));

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
Comment on lines +17 to +20
COPY frontend/package.json frontend/package-lock.json* frontend/
RUN cd frontend && npm install
COPY frontend/ frontend/
RUN cd frontend && npm run build

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
Comment on lines +4 to +7
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/*

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

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

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.

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