Add Telegram alerts bot link to monitoring frontend footer#29
Merged
Conversation
Introduces a minimal footer with a "Get alerts" Telegram link. Bot URLs (mainnet/testnet x prd/dev = 4 bots) live as code config in frontend/src/constants.ts. The chain is resolved at runtime from window.location.hostname (testnet domains -> testnet, else mainnet). The prd/dev split is baked into each image at build time via Docker build-args, with strict validation on VITE_DEPLOYMENT_ENV (no fallback). - frontend-dev.yaml (:beta on develop) -> VITE_DEPLOYMENT_ENV=dev - frontend-prd.yaml (:latest on main) -> VITE_DEPLOYMENT_ENV=prd
Danswar
approved these changes
May 7, 2026
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 monitoring frontend (mainnet + testnet, both PRD and DEV) had no footer or social links. Adds a minimal footer with a "Get alerts" Telegram CTA pointing to the env+chain-correct bot.
mainnet|testnet × prd|dev) live as code config infrontend/src/constants.ts— no env variable carries the URL string itself.VITE_DEPLOYMENT_ENVvalidation inconstants.ts(throws on missing/invalid value, no fallback).window.location.hostname(testnet domains → testnet, else mainnet) — the same image is reused for bothmonitoring.juicedollar.comandmonitoring.testnet.juicedollar.com.aria-label="Telegram alerts bot". Footer sticks to the bottom viaflex flex-colon the app shell.Bot mapping (per issue DFXswiss/server#103)
monitoring.juicedollar.com@juicedollar_monitor_prd_botdev.monitoring.juicedollar.com@juicedollar_monitor_dev_botmonitoring.testnet.juicedollar.com@juicedollar_monitor_tst_prd_botdev.monitoring.testnet.juicedollar.com@juicedollar_monitor_tst_dev_botPipeline
buildanddeployjobs).github/workflows/frontend-dev.yaml--build-arg VITE_DEPLOYMENT_ENV=devbuildanddeployjobs).github/workflows/frontend-prd.yaml--build-arg VITE_DEPLOYMENT_ENV=prdfrontend/DockerfileARG/ENVpair beforenpm run build:betaand:latestimages each carry their fixedVITE_DEPLOYMENT_ENV; chain resolved client-side from hostnameTest plan
VITE_DEPLOYMENT_ENV=prd npm run buildsucceeds; bundle contains all 4 bot URLs (chain lookup is runtime).VITE_DEPLOYMENT_ENV=dev npm run buildsucceeds.npm run buildwithout env still bundles (Vite does not execute top-level throw at build); validation throws at page-load — fail-loud at first browser hit, no silent fallback.:betaimage →dev.monitoring.juicedollar.comshows@juicedollar_monitor_dev_bot,dev.monitoring.testnet.juicedollar.comshows@juicedollar_monitor_tst_dev_bot.:latestimage →monitoring.juicedollar.comshows@juicedollar_monitor_prd_bot,monitoring.testnet.juicedollar.comshows@juicedollar_monitor_tst_prd_bot.Notes
d-EURO/monitoring#62(already merged) — same Vite/build-args pattern, plus a chain dimension (window.location.hostnamecheck) because JuiceDollar runs the same image on both Citrea Mainnet and Testnet.DFXswiss/servercompose change is required for this PR. The image is environment-baked; chain selection follows from the hostname.npm run lintreports 3 pre-existing errors unrelated to this PR (PositionsTable.tsx,Table.tsx,api.hook.ts); not addressed here.