Skip to content

feat: add dedicated Space Weather dashboard#120

Merged
krishkhinchi merged 2 commits into
7-Blocks:mainfrom
varshu55:feature/space-weather-dashboard
Jul 22, 2026
Merged

feat: add dedicated Space Weather dashboard#120
krishkhinchi merged 2 commits into
7-Blocks:mainfrom
varshu55:feature/space-weather-dashboard

Conversation

@varshu55

@varshu55 varshu55 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

User description

Description

This PR adds a dedicated Space Weather Dashboard to visualize key space weather conditions.

Changes

  • Added a new /dashboard/space-weather page.
  • Added a Space Weather navigation item in the sidebar.
  • Added metric cards for:
    • KP Index
    • Solar Wind Speed
    • Geomagnetic Storm
    • Radiation Alert
    • Solar Flares
  • Added a Solar Activity section.
  • Added a Coronal Mass Ejections section.
  • Added a Satellite Impact section showing the possible effects of space weather on satellites.
  • Designed the page to match the existing dashboard theme.

Related Issue

Fixes #111


Checklist

  • I have read the contributing guidelines
  • My code follows the project guidelines
  • I have completed testing of my changes
  • Documentation has been updated (if applicable)

Screenshots / Screen Recordings

image image image

Breaking Changes

None.


ECSoC26 Submission

  • ECSoC26-L1 – Beginner
  • ECSoC26-L2 – Intermediate
  • ECSoC26-L3 – Advanced

CodeAnt-AI Description

Add a dedicated Space Weather dashboard

What Changed

  • Added a new Space Weather dashboard page with live-style readings for KP index, solar wind, geomagnetic storm level, radiation alert, and solar flares
  • Added sections for solar activity, coronal mass ejections, and satellite impact so users can review space weather conditions in one place
  • Added a Space Weather item in the main navigation and connected it to its own dashboard route

Impact

✅ Faster access to space weather data
✅ Easier monitoring of satellite and communication risk
✅ Clearer dashboard navigation

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features
    • Added a Live Space Weather Dashboard accessible from the dashboard navigation.
    • Introduces a Space Weather page with key metrics (KP Index, solar wind, geomagnetic storms, radiation alerts, solar flares).
    • Adds visual “Solar Activity”, “Coronal Mass Ejections”, and “Satellite Impact” status sections.
    • Includes new reusable metric/status card components for consistent at-a-glance monitoring.

Greptile Summary

This PR adds a dedicated Space Weather dashboard. The main changes are:

  • A new /dashboard/space-weather route and sidebar item.
  • Metric cards for key space weather conditions.
  • Solar activity, coronal mass ejection, and satellite impact sections.

Confidence Score: 5/5

No additional blocking issue qualifies for this follow-up review.

  • The new route and navigation destination match.
  • The component imports and exports are compatible with the frontend configuration.
  • No distinct production failure requiring a separate fix was found.

Important Files Changed

Filename Overview
frontend/src/App.tsx Registers the Space Weather page under the dashboard layout.
frontend/src/components/layouts/MainLayout.tsx Adds a sidebar link that matches the new route.
frontend/src/components/space-weather/MetricCard.tsx Adds a reusable card for displaying a space weather metric and status.
frontend/src/pages/SpaceWeather.tsx Adds the dashboard metrics and the solar activity, CME, and satellite impact sections.

Reviews (2): Last reviewed commit: "Merge branch 'main' into feature/space-w..." | Re-trigger Greptile

Copilot AI review requested due to automatic review settings July 22, 2026 06:36
@codeant-ai

codeant-ai Bot commented Jul 22, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 0997168 Jul 22, 2026 · 06:36 06:41

Updated in place by CodeAnt AI · last 5 reviews

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation frontend Frontend development size/L Large contribution requiring significant work. size:L Large size type:bug Fixes an existing bug or unexpected behavior. type:documentation Improves project documentation. type:frontend Changes frontend or client-side code. ECSoC26 Official label for ECSoC26 event contributions. ECSoC26-L1 Level 1 contribution for the ECSoC26 event. labels Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a static Space Weather dashboard with metric cards, solar activity, CME, and satellite impact sections. Registers it at /dashboard/space-weather and adds sidebar navigation.

