Skip to content

feat: add Mission Intelligence & Operations Logbook - #173

Merged
krishkhinchi merged 1 commit into
7-Blocks:mainfrom
Sk-Uruj:feature/mission-logbook
Aug 7, 2026
Merged

feat: add Mission Intelligence & Operations Logbook#173
krishkhinchi merged 1 commit into
7-Blocks:mainfrom
Sk-Uruj:feature/mission-logbook

Conversation

@Sk-Uruj

@Sk-Uruj Sk-Uruj commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

User description

Summary

Implements the Mission Intelligence & Operations Logbook — a real-time, categorized, filterable audit trail of significant user interactions and system events, replacing the previous static/hardcoded "LOGS" tab in the right-side drawer.

Adds:

  • A Zustand logbookStore (capped at 300 entries) plus a logEvent() helper callable from anywhere in the app without subscribing to the store
  • A LogbookPanel UI: search box, category filter chips (Tracking/Camera/Search/Alerts/System/Mission), priority filter chips (Low/Medium/High/Critical), animated expandable entries, and a smart auto-scroll that shows a "N new entries ↑" indicator instead of yanking the user's scroll position while they're reviewing history
  • An unread-entry count badge on the drawer toggle button in the top bar

Wires real logging into existing interactions:

  • Satellite selection (from both the 3D globe and the satellite list page) → Tracking events
  • Camera fly-to actions (satellite focus, ISS tracking, regional zoom) → Camera events
  • Satellite catalog search and the top-bar ID/TLE search → Search events
  • AI Assistant command submissions → Mission events
  • Newly-detected CRITICAL/HIGH collision risks → Alert events
  • App initialization → System event

Related Issue

Fixes #161

Type of Change

  • ✨ New feature
  • 🎨 UI/UX enhancement

Screenshots / Screen Recordings

Screenshot 2026-08-07 135322

Testing Performed

  • Tested locally
  • Tested relevant functionality
  • Checked for linting errors
  • Checked for TypeScript/build errors
  • Tested responsive behavior (if applicable)

Details:

  • npx tsc -b --noEmit — clean, no errors
  • npm run lint — zero issues in any file this PR touches (verified by diffing against the pre-existing baseline, which already had unrelated lint errors in files outside this PR)
  • Manually tested in the running app: satellite selection from both the globe and the satellite list logs correctly with no duplicates on re-selecting the same target; search logging only fires once the user finishes typing (blur/Enter) rather than on every keystroke; the "Mission control initialized" system event fires exactly once per session even under React StrictMode / HMR; unread badge and auto-scroll-to-latest behavior confirmed visually

Breaking Changes

None. This is additive — no existing props, routes, or stored data shapes changed. The previous hardcoded LOGS tab content is replaced with live data, but that tab had no persisted state to migrate.

Checklist

  • I have read and followed the contributing guidelines.
  • My code follows the project's coding standards and guidelines.
  • I have completed testing of my changes.
  • I have updated documentation where applicable.
  • I have checked that my changes do not introduce unintended regressions.

ECSoC26 Submission

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

CodeAnt-AI Description

Add a searchable mission operations logbook

What Changed

  • Replaces the static Logs tab with a live record of tracking, camera, search, mission, system, and collision-alert events
  • Lets users search entries, filter by category or priority, expand event details, clear the log, and jump to new entries without losing their place
  • Shows unread log counts on the operations drawer button and records key actions such as satellite selection, camera movements, searches, assistant commands, startup, and high-risk conjunctions
  • Highlights event severity, including animated critical alerts, while keeping the log limited to recent mission activity

Impact

✅ Searchable mission history
✅ Clearer high-risk collision alerts
✅ Unread event visibility

💡 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 searchable, filterable logbook for mission activity.
    • Log entries now support categories, priorities, timestamps, descriptions, and expandable details.
    • Added unread log counts, automatic updates, reset controls, and entry clearing.
    • Recorded key actions including satellite searches, tracking, camera focus, mission commands, and collision-risk alerts.
    • Added visual indicators for critical and high-priority events.

