Skip to content

Dev#59

Open
haoruizhou wants to merge 4 commits intomainfrom
dev
Open

Dev#59
haoruizhou wants to merge 4 commits intomainfrom
dev

Conversation

@haoruizhou
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d7593b480

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const GRAFANA_BRIDGE_URL =
import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
"http://localhost:3001/api/grafana";
const GRAFANA_BRIDGE_URL = "https://grafana-proxy.westernformularacing.workers.dev/grafana-bridge/api/grafana";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep Grafana bridge URL configurable via env

Hard-coding the bridge endpoint here removes VITE_GRAFANA_BRIDGE_URL support and the localhost fallback, so local, staging, and self-hosted deployments can no longer point to their own bridge and will always call the production worker URL. This is a functional regression from the previous behavior and will fail anywhere that URL is unreachable or not the intended backend.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes how the Grafana bridge/proxy base URL is configured in the frontend by hardcoding it to a specific hosted endpoint.

Changes:

  • Replaced the environment-variable-based GRAFANA_BRIDGE_URL configuration with a hardcoded Cloudflare Workers URL.
  • Commented out the previous import.meta.env.VITE_GRAFANA_BRIDGE_URL and localhost fallback lines.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4 to +6
const GRAFANA_BRIDGE_URL = "https://grafana-proxy.westernformularacing.workers.dev/grafana-bridge/api/grafana";
// import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
// "http://localhost:3001/api/grafana";
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

GRAFANA_BRIDGE_URL is now hard-coded to a single production URL, which removes the existing ability to configure the bridge via VITE_GRAFANA_BRIDGE_URL (and breaks local/dev deployments). Suggest restoring the env-based configuration with a sensible default/fallback, and only use the worker URL as the default if that’s intended.

Suggested change
const GRAFANA_BRIDGE_URL = "https://grafana-proxy.westernformularacing.workers.dev/grafana-bridge/api/grafana";
// import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
// "http://localhost:3001/api/grafana";
const GRAFANA_BRIDGE_URL =
import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
"https://grafana-proxy.westernformularacing.workers.dev/grafana-bridge/api/grafana";
// For local development you can run a local bridge and set:
// VITE_GRAFANA_BRIDGE_URL=http://localhost:3001/api/grafana

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
// In production the bridge runs in daq-server-components alongside Grafana.
// Set VITE_GRAFANA_BRIDGE_URL to the tunnel/public URL of the bridge service.
// Example: https://grafana-bridge.westernformularacing.org/api/grafana
const GRAFANA_BRIDGE_URL =
import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
"http://localhost:3001/api/grafana";
const GRAFANA_BRIDGE_URL = "https://grafana-proxy.westernformularacing.workers.dev/grafana-bridge/api/grafana";
// import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
// "http://localhost:3001/api/grafana";
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The header comment says to set VITE_GRAFANA_BRIDGE_URL, but the code no longer reads it (it’s commented out). Update the comment to match the actual configuration behavior, or re-enable the env var usage so the documentation stays accurate.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +6
// import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
// "http://localhost:3001/api/grafana";
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The commented-out fallback lines are indented inconsistently, which makes it look like they belong to a wrapped expression. If you keep these comments, align them with the surrounding code (or remove them) to avoid confusion.

Suggested change
// import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
// "http://localhost:3001/api/grafana";
// import.meta.env.VITE_GRAFANA_BRIDGE_URL ||
// "http://localhost:3001/api/grafana";

Copilot uses AI. Check for mistakes.
Use Grafana proxy URL in telemetry CI

Adds setActiveDbcText() so external code (e.g. DbcService) can update
the active DBC text without reaching into module internals.

Add Grafana proxy worker and DBC auto-load
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying daq-radio with  Cloudflare Pages  Cloudflare Pages

Latest commit: ba6872f
Status:🚫  Build failed.

View logs

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.

3 participants