Skip to content

feat: add Earth day/night terminator visualization - #99

Merged
krishkhinchi merged 2 commits into
7-Blocks:mainfrom
Ayush-0918:feat/earth-day-night-terminator-92
Jul 20, 2026
Merged

krishkhinchi merged 2 commits into
7-Blocks:mainfrom
Ayush-0918:feat/earth-day-night-terminator-92

Conversation

@Ayush-0918

@Ayush-0918 Ayush-0918 commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

User description

Description

This PR adds a real-time Earth day/night terminator visualization to the Cesium globe.

Changes

  • Enabled Cesium globe lighting for realistic day/night shading.
  • Added a reusable illumination.ts utility to determine whether a satellite is sunlit or inside Earth's shadow.
  • Updated satellite rendering to visually dim satellites while they are in Earth's shadow.
  • Optimized illumination calculations by:
    • Computing the satellite Cartesian3 position once per satellite.
    • Computing the current JulianDate once per update.
    • Reusing the illumination result for both color and outline rendering.

Related Issue

Fixes #92

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)

If you were not able to complete testing because the project currently has unrelated TypeScript/build errors, leave the testing box unchecked.

Screenshots / Screen Recordings

Screenshot 2026-07-21 at 2 22 08 AM Screenshot 2026-07-21 at 2 24 41 AM Screenshot 2026-07-21 at 2 25 50 AM

Breaking Changes

No breaking changes.


ECSoC26 Submission

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

CodeAnt-AI Description

Make satellites dim when they pass into Earth’s shadow and show a lit day/night globe

What Changed

  • The globe now uses real day/night lighting, so the Earth shows a visible terminator line.
  • Satellites are dimmed when they are not sunlit, making shadowed objects easier to distinguish from lit ones.
  • Sunlit and shadowed satellites keep their size and highlighting, but their brightness changes based on whether they are in Earth’s shadow.

Impact

✅ Clearer Earth day/night view
✅ Easier to spot shadowed satellites
✅ More realistic globe lighting

💡 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
    • Satellite markers now update in real time to reflect illumination status, with brighter styling when sunlit and dimmer styling when Earth-shadowed.
    • Globe lighting has been enabled to improve overall visual realism and how lighting affects the scene.

Greptile Summary

This PR adds real-time Earth day/night terminator visualization by enabling Cesium globe lighting and introducing illumination.ts, which computes per-satellite shadow status via a sun-position / ellipsoid ray-intersection test.

  • Previously flagged issues (missing import, Matrix4 vs Matrix3 API, unused globe parameter, JulianDate.now() inside the loop) are all resolved in this revision.
  • The core shadow-detection logic is correct: a ray from the satellite toward the sun is tested against WGS84; if Earth intersects that ray closer than the sun the satellite is dimmed.
  • One remaining efficiency gap: computeSunPositionInEarthInertialFrame and computeTemeToPseudoFixedMatrix are called once per satellite per frame rather than once per frame, repeating identical work for every object in the scene.

Confidence Score: 5/5

Safe to merge; the illumination logic is geometrically correct and all blocking issues from earlier reviews have been addressed.

The shadow-detection algorithm is sound: the Matrix3 API is used correctly, the globe ellipsoid is referenced through the parameter rather than hardcoded, the import is present, and JulianDate allocation is hoisted outside the per-satellite loop. Remaining feedback is about a redundant per-satellite sun-position recomputation and a formatting inconsistency, neither of which affects correctness.

No files require special attention beyond the optional refactor in illumination.ts to hoist sun-position computation out of per-satellite calls.

Important Files Changed

