Skip to content

Alpha 0.1.10/485 fla refactor#698

Merged
Kwash67 merged 31 commits intorelease-alpha-0.1.10from
alpha-0.1.10/485-fla-refactor
Sep 25, 2025
Merged

Alpha 0.1.10/485 fla refactor#698
Kwash67 merged 31 commits intorelease-alpha-0.1.10from
alpha-0.1.10/485-fla-refactor

Conversation

@Kwash67
Copy link
Copy Markdown
Contributor

@Kwash67 Kwash67 commented Sep 16, 2025

Main improvements
Separated the jsx into two main files:

  • SelectFlightLog.jsx for the initial flight log selection/upload screen.
  • FlaMainDisplay.jsx as the main display component for FLA.

Utility and logic enhancements:

  • Introduced fla/utils.js, providing functions for color conversion, GPS/UTC time handling, message filtering, mean/min/max calculations, flight mode extraction, etc.
  • Added fla/constants.js to centralize reused configuration, color palettes, and ignored message/field lists.
  • loadFile() function is more readable now.

Redux state management:

  • Refactored the log analyser Redux slice: moved file location, removed the unused setChartData reducer.
  • 🚧 Clicking a message filter checkbox is still a bit laggy for large log files. It takes 1/2 seconds between clicking and response. Still working on it. Might have to move that into a separate bug fix. Suspicions include: delay due to transacting large nested redux states, and delay when rendering chart.

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 implements a significant refactoring of the Flight Log Analyser (FLA) module, separating concerns and improving maintainability. The refactoring splits the monolithic FLA component into focused modules, introduces utility functions, and modernizes Redux state management with selectors.

  • Split main FLA component into SelectFlightLog and FlaMainDisplay components for better separation of concerns
  • Extracted utility functions and constants into dedicated modules for better organization
  • Updated Redux slice to use modern selectors pattern instead of direct state access

Reviewed Changes

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

Show a summary per file
File Description
gcs/src/redux/store.js Updated import path for relocated logAnalyserSlice
gcs/src/redux/slices/logAnalyserSlice.js Added selectors, removed unused setChartData reducer
gcs/src/fla.jsx Major refactoring: extracted components, utilities, and modernized Redux usage
gcs/src/components/fla/utils.js New utility module with extracted helper functions
gcs/src/components/fla/constants.js New constants module for centralized configuration
gcs/src/components/SelectFlightLog.jsx New component for flight log selection interface
gcs/src/components/FlaMainDisplay.jsx New component for main FLA display functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/components/fla/utils.js Outdated
Kwash67 and others added 4 commits September 16, 2025 12:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

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

Please also update all notifications to use the actions in gcs/src/redux/slices/notificationSlice.js

Comment thread gcs/src/components/fla/utils.js
Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/components/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/SelectFlightLog.jsx Outdated
Comment thread gcs/src/components/SelectFlightLog.jsx Outdated
Comment thread gcs/src/fla.jsx Outdated
Comment thread gcs/src/fla.jsx Outdated
Comment thread gcs/src/fla.jsx Outdated
@Kwash67 Kwash67 requested a review from Copilot September 19, 2025 22:41
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/fla.jsx Outdated
Comment thread gcs/src/components/fla/SelectFlightLog.jsx
@Kwash67 Kwash67 requested a review from Copilot September 19, 2025 22:53
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread gcs/src/components/fla/SelectFlightLog.jsx Outdated
Comment thread gcs/src/components/fla/SelectFlightLog.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/FlaMainDisplay.jsx Outdated
Comment thread gcs/src/components/fla/SelectFlightLog.jsx Outdated
Comment thread gcs/src/components/fla/SelectFlightLog.jsx
Comment thread gcs/src/fla.jsx
@Kwash67 Kwash67 requested a review from Copilot September 22, 2025 01:46
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread gcs/src/redux/store.js
Comment thread gcs/src/components/fla/presetAccordionItem.jsx Outdated
Comment thread gcs/src/components/fla/utils.js
Comment thread gcs/src/components/fla/utils.js Outdated
Comment thread gcs/src/fla.jsx Outdated
Comment thread gcs/src/components/fla/presetCategories.js
Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster left a comment

Choose a reason for hiding this comment

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

Some more bugs found; talked on discord

@Kwash67 Kwash67 merged commit 3cfea16 into release-alpha-0.1.10 Sep 25, 2025
5 checks passed
@Kwash67 Kwash67 deleted the alpha-0.1.10/485-fla-refactor branch September 25, 2025 21:12
1Blademaster added a commit that referenced this pull request Sep 28, 2025
* moved constants and utility functions

* move redux selectors to logAnalyserSlice

* refactor loadFile seems to work fine

* added jsdoc style comments to utils

* refactored the html

* more jsdoc style comments for readability

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix lint error

* filter before looping for efficiency

* used Math.min instaead of reduce

* resolved all PR comments

* lint error

* further reducing props passed to Fla Main Display

* random comment

* extra improvements based on feedback from copilot

* replacing FileInput + Button with FileButton from mantine

* fixed issues with event logs

* renaming a variable

* updating notifications to use actions from slice

* formatting

* made all updates

* lint

* copilot suggestions

* Clean up dispatch functions, remove most lodash usage

* fixed preset bug

* Revert notifications changes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants