Skip to content

Removed Graph's tab, added movable windows instead#1004

Merged
Matthew-Dobson merged 23 commits intomainfrom
977-display-graphs-as-popout-windows
Feb 27, 2026
Merged

Removed Graph's tab, added movable windows instead#1004
Matthew-Dobson merged 23 commits intomainfrom
977-display-graphs-as-popout-windows

Conversation

@Matthew-Dobson
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 23, 2026 20:10
@Matthew-Dobson Matthew-Dobson linked an issue Feb 23, 2026 that may be closed by this pull request
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 pull request removes the static Graphs tab from the main GCS application and replaces it with a more flexible system of movable, floating graph windows. The change allows users to pop out up to 4 graph windows that remain always-on-top, providing better multitasking capabilities. Users can now select MAVLink fields to graph from a new "Graphs" menu in the toolbar, which opens dedicated Electron windows for each graph.

Changes:

  • Removed the /graphs route and its associated components (graphs.jsx, messageSelector.jsx, graphPanel.jsx)
  • Added a new Graphs menu in the toolbar for selecting MAVLink fields to display
  • Implemented Electron-based floating graph windows with IPC communication for real-time data updates
  • Enhanced the socketMiddleware with better error handling and safety checks for graph data extraction

Reviewed changes

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

Show a summary per file
File Description
gcs/src/graphs.jsx Removed entire graphs page component (143 lines)
gcs/src/graphWindow.jsx New entry point for popup graph windows with IPC listeners
gcs/graphWindow.html HTML template for graph popup windows
gcs/src/components/toolbar/toolbar.jsx Added GraphsMenu component to toolbar
gcs/src/components/toolbar/menus/graphs.jsx New menu for selecting up to 4 MAVLink fields to graph with search functionality
gcs/src/components/realtimeGraph.jsx Updated to handle dynamic lineColor changes
gcs/src/components/navbar.jsx Removed Graphs navigation link
gcs/src/components/mainContent.jsx Removed /graphs route
gcs/src/components/graphs/messageSelector.jsx Removed component (no longer needed)
gcs/src/components/graphs/graphPanel.jsx Removed component (no longer needed)
gcs/src/components/graphWindow/graphWindow.jsx Appears to be an unused stub component
gcs/src/redux/middleware/socketMiddleware.js Refactored graph data extraction with better error handling and IPC forwarding
gcs/electron/preload.js Added IPC channels for graph window communication and removeListener method
gcs/electron/modules/graphWindow.ts New module managing graph window lifecycle and IPC handlers
gcs/electron/main.ts Integrated graph window module registration and cleanup
gcs/.env_sample Deleted (appears unintentional - contains important env var template)
gcs/src/components/dashboard/resizableInfoBox.jsx Fixed trailing whitespace in comment
gcs/vite.test.config.ts Added missing newline at end of file
Comments suppressed due to low confidence (1)

gcs/src/redux/middleware/socketMiddleware.js:533

  • Missing null safety check for window.ipcRenderer. The code directly accesses window.ipcRenderer without verifying its existence, which could cause a runtime error if the code runs outside an Electron context. Add a check such as "if (graphData && window.ipcRenderer)" before invoking the IPC call.
          )
        })

        // I don't understand whatsoever why this doesn't work with the standard
        // on method.

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

Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/graphWindow.jsx Outdated
Comment thread gcs/electron/modules/graphWindow.ts Outdated
Comment thread gcs/src/components/realtimeGraph.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx
Comment thread gcs/electron/preload.js Outdated
@Matthew-Dobson Matthew-Dobson requested a review from a team February 25, 2026 10:55
@1Blademaster
Copy link
Copy Markdown
Member

What are the changes to .gitattributes, CONTRIBUTING.md and .env_sample? The diff looks identical I don't understand.

@Matthew-Dobson
Copy link
Copy Markdown
Contributor Author

What are the changes to .gitattributes, CONTRIBUTING.md and .env_sample? The diff looks identical I don't understand.

Thanks for flagging - I think those are just unintended formatting changes done automatically, no actual content changes, not sure why VS pushed them this time and not any other lol, can remove if you want :)

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.

Just some comments after briefly reading the code.

Comment thread gcs/src/components/toolbar/menus/graphs.jsx
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/components/toolbar/menus/graphs.jsx Outdated
Comment thread gcs/src/graphWindow.jsx Outdated
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.

Can we make the graph resize to the size of the window?:

Image

Checkbox ticked even though window is closed:

Image

No data being plotted?:

Image

@Matthew-Dobson
Copy link
Copy Markdown
Contributor Author

Fixed all of the comments requested. Still have those changes to the wierd files like CONTRIBUTING.md , no idea why but nothing has changed in them and the rest seems good on my end

@Matthew-Dobson Matthew-Dobson requested a review from a team February 27, 2026 12:47
@1Blademaster
Copy link
Copy Markdown
Member

Works well.

image

Can we have a time window of like 30s? We can make it configurable in the future.

@1Blademaster
Copy link
Copy Markdown
Member

Also noticed when I click an item on the checkbox then the menu doesn't hide automatically; it stays visible?

@1Blademaster
Copy link
Copy Markdown
Member

image

I don't think we need this title text here; it's available in the graph legend and the window title which I think is enough; also means we can make the graph larger which is good.

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.

Nice. LGTM.

@Matthew-Dobson Matthew-Dobson merged commit 9702fdc into main Feb 27, 2026
8 checks passed
@Matthew-Dobson Matthew-Dobson deleted the 977-display-graphs-as-popout-windows branch February 27, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display graphs as popout windows

3 participants