Filename Overview
frontend/src/utils/illumination.ts New utility computing satellite illumination via sun-position / ellipsoid ray test; previously flagged Matrix3/globe issues are fixed, but sun position and TEME matrix are recomputed on every per-satellite call.
frontend/src/components/EarthTwin.tsx Import and JulianDate hoisting are correct; minor indentation inconsistency introduced around the nowJulian and sunlit lines.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant ET as EarthTwin.tsx
    participant IL as illumination.ts
    participant CES as Cesium APIs

    ET->>ET: JulianDate.now() [once per frame]
    loop for each satellite
        ET->>ET: "keplerToLatLonAlt(obj) → {lat,lon,alt}"
        ET->>ET: Cartesian3.fromDegrees(lon,lat,alt)
        ET->>IL: isSatelliteSunlit(cartPos, nowJulian, globe)
        IL->>CES: Simon1994.computeSunPositionInEarthInertialFrame(julianDate)
        IL->>CES: Transforms.computeTemeToPseudoFixedMatrix(julianDate)
        IL->>CES: Matrix3.multiplyByVector(teme, sunInertial) → sunPosFixed
        IL->>CES: IntersectionTests.rayEllipsoid(ray, ellipsoid)
        IL-->>ET: boolean (sunlit)
        ET->>CES: "viewer.entities.add({ color based on sunlit })"
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant ET as EarthTwin.tsx
    participant IL as illumination.ts
    participant CES as Cesium APIs

    ET->>ET: JulianDate.now() [once per frame]
    loop for each satellite
        ET->>ET: "keplerToLatLonAlt(obj) → {lat,lon,alt}"
        ET->>ET: Cartesian3.fromDegrees(lon,lat,alt)
        ET->>IL: isSatelliteSunlit(cartPos, nowJulian, globe)
        IL->>CES: Simon1994.computeSunPositionInEarthInertialFrame(julianDate)
        IL->>CES: Transforms.computeTemeToPseudoFixedMatrix(julianDate)
        IL->>CES: Matrix3.multiplyByVector(teme, sunInertial) → sunPosFixed
        IL->>CES: IntersectionTests.rayEllipsoid(ray, ellipsoid)
        IL-->>ET: boolean (sunlit)
        ET->>CES: "viewer.entities.add({ color based on sunlit })"
    end
Loading

Comments Outside Diff (1)

  1. frontend/src/components/EarthTwin.tsx, line 175-194 (link)

    P2 The PR description claims "Computing the current JulianDate once per update," but Cesium.JulianDate.now() is called inside objects.forEach, allocating a new object per satellite. With 500 objects this is 500 allocations. Moving it above the loop matches the stated intent and eliminates the redundancy.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: frontend/src/components/EarthTwin.tsx
    Line: 175-194
    
    Comment:
    The PR description claims "Computing the current JulianDate once per update," but `Cesium.JulianDate.now()` is called inside `objects.forEach`, allocating a new object per satellite. With 500 objects this is 500 allocations. Moving it above the loop matches the stated intent and eliminates the redundancy.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (2): Last reviewed commit: "fix: address review feedback" | Re-trigger Greptile

@codeant-ai

codeant-ai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 8879179 Jul 20, 2026 · 18:05 18:09

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/M Medium-sized contribution. size:M This PR changes 30-99 lines, ignoring generated files 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-L3 Level 3 contribution for the ECSoC26 event. labels Jul 20, 2026
@codeant-ai codeant-ai Bot removed the size:M This PR changes 30-99 lines, ignoring generated files label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Satellite illumination is calculated with Cesium geometry, then used to adjust satellite point transparency. Cesium globe lighting is enabled during viewer initialization.

Changes

Satellite illumination visualization

