Skip to content

ci(pages): switch the gateway and notification service on with repository variables - #399

Merged
PastaPastaPasta merged 2 commits into
masterfrom
ci/p0r-pages-services
Oct 5, 2026
Merged

PastaPastaPasta merged 2 commits into
masterfrom
ci/p0r-pages-services

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

What

The Pages build reads the optional services' URLs from repository variables:

Repository variable Build variable Turns on
PAGES_GATEWAY_URL NEXT_PUBLIC_GATEWAY_URL the HTTPS clone row of a forge-gateway
PAGES_GATEWAY_LABEL NEXT_PUBLIC_GATEWAY_LABEL the name in that row (default "dashhq gateway")
PAGES_NOTIFY_URL NEXT_PUBLIC_NOTIFY_URL Settings → Notifications → Email and push, for a forge-notify

An unset variable reaches the build as an empty string, which Next would inline as "". The build step unsets empty ones (and PAGES_DEVNET_NOTICE, which had the same problem), so the Pages build stays byte-identical to a rebuild that leaves them out.

docs/hosting/forge-gateway.md and docs/hosting/forge-notify.md say how to turn each one on and off, and their dashhq checklists now point at the variables. docs/guides/verify-the-app.md names the variables a rebuild must repeat.

Why

The gateway and forge-notify shipped (#380, #387). The web app shows them only when its build names their URL, and the Pages workflow had no way to pass one, so turning them on for forge.dashhq.org meant editing the workflow. Now it takes a variable and a deploy, and the features stay hidden until the services are up.

How tested

  • An unset variable makes ${{ vars.X }} an empty string. gatewayConfig (lib/gateway.ts) and normalizeUrl (lib/notify/config.ts) both read an empty string as "no service", and both have unit tests for that. The repository has no Actions variables set today (gh api repos/PastaPastaPasta/dash-forge/actions/variables), so the next deploy is unchanged: no HTTPS clone row, no email and push section.
  • The unset loop, run under bash with a mix of empty and set values, leaves only the set ones in the environment. The workflow parses as YAML.
  • Reviewed with code-review-validator: one Medium (empty strings inlined; fixed by the unset loop and the verify-the-app note) and three Low doc points (https for the gateway, loopback http for notify, run the workflow on master instead of re-running an old run), all fixed. After merge I'll check the live site still shows neither feature.

Limits

  • The variables are read at build time. Changing one takes effect on the next deploy (run the workflow on master, or push to master), like PAGES_DEVNET_NOTICE.
  • The clone box doesn't check that the gateway is up before showing the row, so set the variable only once the gateway answers.

🤖 Generated with Claude Code

…tory variables

The Pages build passes PAGES_GATEWAY_URL, PAGES_GATEWAY_LABEL and PAGES_NOTIFY_URL through to NEXT_PUBLIC_GATEWAY_URL, NEXT_PUBLIC_GATEWAY_LABEL and NEXT_PUBLIC_NOTIFY_URL. Unset variables pass empty strings, which the app reads as no service, so both features stay hidden until the owner sets them. The hosting docs say how to turn each one on and off.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bbb0f8a1-0bdd-4c1b-96c4-16357ff4e722
📥 Commits

Reviewing files that changed from the base of the PR and between 232137b and 8d8d72b.

📒 Files selected for processing (4)
  • .github/workflows/pages.yml
  • docs/guides/verify-the-app.md
  • docs/hosting/forge-gateway.md
  • docs/hosting/forge-notify.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…w to rebuild one that names them

An unset repository variable arrives as an empty string, which Next inlines, so the Pages build no longer matched a rebuild that leaves the variable out. The build step now unsets empty ones. verify-the-app.md names the service variables a rebuild must repeat, and the hosting docs say to run the workflow on master rather than re-run an old run, use https for the gateway, and that notify accepts a loopback http service.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit 41c96e3 into master Oct 5, 2026
10 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the ci/p0r-pages-services branch October 5, 2026 14:53
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.

1 participant