ci(deploy): emit networkDashboardPlatformUrl into deployed config.js#19
Merged
Conversation
…et + mainnet
The SPA reads `c.networkDashboardPlatformUrl` from the bundled public/config.js
(src/lib/config.ts:13,44-45) to build its WebSocket URL. The deploy workflow
was writing only the legacy `councilPlatformUrl` key, so the production
config.js had no networkDashboardPlatformUrl — the SPA fell into its
"no WS configured → disconnected" path on both dashboard-testnet and dashboard
mainnet.
Wire the new GH secret through both jobs:
- testnet job: env NETWORK_DASHBOARD_PLATFORM_URL ← secrets.NETWORK_DASHBOARD_PLATFORM_URL
- mainnet job: env NETWORK_DASHBOARD_PLATFORM_URL ← secrets.MAINNET_NETWORK_DASHBOARD_PLATFORM_URL
Add the var to both presence + https:// validation loops, and emit
networkDashboardPlatformUrl: Deno.env.get('NETWORK_DASHBOARD_PLATFORM_URL')
alongside the existing councilPlatformUrl line.
councilPlatformUrl is intentionally left in place — separate concern.
Driven by wire-network-dashboard-to-platform-1.
8 tasks
AquiGorka
added a commit
that referenced
this pull request
May 21, 2026
## Summary Tigris' edge serves bucket objects with a default 1-hour cache TTL. `config.js` carries deploy-time substitutions (WS URL, RPC URL, council platform URL, etc.) — a 1-hour stale window means users see the previous deploy's config for up to an hour after a redeploy, with no way to refresh besides a `Cache-Control: no-cache` bypass. Hit this directly on the v0.2.13 deploy (PR #19): mainnet refreshed promptly because the edge cache happened to be cold, testnet served the pre-deploy config.js for ~1h because the edge cache was warm with the older object. ## What ships After each `aws s3 sync` upload, run a targeted follow-up: ```bash aws s3 cp public/config.js s3://<bucket>/config.js \ --endpoint-url https://fly.storage.tigris.dev \ --acl public-read \ --cache-control "no-cache, max-age=0" \ --content-type text/javascript \ --no-progress ``` This overwrites the object metadata with `cache-control: no-cache, max-age=0`. `content-type` is set explicitly to `text/javascript` because `aws s3 cp` doesn't always infer the mime type when re-uploading an object with overridden metadata. Other bucket assets (app.js, app.js.map, styles.css, index.html, world-map.svg, health.json) keep the bucket default — `config.js` is the only deploy-time-substituted artifact that needs the no-cache treatment. Mirrored on both branches: - testnet: `s3://network-dashboard/config.js` - mainnet: `s3://mainnet-network-dashboard/config.js` ## Commits 1. `ci(deploy): force no-cache on config.js to avoid edge-cache lag on redeploys` 2. `chore: release v0.2.14` ## Test plan - [x] `deno fmt --check` clean - [x] `deno lint` clean - [x] `deno task check` clean - [x] `deno task test` — 13 passed - [x] `deno task build` clean - [ ] After merge: `curl -I https://dashboard-testnet.moonlightprotocol.io/config.js` shows `cache-control: no-cache, max-age=0` - [ ] After merge: `curl -I https://dashboard.moonlightprotocol.io/config.js` shows `cache-control: no-cache, max-age=0` - [ ] Spot-check `curl -I https://dashboard.moonlightprotocol.io/app.js` still shows `cache-control: public, max-age=3600` (other assets unchanged) Driven by `/Users/theahaco/repos/pm-theahaco/prompts/wire-network-dashboard-to-platform-1-prompt.md`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The SPA reads
c.networkDashboardPlatformUrlfrom the bundledpublic/config.js(src/lib/config.ts:13,44-45) to build its WebSocket URL. The deploy workflow was emitting only the legacycouncilPlatformUrlkey, so the productionconfig.jshad nonetworkDashboardPlatformUrl— the SPA fell into its "no WS configured → disconnected" path on bothdashboard-testnet.moonlightprotocol.ioanddashboard.moonlightprotocol.io. The backend itself is healthy at v0.1.3 on both envs (https://dashboard-api-testnet.moonlightprotocol.io/api/v1/healthandhttps://dashboard-api.moonlightprotocol.io/api/v1/healthboth return 200).This PR wires the new GH secret through both deploy jobs:
env NETWORK_DASHBOARD_PLATFORM_URL←secrets.NETWORK_DASHBOARD_PLATFORM_URLenv NETWORK_DASHBOARD_PLATFORM_URL←secrets.MAINNET_NETWORK_DASHBOARD_PLATFORM_URLThe GH secrets were provisioned in iac (local-only repo) alongside this PR and verified present via
gh secret list -R Moonlight-Protocol/network-dashboard.The two validation loops (presence +
https://) and theDeno.env.get(...)config block were all updated to include the new var.councilPlatformUrlis intentionally left in place — separate concern.Commits
ci(deploy): emit networkDashboardPlatformUrl into config.js for testnet + mainnetchore: release v0.2.13Test plan
deno fmt --checkcleandeno lintcleandeno task checkcleandeno task test— 13 passeddeno task buildcleanNETWORK_DASHBOARD_PLATFORM_URLandMAINNET_NETWORK_DASHBOARD_PLATFORM_URLare present on the repo (verified pre-PR)curl -s https://dashboard-testnet.moonlightprotocol.io/config.js | grep networkDashboardPlatformUrlshows the live testnet backend URLcurl -s https://dashboard.moonlightprotocol.io/config.js | grep networkDashboardPlatformUrlshows the live mainnet backend URLSymptom this fixes
Both deployed dashboards currently show a "Disconnected" banner. Cause: config.js missing the key the SPA expects + the GH secret was never set. This PR fixes the deploy pipeline; the iac side already set the secrets.
Driven by
/Users/theahaco/repos/pm-theahaco/prompts/wire-network-dashboard-to-platform-1-prompt.md.