Layer / File(s) Summary
Sunlight intersection calculation
frontend/src/utils/illumination.ts
Adds isSatelliteSunlit, which transforms the Sun position, casts a ray toward it, and checks WGS84 ellipsoid intersections.
Sunlight-aware satellite rendering
frontend/src/components/EarthTwin.tsx
Uses computed sunlit status for point alpha styling and enables Cesium globe lighting.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant EarthTwin
  participant isSatelliteSunlit
  participant CesiumGlobe
  EarthTwin->>isSatelliteSunlit: provide satellite position and Julian date
  isSatelliteSunlit->>CesiumGlobe: test Sun ray against WGS84 ellipsoid
  CesiumGlobe-->>isSatelliteSunlit: return intersection result
  isSatelliteSunlit-->>EarthTwin: return sunlit status
  EarthTwin->>CesiumGlobe: apply point color and outline alpha
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The implementation has runtime and math defects, so it does not reliably deliver the requested real-time terminator visualization. Import isSatelliteSunlit in EarthTwin.tsx, fix the Matrix3 sun-position transform in illumination.ts, and verify the feature renders correctly.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changes stay focused on globe lighting and satellite illumination, with no obvious unrelated scope added.
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 accurately summarizes the main change: Earth day/night terminator visualization.
Description check ✅ Passed The description matches the template with all required sections, a linked issue, screenshots, checklist, and one ECSoC26 box.
✨ 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 the size:M This PR changes 30-99 lines, ignoring generated files label Jul 20, 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 20, 2026
Comment thread frontend/src/components/EarthTwin.tsx Outdated
Comment on lines +194 to +195
const nowJulian = Cesium.JulianDate.now();
const sunlit = isSatelliteSunlit(cartPos, nowJulian, viewer.scene.globe);

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: JulianDate.now() is called inside the per-satellite loop, so you recalculate time thousands of times per refresh and get slightly different timestamps across entities in one render pass. Compute the timestamp once before iterating and reuse it for every satellite in that update. [performance]

Severity Level: Major ⚠️
- ⚠️ Extra CPU per refresh for every catalog object.
- ⚠️ Slightly inconsistent sunlit state within one refresh.
- ⚠️ Reduced performance headroom for larger satellite counts.
Steps of Reproduction ✅
1. In `frontend/src/components/EarthTwin.tsx` lines 150–170, `populateEntities` is defined
as a `useCallback` that fetches `objects` and then iterates them with `objects.forEach(obj
=> { ... })` (verified via BulkRead and Grep).

2. Inside this loop at lines 193–195, the code computes `cartPos` and then calls `const
nowJulian = Cesium.JulianDate.now();` followed by `const sunlit =
isSatelliteSunlit(cartPos, nowJulian, viewer.scene.globe);`, so `JulianDate.now()` is
executed once per satellite.

3. Further down in the same file, at lines 360–365 (Grep result), the Cesium viewer
initialization logic calls `populateEntities(viewer);` once after setup and again inside a
`setInterval(() => { if (viewerRef.current && !viewerRef.current.isDestroyed()) {
populateEntities(viewerRef.current); } }, …);`, so this per-satellite loop runs on every
refresh.

4. With thousands of catalog objects, each refresh of `populateEntities` calls
`Cesium.JulianDate.now()` thousands of times in rapid succession inside a single update
cycle, instead of computing it once per refresh and reusing it.

