Skip to content

fix: 複数のロガーを開いた際の処理停止を修正 - #31

Merged
kiyu-git merged 3 commits into
mainfrom
feature/bug-fix
Aug 20, 2025
Merged

kiyu-git merged 3 commits into
mainfrom
feature/bug-fix

Conversation

@kiyu-git

Copy link
Copy Markdown
Owner

Closes #26

@kiyu-git
kiyu-git requested a review from Copilot August 20, 2025 13:25

This comment was marked as outdated.

@kiyu-git
kiyu-git requested a review from Copilot August 20, 2025 14:50

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

This PR fixes an issue where multiple logger windows would cause processing to stop. The changes convert named function exports to default exports, improve code style consistency, and implement multiple logger window support through instance-specific state management.

  • Converts all page components from named exports to default exports for consistency
  • Refactors the main process to support multiple DataLogger windows through Map-based state management
  • Improves code quality with consistent string quotes, better variable naming, and proper TypeScript types

Reviewed Changes

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

Show a summary per file
File Description
src/renderer/pages/Menu/index.tsx Converts to default export and standardizes string quotes to double quotes
src/renderer/pages/DataViewer/index.tsx Converts to default export, adds React import, and moves function declarations for better organization
src/renderer/pages/DataLogger/index.tsx Converts to default export, improves code style with consistent operators and variable naming
src/renderer/components/RadioCard.tsx Converts to default export, adds TypeScript types, and removes prop spreading for explicit prop handling
src/renderer/components/LinePlot.tsx Converts to default export and improves state management patterns
src/renderer/components/DataPlot.tsx Converts to default export and improves variable declarations
src/renderer/App.tsx Updates imports to use default exports
src/main/main.ts Implements multiple DataLogger window support using arrays and improves parameter handling
src/main/electron-src/lib/serialManager.js Refactors to support multiple windows using Map-based state management and improves code style
.eslintrc.js Updates ESLint rules to allow unused parameters with underscore prefix and disables some strict rules

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

name={input.name}
value={input.value}
checked={input.checked}
onChange={input.onChange}

Copilot AI Aug 20, 2025

Copy link

Choose a reason for hiding this comment

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

The input element is missing required props from getInputProps(). You should spread all props from getInputProps() instead of manually selecting a few, as this may break the radio functionality.

Suggested change
onChange={input.onChange}
{...input}

Copilot uses AI. Check for mistakes.
onKeyPress={checkbox.onKeyPress}
onMouseDown={checkbox.onMouseDown}
onFocus={checkbox.onFocus}
onBlur={checkbox.onBlur}

Copilot AI Aug 20, 2025

Copy link

Choose a reason for hiding this comment

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

Removing prop spreading from checkbox breaks the radio functionality. The useRadio hook returns essential props that must be applied to the Box component for proper accessibility and behavior.

Suggested change
onBlur={checkbox.onBlur}
{...checkbox}

Copilot uses AI. Check for mistakes.
Comment thread src/renderer/components/RadioCard.tsx
Comment thread src/renderer/components/LinePlot.tsx
Comment thread src/renderer/components/DataPlot.tsx
Comment thread src/main/electron-src/lib/serialManager.js
Comment thread src/main/electron-src/lib/serialManager.js
@kiyu-git
kiyu-git merged commit 635998e into main Aug 20, 2025
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.

Realtime Data Loggerを複数開くと、今まで開いていたウィンドウの処理がストップする

2 participants