Changes

Space Weather Dashboard

Layer / File(s) Summary
Metric card and dashboard data
frontend/src/components/space-weather/MetricCard.tsx, frontend/src/pages/SpaceWeather.tsx
Defines the metric card props and renders hardcoded dashboard metrics.
Dashboard sections
frontend/src/pages/SpaceWeather.tsx
Adds solar activity visualization, CME status rows, and satellite impact cards.
Dashboard route and navigation
frontend/src/App.tsx, frontend/src/components/layouts/MainLayout.tsx
Registers the nested route and adds the sidebar entry.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant MainLayout
  participant App
  participant SpaceWeather
  participant MetricCard
  User->>MainLayout: Selects Space Weather
  MainLayout->>App: Navigates to /dashboard/space-weather
  App->>SpaceWeather: Renders dashboard
  SpaceWeather->>MetricCard: Supplies metric properties
  MetricCard-->>SpaceWeather: Renders metric card
Loading

Possibly related PRs

Suggested labels: ECSoC26-L2

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Issue #111 asked for a live space weather dashboard, but this PR uses fixed placeholder readings and lacks some requested visualization types. Replace static values with live space-weather data and add the missing requested visualizations such as gauges and heat maps.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changes stay focused on the dashboard, navigation, route, and reusable metric card, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title is concise and clearly describes the main change: a dedicated Space Weather dashboard.
Description check ✅ Passed The description includes the required sections, related issue, checklist, screenshots, breaking changes, and one ECSoC26 option.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@codeant-ai codeant-ai Bot added size:L Large size and removed size:L Large size labels Jul 22, 2026
@github-actions github-actions Bot added AI Artificial Intelligence and Machine Learning enhancement New feature or request type:feature Introduces a new feature or enhancement. labels Jul 22, 2026
Comment on lines +2 to +7
const metrics = [
{
title: "KP Index",
value: "5.2",
status: "Moderate",
footer: "+0.4 from last hour",

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 Static Values Presented As Live

Every visit displays the same KP index and other fixed conditions even though the page calls itself live and the existing useWeatherStatus() hook provides current data. Users therefore receive stale operational information without any loading or failure signal when conditions change or the weather service is unavailable.

Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/pages/SpaceWeather.tsx
Line: 2-7

Comment:
**Static Values Presented As Live**

Every visit displays the same KP index and other fixed conditions even though the page calls itself live and the existing `useWeatherStatus()` hook provides current data. Users therefore receive stale operational information without any loading or failure signal when conditions change or the weather service is unavailable.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +30 to +32
<span className="mt-4 inline-block rounded-full bg-green-500/15 px-3 py-1 text-xs font-semibold text-green-400">
{status}
</span>

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 Warnings Render As Safe

The badge is always green, so Moderate and Active conditions look the same as nominal or safe states. A user scanning the dashboard can therefore interpret an active geomagnetic storm as healthy; the color must vary with the metric severity.

Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/components/space-weather/MetricCard.tsx
Line: 30-32

Comment:
**Warnings Render As Safe**

The badge is always green, so `Moderate` and `Active` conditions look the same as nominal or safe states. A user scanning the dashboard can therefore interpret an active geomagnetic storm as healthy; the color must vary with the metric severity.

How can I resolve this? If you propose a fix, please make it concise.

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 a new Space Weather dashboard route and UI so users can access a dedicated view for space-weather-related metrics directly from the main dashboard navigation.

Changes:

  • Introduced a new /dashboard/space-weather page with metric cards and multiple themed sections (Solar Activity, CMEs, Satellite Impact).
  • Added a Space Weather sidebar navigation item in the main dashboard layout.
  • Registered the new route in the app router.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
frontend/src/pages/SpaceWeather.tsx New Space Weather dashboard page UI and metric/section layout.
frontend/src/components/space-weather/MetricCard.tsx New reusable metric card component for the Space Weather page.
frontend/src/components/layouts/MainLayout.tsx Adds Space Weather to the sidebar navigation.
frontend/src/App.tsx Adds the Space Weather route under /dashboard.

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


const SpaceWeather = () => {
return (
<div className="p-6 space-y-8">
Comment on lines +45 to +52
<h1 className="text-4xl font-bold text-white">
Live Space Weather Dashboard
</h1>

<p className="mt-2 text-gray-400 max-w-3xl">
Monitor real-time solar activity and its impact on satellites,
communication systems, and Earth's space environment.
</p>
icon: "🌍",
},
{
title: "Solar Wind",
Comment thread frontend/src/App.tsx
Comment on lines 42 to 44
<Route path="space-traffic" element={<SpaceTraffic />} />
<Route path="space-weather" element={<SpaceWeather />} />
<Route path="satellites" element={<Satellites />} />

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/components/space-weather/MetricCard.tsx`:
- Around line 30-32: Update the status pill in MetricCard to use status-specific
styling instead of always applying the green classes. Add or reuse a
status-to-severity mapping so statuses such as Moderate and Active render with
appropriate visual states while preserving the displayed status text.

In `@frontend/src/pages/SpaceWeather.tsx`:
- Around line 11-12: Update the solar-wind metric configuration and MetricCard
usage to pass the numeric value as “520” and provide “km/s” through a separate
optional unit prop. Ensure MetricCard renders the unit on its own smaller line
while preserving existing cards that do not specify a unit.
- Around line 2-38: Update the SpaceWeather page’s metrics and dashboard
labeling so it no longer claims live or real-time data while values remain
hardcoded: label the experience as static/demo data and remove or revise
live-data copy. Alternatively, replace the hardcoded metrics array with
telemetry-backed data including freshness, loading, and error states.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 85fc468b-568e-4aef-97f4-f90bbc710499

📥 Commits

Reviewing files that changed from the base of the PR and between 72631d9 and 0997168.

📒 Files selected for processing (4)
  • frontend/src/App.tsx
  • frontend/src/components/layouts/MainLayout.tsx
  • frontend/src/components/space-weather/MetricCard.tsx
  • frontend/src/pages/SpaceWeather.tsx

Comment on lines +30 to +32
<span className="mt-4 inline-block rounded-full bg-green-500/15 px-3 py-1 text-xs font-semibold text-green-400">
{status}
</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Render status-specific colors.

The pill is always styled as green, so statuses such as Moderate and Active appear successful/safe. Add a status-to-style mapping or pass an explicit severity variant so the visual state matches the status text.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/space-weather/MetricCard.tsx` around lines 30 - 32,
Update the status pill in MetricCard to use status-specific styling instead of
always applying the green classes. Add or reuse a status-to-severity mapping so
statuses such as Moderate and Active render with appropriate visual states while
preserving the displayed status text.

Comment on lines +2 to +38
const metrics = [
{
title: "KP Index",
value: "5.2",
status: "Moderate",
footer: "+0.4 from last hour",
icon: "🌍",
},
{
title: "Solar Wind",
value: "520 km/s",
status: "Normal",
footer: "Updated 2 min ago",
icon: "💨",
},
{
title: "Geomagnetic Storm",
value: "G2",
status: "Active",
footer: "NOAA Scale",
icon: "🛰️",
},
{
title: "Radiation Alert",
value: "Low",
status: "Safe",
footer: "Operational",
icon: "☢️",
},
{
title: "Solar Flares",
value: "M1.2",
status: "Moderate",
footer: "Last detected 5 min ago",
icon: "☀️",
},
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== File list ==\n'
git ls-files 'frontend/src/pages/SpaceWeather.tsx' 'frontend/src/components/*' | sed -n '1,120p'

printf '\n== Search live/real-time copy and data fetching in SpaceWeather page ==\n'
rg -n -A3 -B3 -i 'live|real-?time|refresh|fetch\(|axios|useEffect|setInterval|Updated|minutes?|hours?|telemetry|NOAA|space weather' frontend/src/pages/SpaceWeather.tsx frontend/src/components 2>/dev/null || true

printf '\n== Outline SpaceWeather.tsx ==\n'
ast-grep outline frontend/src/pages/SpaceWeather.tsx --view expanded 2>/dev/null || true

printf '\n== Read SpaceWeather.tsx ==\n'
cat -n frontend/src/pages/SpaceWeather.tsx | sed -n '1,220p'

Repository: 7-Blocks/Kepler

Length of output: 28474


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "START"
sed -n '1,220p' frontend/src/pages/SpaceWeather.tsx
echo "END"

Repository: 7-Blocks/Kepler

Length of output: 4712


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Outline MetricCard ==\n'
ast-grep outline frontend/src/components/space-weather/MetricCard.tsx --view expanded 2>/dev/null || true

printf '\n== Read MetricCard ==\n'
cat -n frontend/src/components/space-weather/MetricCard.tsx | sed -n '1,220p'

Repository: 7-Blocks/Kepler

Length of output: 1541


Remove the live-data claim or wire in telemetry.

SpaceWeather.tsx is still driven by hardcoded metrics and status text, so the “Live Space Weather Dashboard” / “real-time” copy is misleading. Either connect it to a live source with freshness/loading/error handling, or label it as static/demo data.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/SpaceWeather.tsx` around lines 2 - 38, Update the
SpaceWeather page’s metrics and dashboard labeling so it no longer claims live
or real-time data while values remain hardcoded: label the experience as
static/demo data and remove or revise live-data copy. Alternatively, replace the
hardcoded metrics array with telemetry-backed data including freshness, loading,
and error states.

Comment on lines +11 to +12
title: "Solar Wind",
value: "520 km/s",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the solar-wind unit separate from the numeric value.

MetricCard renders value as one large heading, so "520 km/s" makes the unit as large as the number and does not match the required 520 plus a smaller km/s line. Add an optional unit prop instead of embedding it in value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/SpaceWeather.tsx` around lines 11 - 12, Update the
solar-wind metric configuration and MetricCard usage to pass the numeric value
as “520” and provide “km/s” through a separate optional unit prop. Ensure
MetricCard renders the unit on its own smaller line while preserving existing
cards that do not specify a unit.

Comment thread frontend/src/App.tsx
<Route path="/dashboard" element={<MainLayout />}>
<Route index element={<Dashboard />} />
<Route path="space-traffic" element={<SpaceTraffic />} />
<Route path="space-weather" element={<SpaceWeather />} />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The new dashboard route is only reachable under /dashboard/space-weather, but every other dashboard module also keeps a legacy top-level redirect. Without adding the matching /space-weather redirect, users following the existing URL pattern will hit the 404 page for this new module. [api mismatch]

Severity Level: Major ⚠️
- ❌ Direct /space-weather URL returns 404 not dashboard.
- ⚠️ Legacy bookmarks to /space-weather break unexpectedly.
- ⚠️ Route behavior inconsistent with other dashboard modules.
Steps of Reproduction ✅
1. Start the frontend app so `App` from `frontend/src/App.tsx:21-66` is mounted by
`frontend/src/main.tsx:1` (per provided code graph).

2. Observe that the main dashboard routes are nested under `/dashboard` in
`frontend/src/App.tsx:40-49`, including `space-traffic`, `satellites`, `debris`,
`collision-center`, `ai-agents`, `mission-planner`, and `settings`.

3. Note the legacy top-level redirects defined at `frontend/src/App.tsx:52-59`, where
`/space-traffic`, `/satellites`, `/debris`, `/collision-center`, `/ai-agents`,
`/mission-planner`, and `/settings` all `Navigate` to their `/dashboard/...` counterparts.

4. Navigate in a browser to `/space-weather`: there is no matching top-level `<Route
path="/space-weather" ...>` (only the nested `<Route path="space-weather" ...>` at
`frontend/src/App.tsx:43`), so React Router falls through to the catch-all `*` route at
`frontend/src/App.tsx:61-62` and renders `NotFound` instead of redirecting to
`/dashboard/space-weather` as users would expect from the established legacy pattern.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** frontend/src/App.tsx
**Line:** 43:43
**Comment:**
	*Api Mismatch: The new dashboard route is only reachable under `/dashboard/space-weather`, but every other dashboard module also keeps a legacy top-level redirect. Without adding the matching `/space-weather` redirect, users following the existing URL pattern will hit the 404 page for this new module.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +30 to +32
<span className="mt-4 inline-block rounded-full bg-green-500/15 px-3 py-1 text-xs font-semibold text-green-400">
{status}
</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The status badge color is hardcoded to green for all states, so warning/active values are rendered as safe and can mislead operators; make the badge styling conditional on severity/status instead of fixed success colors. [incorrect condition logic]

Severity Level: Major ⚠️
- ⚠️ All metric statuses appear healthy regardless of severity.
- ⚠️ Operators may misjudge geomagnetic storm seriousness.
- ⚠️ UI lacks visual distinction for warning or alert states.
Steps of Reproduction ✅
1. In `frontend/src/pages/SpaceWeather.tsx:2-38`, note the `metrics` array defines varied
`status` values such as `"Moderate"`, `"Normal"`, `"Active"`, and `"Safe"`, representing
different severities of space weather conditions.

2. Observe that `SpaceWeather` renders these metrics via `metrics.map` at
`frontend/src/pages/SpaceWeather.tsx:56-66`, passing the `status` field directly into the
`MetricCard` component as the `status` prop.

3. Open `frontend/src/components/space-weather/MetricCard.tsx:1-41` and see that the
`status` text is rendered inside a `<span>` at lines `30-32` with hardcoded Tailwind
classes `bg-green-500/15` and `text-green-400`, which are success/healthy colors,
regardless of the `status` value provided.

4. Run the app, navigate to `/dashboard/space-weather` (route registered at
`frontend/src/App.tsx:40-44`), and observe that all status badges (including potentially
concerning values like `"Active"` storms) are displayed with the same green "healthy"
styling, demonstrating there is no conditional logic to distinguish warning or critical
states visually.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** frontend/src/components/space-weather/MetricCard.tsx
**Line:** 30:32
**Comment:**
	*Incorrect Condition Logic: The status badge color is hardcoded to green for all states, so warning/active values are rendered as safe and can mislead operators; make the badge styling conditional on severity/status instead of fixed success colors.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +2 to +38
const metrics = [
{
title: "KP Index",
value: "5.2",
status: "Moderate",
footer: "+0.4 from last hour",
icon: "🌍",
},
{
title: "Solar Wind",
value: "520 km/s",
status: "Normal",
footer: "Updated 2 min ago",
icon: "💨",
},
{
title: "Geomagnetic Storm",
value: "G2",
status: "Active",
footer: "NOAA Scale",
icon: "🛰️",
},
{
title: "Radiation Alert",
value: "Low",
status: "Safe",
footer: "Operational",
icon: "☢️",
},
{
title: "Solar Flares",
value: "M1.2",
status: "Moderate",
footer: "Last detected 5 min ago",
icon: "☀️",
},
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: This page is presented as “live” and “real-time” but the metric values are hardcoded constants, so the dashboard never updates and quickly becomes stale; wire these values to live data or periodic refresh logic. [incomplete implementation]

Severity Level: Major ⚠️
- ⚠️ Live space weather page shows permanently static values.
- ⚠️ Users may trust outdated KP index readings.
- ⚠️ Real-time monitoring expectations unmet for operators.
Steps of Reproduction ✅
1. Open `frontend/src/pages/SpaceWeather.tsx:45-52` and observe the copy: the H1 is `"Live
Space Weather Dashboard"` and the paragraph promises to "Monitor real-time solar
activity", implying live, updating telemetry.

2. Inspect the `metrics` constant at `frontend/src/pages/SpaceWeather.tsx:2-38`, which
contains hardcoded values such as `"KP Index" = "5.2"`, `"Solar Wind" = "520 km/s"`, and
footers like `"Updated 2 min ago"` and `"Last detected 5 min ago"`, all defined as static
string literals.

3. Notice that the `SpaceWeather` component uses `metrics.map` at
`frontend/src/pages/SpaceWeather.tsx:56-66` to render `MetricCard`s and does not define
any React state, data fetching hooks, or timers—there are no calls to APIs, websockets, or
interval-based update logic anywhere in this file.

4. Run the app and navigate to `/dashboard/space-weather` (route registered at
`frontend/src/App.tsx:40-44`); observe that the metric values and their "Updated X min
ago" labels never change over time or between sessions unless the code itself is modified
and redeployed, confirming that a page marketed as “live” and “real-time” is currently
backed by static, non-refreshing data.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** frontend/src/pages/SpaceWeather.tsx
**Line:** 2:38
**Comment:**
	*Incomplete Implementation: This page is presented as “live” and “real-time” but the metric values are hardcoded constants, so the dashboard never updates and quickly becomes stale; wire these values to live data or periodic refresh logic.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Copilot AI review requested due to automatic review settings July 22, 2026 06:45

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

frontend/src/pages/SpaceWeather.tsx:7

  • The page is labeled as “Live Space Weather Dashboard”, but the top-level metrics are hard-coded strings (KP index, solar wind, storm level, etc.). The codebase already exposes live space-weather data via useWeatherStatus()/api.getWeatherStatus() (e.g., WeatherStatus.kp_index, overall_severity, event counts). This should be wired up so the dashboard reflects current conditions and shows loading/error states instead of static “Updated … ago” text.
const metrics = [
  {
    title: "KP Index",
    value: "5.2",
    status: "Moderate",
    footer: "+0.4 from last hour",

frontend/src/App.tsx:94

  • A legacy redirect is added for every other dashboard subpage (e.g. /space-traffic -> /dashboard/space-traffic), but this new page does not add the analogous /space-weather redirect. For consistency (and to avoid a 404 if users navigate directly), add a legacy redirect route for Space Weather as well.
          <Route path="space-traffic" element={<SpaceTraffic />} />
          <Route path="space-weather" element={<SpaceWeather />} />
          <Route path="satellites" element={<Satellites />} />

Comment on lines +16 to +38
return (
<div className="min-h-[260px] rounded-xl border border-cyan-500/20 bg-slate-900 p-6 transition-all duration-300 hover:-translate-y-1 hover:border-cyan-400 hover:shadow-[0_0_20px_rgba(34,211,238,0.25)]"> <div className="flex items-center justify-between">
<p className="text-sm uppercase tracking-wider text-gray-400">
{title}
</p>

<span className="text-3xl">
{icon}
</span>
</div>
<h2 className="mt-5 text-5xl font-extrabold tracking-tight text-cyan-400">
{value}
</h2>

<span className="mt-4 inline-block rounded-full bg-green-500/15 px-3 py-1 text-xs font-semibold text-green-400">
{status}
</span>

<p className="mt-5 text-sm text-gray-500">
{footer}
</p>
</div>
);
Comment thread frontend/src/App.tsx
<Route path="/dashboard" element={<MainLayout />}>
<Route index element={<Dashboard />} />
<Route path="space-traffic" element={<SpaceTraffic />} />
<Route path="space-weather" element={<SpaceWeather />} />

@krishkhinchi krishkhinchi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!!

@krishkhinchi
krishkhinchi merged commit 22a6054 into 7-Blocks:main Jul 22, 2026
12 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot added ECSoC26-L2 Level 2 contribution for the ECSoC26 event. and removed ECSoC26-L1 Level 1 contribution for the ECSoC26 event. labels Jul 22, 2026
@varshu55

Copy link
Copy Markdown
Contributor Author

Thank you for the review and for merging my PR! I really appreciate it. Looking forward to contributing more. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Artificial Intelligence and Machine Learning bug Something isn't working documentation Improvements or additions to documentation ECSoC26-L2 Level 2 contribution for the ECSoC26 event. ECSoC26 Official label for ECSoC26 event contributions. enhancement New feature or request frontend Frontend development size/L Large contribution requiring significant work. size:L Large size type:bug Fixes an existing bug or unexpected behavior. type:documentation Improves project documentation. type:feature Introduces a new feature or enhancement. type:frontend Changes frontend or client-side code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a Live Space Weather Dashboard

3 participants