@codeant-ai

codeant-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 3ff1fa4 Aug 07, 2026 · 08:31 08:34

@codeant-ai

codeant-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions github-actions Bot added ECSoC26 Official label for ECSoC26 event contributions. ECSoC26-L2 Level 2 contribution for the ECSoC26 event. AI Artificial Intelligence and Machine Learning bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request frontend Frontend development size/XL Very large or complex contribution. 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. labels Aug 7, 2026
@codeant-ai codeant-ai Bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds a centralized Zustand logbook with typed entries, animated rendering, filtering, scrolling, unread tracking, and event capture across mission initialization, commands, searches, satellite selection, camera actions, and collision alerts.

Changes

Mission Operations Logbook

Layer / File(s) Summary
Logbook contracts and storage
frontend/src/types/logbook.ts, frontend/src/store/logbookStore.ts, frontend/src/components/Logbook/logbookConfig.ts
Defines categorized and prioritized entries, timestamp formatting, display metadata, capped retention, insertion, and clearing.
Logbook panel and entry rendering
frontend/src/components/Logbook/*
Adds animated entries, expandable details, search and filter controls, empty states, automatic scrolling, unread-entry navigation, and clear-log actions.
Mission event instrumentation and integration
frontend/src/components/layouts/MainLayout.tsx, frontend/src/components/EarthTwin.tsx, frontend/src/hooks/useSatelliteSelection.ts, frontend/src/pages/Dashboard.tsx, frontend/src/pages/Satellites.tsx, frontend/src/store/uiStore.ts
Records mission, command, search, tracking, camera, satellite-selection, and high-risk conjunction events. Replaces the local assistant log with LogbookPanel and adds an unread badge to the drawer toggle.

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

Sequence Diagram(s)

sequenceDiagram
  participant MissionUI
  participant logEvent
  participant useLogbookStore
  participant LogbookPanel
  MissionUI->>logEvent: Record mission event
  logEvent->>useLogbookStore: Add timestamped entry
  LogbookPanel->>useLogbookStore: Read entries
  useLogbookStore-->>LogbookPanel: Return entries and unread state
Loading

Possibly related PRs

  • 7-Blocks/Kepler#142: Modifies EarthTwin.tsx and useSatelliteSelection.ts, including satellite focus behavior.
  • 7-Blocks/Kepler#148: Adds the satellite camera-focus navigation used by the new focus logging.
  • 7-Blocks/Kepler#153: Addresses the flyToSatellite focus behavior modified by the new camera event logging.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR delivers the core logbook, but #161 also requires time-range sorting, broader camera and navigation logging, and additional interaction tracking. Add the missing #161 requirements or document them as follow-up scope, including time-range sorting and broader camera, navigation, satellite, filter, and mission-event logging.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding the Mission Intelligence & Operations Logbook.
Description check ✅ Passed The description covers the summary, issue, change type, screenshot, testing, breaking changes, checklist, and ECSoC26 selection.
Out of Scope Changes check ✅ Passed The changes are focused on the logbook UI, event store, event types, and logging integrations described in issue #161.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Warning

⚠️ This pull request shows signs of AI-generated slop (ai_padded_prose). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

Comment on lines +66 to +78
useEffect(() => {
const prevCount = prevCountRef.current;
const grew = entries.length > prevCount;
prevCountRef.current = entries.length;

if (pinnedToTop && grew) {
listRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
}

// Surface a "N new entries" affordance when entries arrive while the
// user is reading history, instead of yanking their scroll position.
setNewSinceScroll((n) => (pinnedToTop ? 0 : grew ? n + (entries.length - prevCount) : n));
}, [entries.length, pinnedToTop]);

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-entry detector relies only on entries.length. Once the store reaches its 300-entry cap, adding an entry replaces an old entry without changing the length, so this effect does not run and neither auto-scrolls to the latest entry nor increments the new-entry indicator. Track a monotonically increasing event/version value or compare the newest entry ID instead of only the array length. [state/lifecycle]

Severity Level: Major ⚠️
- ❌ New entries beyond 300 do not trigger latest-entry auto-scroll.
- ⚠️ History readers miss the “N new entries” indicator.

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/Logbook/LogbookPanel.tsx
**Line:** 66:78
**Comment:**
	*State Lifecycle: The new-entry detector relies only on `entries.length`. Once the store reaches its 300-entry cap, adding an entry replaces an old entry without changing the length, so this effect does not run and neither auto-scrolls to the latest entry nor increments the new-entry indicator. Track a monotonically increasing event/version value or compare the newest entry ID instead of only the array length.

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

},
duration: 1.5,
});
logEvent('TRACKING', 'MEDIUM', 'ISS tracking engaged', 'Camera locked onto the International Space Station.');

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 ISS action performs a camera fly-to, but records the event under TRACKING. This places the event in the wrong category and makes camera activity invisible when users filter the logbook by CAMERA; record it as a camera event like the other fly-to actions. [api mismatch]

Severity Level: Major ⚠️
- ⚠️ ISS camera actions disappear from CAMERA filtering.
- ⚠️ Logbook categories become inconsistent across fly-to actions.

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:** 198:198
**Comment:**
	*Api Mismatch: The ISS action performs a camera fly-to, but records the event under `TRACKING`. This places the event in the wrong category and makes camera activity invisible when users filter the logbook by `CAMERA`; record it as a camera event like the other fly-to actions.

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 +121 to +123
(conj.risk_level === 'CRITICAL' || conj.risk_level === 'HIGH') &&
!loggedCollisionIdsRef.current.has(conj.id)
) {

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 deduplication key contains only conj.id, so an already-logged HIGH conjunction that is later promoted to CRITICAL will never generate a CRITICAL alert entry. Include the risk level in the deduplication state, or explicitly log severity changes. [logic error]

Severity Level: Major ⚠️
- ⚠️ Risk escalation is missing from the Alert log.
- ❌ Operators may not see newly critical conjunctions.

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/Dashboard.tsx
**Line:** 121:123
**Comment:**
	*Logic Error: The deduplication key contains only `conj.id`, so an already-logged HIGH conjunction that is later promoted to CRITICAL will never generate a CRITICAL alert entry. Include the risk level in the deduplication state, or explicitly log severity changes.

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: 4

🤖 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/layouts/MainLayout.tsx`:
- Around line 63-86: Update the unread-log tracking in MainLayout around
logbookEntryCount and lastViewedLogCountRef to use a monotonic insertion
revision or sequence exposed by logbookStore instead of entries.length. Store
and compare the last viewed revision, while preserving the existing
reset-to-zero behavior when the Logs tab is open and calculating unread entries
from the revision difference.

In `@frontend/src/components/Logbook/LogbookPanel.tsx`:
- Around line 66-78: Update the LogbookPanel useEffect to detect additions by
comparing the current newest entry ID or entry IDs with the previous render,
rather than relying only on entries.length, so replacements at the 300-entry cap
still scroll or increment the new-entry affordance. Also reset newSinceScroll
when the entries list is cleared, while preserving the existing pinnedToTop
behavior.

In `@frontend/src/pages/Dashboard.tsx`:
- Around line 117-134: Move the conjunction alert deduplication state out of
Dashboard’s loggedCollisionIdsRef and into logbookStore or another
session-scoped bounded deduplication index. Update the index atomically when
creating the log entry so remounting Dashboard does not re-log existing HIGH or
CRITICAL conjunctions, while preserving the current risk filtering and alert
payload.

In `@frontend/src/pages/Satellites.tsx`:
- Around line 60-66: Add an unmount cleanup in the Satellites component that
clears searchTimer.current, ensuring the pending setTimeout callback cannot run
after the page is left while preserving the existing debounced search behavior.
🪄 Autofix

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: 67fca6a3-6267-42d1-979e-ffc89ed55586

📥 Commits

Reviewing files that changed from the base of the PR and between ba5cfa2 and 3ff1fa4.

📒 Files selected for processing (11)
  • frontend/src/components/EarthTwin.tsx
  • frontend/src/components/Logbook/LogEntryItem.tsx
  • frontend/src/components/Logbook/LogbookPanel.tsx
  • frontend/src/components/Logbook/logbookConfig.ts
  • frontend/src/components/layouts/MainLayout.tsx
  • frontend/src/hooks/useSatelliteSelection.ts
  • frontend/src/pages/Dashboard.tsx
  • frontend/src/pages/Satellites.tsx
  • frontend/src/store/logbookStore.ts
  • frontend/src/store/uiStore.ts
  • frontend/src/types/logbook.ts

Comment on lines +63 to +86
const logbookEntryCount = useLogbookStore((s) => s.entries.length);
const lastViewedLogCountRef = useRef(0);
const [unreadLogCount, setUnreadLogCount] = useState(0);
const isViewingLogs = rightDrawerOpen && activeDrawerTab === 'LOGS';

// Record a System event once, when mission control first comes online.
// Module-scope guard (not a ref) so it survives React StrictMode's
// double-invoke in dev *and* Vite HMR module reloads — a component-local
// ref resets on remount, but this only resets on a genuine full page load.
useEffect(() => {
if (hasLoggedMissionInit) return;
hasLoggedMissionInit = true;
logEvent('SYSTEM', 'LOW', 'Mission control interface initialized', 'Dashboard shell mounted and ready.');
}, []);

// Sync the unread badge to the logbook store (an external system) as new
// entries arrive or the Logs tab is opened; see the identical, pre-existing
// pattern in EarthTwin.tsx for setState-in-effect used this way.
useEffect(() => {
if (isViewingLogs) {
lastViewedLogCountRef.current = logbookEntryCount;
}
setUnreadLogCount(isViewingLogs ? 0 : Math.max(0, logbookEntryCount - lastViewedLogCountRef.current));
}, [isViewingLogs, logbookEntryCount]);

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 | 🏗️ Heavy lift

Track unread entries independently of the capped array length.

When the logbook reaches its cap, a new entry replaces an old entry but entries.length does not change. This selector does not update, so the unread badge stops increasing for later events.

Expose a monotonic insertion revision or sequence from logbookStore. Store the last viewed revision instead of the entry count.

🤖 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/layouts/MainLayout.tsx` around lines 63 - 86, Update
the unread-log tracking in MainLayout around logbookEntryCount and
lastViewedLogCountRef to use a monotonic insertion revision or sequence exposed
by logbookStore instead of entries.length. Store and compare the last viewed
revision, while preserving the existing reset-to-zero behavior when the Logs tab
is open and calculating unread entries from the revision difference.

Comment on lines +66 to +78
useEffect(() => {
const prevCount = prevCountRef.current;
const grew = entries.length > prevCount;
prevCountRef.current = entries.length;

if (pinnedToTop && grew) {
listRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
}

// Surface a "N new entries" affordance when entries arrive while the
// user is reading history, instead of yanking their scroll position.
setNewSinceScroll((n) => (pinnedToTop ? 0 : grew ? n + (entries.length - prevCount) : n));
}, [entries.length, pinnedToTop]);

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

Detect new entries by identity, not only by list length.

After the store reaches 300 entries, each new entry replaces an old entry and keeps entries.length unchanged. Line 68 then treats the update as not new. The panel does not auto-scroll or show the new-entry control.

If clearAll() runs while the user is not pinned to the top, line 77 also retains a stale new-entry count.

Track the previous newest entry ID or previous entry IDs. Reset newSinceScroll when the list is cleared.

🤖 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/Logbook/LogbookPanel.tsx` around lines 66 - 78,
Update the LogbookPanel useEffect to detect additions by comparing the current
newest entry ID or entry IDs with the previous render, rather than relying only
on entries.length, so replacements at the 300-entry cap still scroll or
increment the new-entry affordance. Also reset newSinceScroll when the entries
list is cleared, while preserving the existing pinnedToTop behavior.

Comment on lines +117 to +134
const loggedCollisionIdsRef = useRef<Set<number>>(new Set());
useEffect(() => {
for (const conj of conjunctions) {
if (
(conj.risk_level === 'CRITICAL' || conj.risk_level === 'HIGH') &&
!loggedCollisionIdsRef.current.has(conj.id)
) {
loggedCollisionIdsRef.current.add(conj.id);
logEvent(
'ALERTS',
conj.risk_level === 'CRITICAL' ? 'CRITICAL' : 'HIGH',
'Conjunction risk detected',
`${conj.object_a?.name ?? 'Unknown'} vs ${conj.object_b?.name ?? 'Unknown'} — ${(conj.probability * 100).toFixed(2)}% probability`,
{ RISK_LEVEL: conj.risk_level, MISS_DISTANCE_M: conj.miss_distance_m.toFixed(0) }
);
}
}
}, [conjunctions]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Persist conjunction deduplication outside Dashboard.

Navigating away from /dashboard resets loggedCollisionIdsRef. When the page remounts, cached HIGH and CRITICAL conjunctions are logged again as new alerts.

Move the deduplication key into logbookStore, or use a bounded event-deduplication index that persists for the application session and is updated atomically with the log entry.

🤖 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/Dashboard.tsx` around lines 117 - 134, Move the
conjunction alert deduplication state out of Dashboard’s loggedCollisionIdsRef
and into logbookStore or another session-scoped bounded deduplication index.
Update the index atomically when creating the log entry so remounting Dashboard
does not re-log existing HIGH or CRITICAL conjunctions, while preserving the
current risk filtering and alert payload.

Comment on lines 60 to 66
searchTimer.current = setTimeout(() => {
setDebounced(val);
setPage(1);
if (val.trim()) {
logEvent('SEARCH', 'LOW', 'Satellite catalog search', `Query: "${val.trim()}"`);
}
}, 400);

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

Cancel the pending search timer on unmount.

If the user leaves this page within 400 ms, the callback still records a search that did not execute. Clear searchTimer.current in an unmount cleanup.

Proposed fix
-import React, { useRef, useState } from 'react';
+import React, { useEffect, useRef, useState } from 'react';
 ...
   const searchTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
+
+  useEffect(() => () => {
+    if (searchTimer.current) clearTimeout(searchTimer.current);
+  }, []);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
searchTimer.current = setTimeout(() => {
setDebounced(val);
setPage(1);
if (val.trim()) {
logEvent('SEARCH', 'LOW', 'Satellite catalog search', `Query: "${val.trim()}"`);
}
}, 400);
searchTimer.current = setTimeout(() => {
setDebounced(val);
setPage(1);
if (val.trim()) {
logEvent('SEARCH', 'LOW', 'Satellite catalog search', `Query: "${val.trim()}"`);
}
}, 400);
useEffect(() => () => {
if (searchTimer.current) clearTimeout(searchTimer.current);
}, []);
🤖 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/Satellites.tsx` around lines 60 - 66, Add an unmount
cleanup in the Satellites component that clears searchTimer.current, ensuring
the pending setTimeout callback cannot run after the page is left while
preserving the existing debounced search behavior.

@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 92321d4 into 7-Blocks:main Aug 7, 2026
7 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot added ECSoC26-L3 Level 3 contribution for the ECSoC26 event. and removed ECSoC26-L2 Level 2 contribution for the ECSoC26 event. labels Aug 7, 2026
@Sk-Uruj
Sk-Uruj deleted the feature/mission-logbook branch August 7, 2026 10:40
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-L3 Level 3 contribution for the ECSoC26 event. ECSoC26 Official label for ECSoC26 event contributions. enhancement New feature or request frontend Frontend development size/XL Very large or complex contribution. size:XL This PR changes 500-999 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.

📖 Mission Intelligence & Operations Logbook

2 participants