5. Because `JulianDate.now()` advances slightly between calls, satellites in the same
frame end up using slightly different `julianDate` values for `isSatelliteSunlit`,
creating avoidable overhead and small illumination inconsistencies across entities in a
single render pass.

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/EarthTwin.tsx
**Line:** 194:195
**Comment:**
	*Performance: `JulianDate.now()` is called inside the per-satellite loop, so you recalculate time thousands of times per refresh and get slightly different timestamps across entities in one render pass. Compute the timestamp once before iterating and reuse it for every satellite in that update.

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 thread frontend/src/utils/illumination.ts Outdated
Comment on lines +14 to +32
globe: Cesium.Globe
): boolean {
// Compute Sun position in the Earth‑Centered Inertial (ECI) frame.
const sunPosInertial = new Cesium.Cartesian3();
Cesium.Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(julianDate, sunPosInertial);

// Convert Sun position to Earth‑Fixed frame.
const temeToFixed = Cesium.Transforms.computeTemeToPseudoFixedMatrix(julianDate);
const sunPosFixed = Cesium.Matrix4.multiplyByPoint(temeToFixed, sunPosInertial, new Cesium.Cartesian3());

// Vector from satellite to Sun.
const satToSun = Cesium.Cartesian3.subtract(sunPosFixed, position, new Cesium.Cartesian3());
const direction = Cesium.Cartesian3.normalize(satToSun, new Cesium.Cartesian3());

// Ray from satellite toward the Sun.
const ray = new Cesium.Ray(position, direction);

// Test intersection with Earth's ellipsoid (WGS84).
const intersection = Cesium.IntersectionTests.rayEllipsoid(ray, Cesium.Ellipsoid.WGS84);

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 function contract says the globe argument is used for ellipsoid reference, but the implementation ignores it and hardcodes Ellipsoid.WGS84. This mismatch makes the API misleading and breaks correctness if the scene ellipsoid differs from WGS84; use globe.ellipsoid (or remove the parameter and docs if intentionally fixed). [docstring mismatch]

Severity Level: Major ⚠️
- ⚠️ API suggests configurable ellipsoid but always uses WGS84.
- ⚠️ Misleads callers reusing function for non-Earth globes.
- ⚠️ Harder to adapt illumination logic to custom ellipsoids.
Steps of Reproduction ✅
1. In `frontend/src/utils/illumination.ts` lines 7–10, the JSDoc for `isSatelliteSunlit`
states `@param globe - The Cesium Globe instance (used for ellipsoid reference).`,
documenting that the `globe` parameter controls which ellipsoid is used.

2. The function signature at lines 11–15 is `export function isSatelliteSunlit(position:
Cesium.Cartesian3, julianDate: Cesium.JulianDate, globe: Cesium.Globe): boolean {`,
clearly accepting a `globe` argument.

3. Inside the function body, the only ellipsoid reference occurs at line 32: `const
intersection = Cesium.IntersectionTests.rayEllipsoid(ray, Cesium.Ellipsoid.WGS84);`, which
hardcodes `Cesium.Ellipsoid.WGS84` instead of using `globe.ellipsoid`.

4. Grep results for `isSatelliteSunlit` show no other use of `globe` within this file
beyond the parameter and doc comment, confirming that the passed-in `globe` is completely
ignored in the implementation.

5. As a result, callers such as `frontend/src/components/EarthTwin.tsx` line 195
(`isSatelliteSunlit(cartPos, nowJulian, viewer.scene.globe)`) cannot actually influence
the ellipsoid used by the intersection test, and if a non-WGS84 globe were ever passed,
the function would still assume WGS84, contradicting its documented contract.

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/utils/illumination.ts
**Line:** 14:32
**Comment:**
	*Docstring Mismatch: The function contract says the `globe` argument is used for ellipsoid reference, but the implementation ignores it and hardcodes `Ellipsoid.WGS84`. This mismatch makes the API misleading and breaks correctness if the scene ellipsoid differs from WGS84; use `globe.ellipsoid` (or remove the parameter and docs if intentionally fixed).

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
👍 | 👎

@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: 2

🤖 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/EarthTwin.tsx`:
- Around line 193-202: Update the satellite styling flow around
isSatelliteSunlit and the entity created in populateEntities so point color and
outlineColor react to the current Cesium clock time. Recompute sunlit state on
clock ticks or use time-varying Cesium properties, while preserving the existing
lit and shadow color values and avoiding dependence on the five-minute entity
rebuild.

In `@frontend/src/utils/illumination.ts`:
- Around line 20-22: Update the Sun-position conversion in the illumination
utility to use the inertial-frame transform matching sunPosInertial, and apply
it with the corresponding Matrix3/vector multiplication API; replace the
TEME-specific computeTemeToPseudoFixedMatrix and Matrix4.multiplyByPoint usage
while preserving the resulting fixed-frame Cartesian3.
🪄 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: 29e5e189-d89f-451f-b729-af995e3dd1e3

📥 Commits

Reviewing files that changed from the base of the PR and between 6c9a5b4 and 8879179.

📒 Files selected for processing (2)
  • frontend/src/components/EarthTwin.tsx
  • frontend/src/utils/illumination.ts

Comment on lines +193 to +202
const cartPos = Cesium.Cartesian3.fromDegrees(pos.lon, pos.lat, pos.alt * 1000);
const nowJulian = Cesium.JulianDate.now();
const sunlit = isSatelliteSunlit(cartPos, nowJulian, viewer.scene.globe);

const entity = viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(pos.lon, pos.lat, pos.alt * 1000),
position: cartPos,
point: {
pixelSize,
color: colorConfig.cesium.withAlpha(0.85),
outlineColor: colorConfig.cesium.withAlpha(0.4),
color: sunlit ? colorConfig.cesium.withAlpha(0.85) : colorConfig.cesium.withAlpha(0.3),
outlineColor: sunlit ? colorConfig.cesium.withAlpha(0.4) : colorConfig.cesium.withAlpha(0.1),

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant component around the reported lines and nearby update logic.
file="frontend/src/components/EarthTwin.tsx"
wc -l "$file"
sed -n '150,260p' "$file"
printf '\n---\n'
sed -n '320,390p' "$file"

Repository: 7-Blocks/Kepler

Length of output: 6501


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="frontend/src/components/EarthTwin.tsx"
wc -l "$file"
sed -n '150,260p' "$file"
printf '\n---\n'
sed -n '320,390p' "$file"

Repository: 7-Blocks/Kepler

Length of output: 6501


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="frontend/src/components/EarthTwin.tsx"
rg -n "isSatelliteSunlit|onTick|clock|entity\.point|withAlpha\(0\.(85|3|4|1)\)" "$file"

Repository: 7-Blocks/Kepler

Length of output: 654


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="frontend/src/components/EarthTwin.tsx"
printf '--- matching lines ---\n'
rg -n "isSatelliteSunlit|onTick|clock|setInterval|populateEntities|withAlpha" "$file"
printf '\n--- surrounding isSatelliteSunlit usage ---\n'
sed -n '180,220p' "$file"
printf '\n--- surrounding any clock/onTick setup ---\n'
sed -n '400,520p' "$file"

Repository: 7-Blocks/Kepler

Length of output: 244


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="frontend/src/components/EarthTwin.tsx"
rg -n "isSatelliteSunlit|onTick|clock|setInterval|populateEntities|withAlpha" "$file"
printf '\n--- lines 180-220 ---\n'
sed -n '180,220p' "$file"
printf '\n--- lines 400-520 ---\n'
sed -n '400,520p' "$file"

Repository: 7-Blocks/Kepler

Length of output: 9985


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="frontend/src/components/EarthTwin.tsx"
sed -n '280,325p' "$file"

Repository: 7-Blocks/Kepler

Length of output: 1670


Make satellite shadow styling time-varying. The lit/shadow colors are computed only when entities are rebuilt, so satellites can stay in the wrong state for up to five minutes between refreshes. Drive the point colors from the clock or update existing entities on tick instead of waiting for the next populateEntities run.

🤖 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/EarthTwin.tsx` around lines 193 - 202, Update the
satellite styling flow around isSatelliteSunlit and the entity created in
populateEntities so point color and outlineColor react to the current Cesium
clock time. Recompute sunlit state on clock ticks or use time-varying Cesium
properties, while preserving the existing lit and shadow color values and
avoiding dependence on the five-minute entity rebuild.

Comment thread frontend/src/utils/illumination.ts Resolved
Comment thread frontend/src/components/EarthTwin.tsx Resolved
Comment thread frontend/src/utils/illumination.ts Resolved
Comment thread frontend/src/utils/illumination.ts Resolved
@krishkhinchi

Copy link
Copy Markdown
Member

Hii @Ayush-0918, Please attach screenshots of the updates/changes along with your PR. Thanks!

@Ayush-0918

Ayush-0918 commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the reminder @krishkhinchi ! I’ll attach screenshots demonstrating the feature shortly.

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

Thank you for this effort, LGTM!!

@krishkhinchi
krishkhinchi merged commit a73c911 into 7-Blocks:main Jul 20, 2026
10 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot added ECSoC26-L2 Level 2 contribution for the ECSoC26 event. and removed ECSoC26-L3 Level 3 contribution for the ECSoC26 event. labels Jul 20, 2026
@krishkhinchi

Copy link
Copy Markdown
Member

Hi @Ayush-0918, your PR deployment has failed on Vercel. Could you please check the deployment logs and fix the issue? Thanks!

image

@Ayush-0918
Ayush-0918 deleted the feat/earth-day-night-terminator-92 branch July 21, 2026 04:09
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/M Medium-sized contribution. size:M This PR changes 30-99 lines, ignoring generated files 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.

Add an Earth Day/Night Terminator Visualization

2 participants