Skip to content

Refactor post merge cleanup#309

Merged
Kyome22 merged 20 commits into
mainfrom
refactor-post-merge-cleanup
May 22, 2026
Merged

Refactor post merge cleanup#309
Kyome22 merged 20 commits into
mainfrom
refactor-post-merge-cleanup

Conversation

@Kyome22
Copy link
Copy Markdown
Collaborator

@Kyome22 Kyome22 commented May 21, 2026

This is a major overhaul.
This isn't intended for a formal review; it's just to help the code owners track the changes more easily.

Kyome22 and others added 6 commits May 21, 2026 22:05
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the GPU and Temperature repositories on CPURepository's structure
and drop the now-redundant first-read comment from CPURepository.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tighten file I/O, clarify frame ownership semantics, and add thumbnail
support so the menu can render previews next to custom runners.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extract the custom runner preview animation into a dedicated view driven
by a thread-pool timer that self-schedules each frame instead of relying
on a periodic timer, reducing UI thread churn.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add strings introduced by drag-and-drop frame reordering and remove the
string for the dropped Clear button, across all seven locales.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move CustomRunnerForm onto autosizing panels with a nested Palette of
color constants, drop the Clear button, add drag-and-drop reordering of
frames, pre-measure labels so AutoSize cells don't wrap localized text,
bottom-anchor the preview, and tighten the frame-tile lifecycle to
reduce UI thread churn.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 21, 2026

スクリーンショット 2026-05-22 003335 スクリーンショット 2026-05-22 003427

@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 21, 2026

rabbit turtule

@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 21, 2026

スクリーンショット 2026-05-22 011434 スクリーンショット 2026-05-22 011528

@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 21, 2026

スクリーンショット 2026-05-22 013724 スクリーンショット 2026-05-22 013757

@Kyome22 Kyome22 force-pushed the refactor-post-merge-cleanup branch from e9d2200 to b314c19 Compare May 21, 2026 16:39
@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 21, 2026

スクリーンショット 2026-05-22 030641

@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 21, 2026

スクリーンショット 2026-05-22 031533

Kyome22 and others added 5 commits May 22, 2026 03:29
Keep NotifyIcon alive while swapping the animation icon list, cache
custom runner frames across theme changes, render custom-runner
thumbnails in the runner menu, and stop HandleMenuItemSelection from
casting the custom-runner separator.

defaultCultureInfo English

English

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Avoid name collision with the *Repository data-source classes
(CPURepository, GPURepository, etc.) by renaming the GitHub-page
launcher action and its menu label across all seven locales.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move all repository Update calls into Task.Run so the UI thread stays
free for animateTimer ticks. The per-second GPU PerformanceCounter scan
(N instances of GPU Engine engtype_3D, one per process) was occupying
the UI thread and the 5-second StorageRepository DriveInfo I/O peaked
through, blocking animation ticks every 5 seconds.

Align MemoryRepository, StorageRepository, and NetworkRepository with
the CPU/GPU/Temperature contract: Update() performs the work, Get()
returns cached values only. FetchSystemInfo now does cache reads and
runs on the UI thread where it belongs (NotifyIcon and ToolStripMenu
updates require the UI thread).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the cramped 3-column layout and bottom Delete/Save bar with a
2-column root (list column + separator + editor column). The list
column hosts the delete control directly under the list; the editor
column stacks Name / Requirements / Frames / Preview / Save in a
label-and-content grid where the label column auto-sizes and the
content column takes the remaining width, keeping the form stable
across locale-driven text length differences.

Convert frame add / remove and runner delete to compact icon glyphs
(+, −, ×) with ToolTip labels, removing layout sensitivity to
translated button text. Drop nameWarningLabel — the Save-time
MessageBox already covers the overwrite confirmation.

Remove CustomRunner_OverwriteWarning and add CustomRunner_RequirementsLabel
and CustomRunner_FramesLabel across all seven locales.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Kyome22 Kyome22 force-pushed the refactor-post-merge-cleanup branch from 9db86d5 to ff8f57d Compare May 21, 2026 18:29
Kyome22 and others added 6 commits May 22, 2026 03:40
Apply CLAUDE.md naming conventions and consolidate duplicate constants:
- Rename `fPSMaxLimit` → `fpsMaxLimit` (abbreviation casing rule)
- Drop underscore prefix from `_bitmap` and `_launchAtStartupManager`
- Rename `SetEnabled(bool enabled)` → `Toggle(bool currentlyEnabled)` and
  `SetStartup` → `ToggleStartup` to reflect that the argument is the
  current state (not the desired one)
- Rename `FRAME_NAME_MAX_LENGTH` → `RUNNER_NAME_MAX_LENGTH`
- Move `MIN_FRAMES_FOR_SAVE` into `CustomRunnerRepository` as
  `MIN_FRAME_COUNT` so the form and the repository share one source of
  truth for the minimum frame count
- Fix `JUMP_THREDHOLD` typo → `JUMP_THRESHOLD`
- Drop a stray comment in `Program.cs` per the no-comments rule
- Fix `slider_rabbit`/`slider_turtle` resx paths to use lowercase
  `resources\` to match the other entries

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Match the graceful-degradation pattern used by CPU/GPU/Temperature
repositories. Previously the constructor threw `InvalidOperationException`
when no valid network interface was present, which would crash the app
on startup in NIC-less environments. Now the repository becomes inert
(`IsAvailable == false`, `Get()` returns null) and the network section
is simply omitted from the system info menu.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop `CustomRunner_ErrorEmptyName` and `CustomRunner_ErrorMinFrames`
  from all seven Strings*.resx (and the generated Designer). Form-level
  validation now disables the save button instead of showing these
  messages, so the strings were unreferenced.
- Sync `CustomRunner_AddedRunners` across languages with the English
  text "Custom Runners:" (was still "Added Runners" in de/es/fr/ja/
  zh-CN/zh-TW after the English changed).
- Translate the German `Menu_CustomRunners` / `Window_CustomRunners`
  ("Custom Runner..." → "Benutzerdefinierte Runner...") that were left
  in English.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The inner TableLayoutPanel built by BuildListColumn was not AutoSize, so
the bold "Custom Runners:" label's measured width did not propagate up
to the root layout and FitWindowToContent. With long translations
(fr/de/es) the label was clipped because the window never widened to
accommodate it.

Mirror the editor column's settings (`AutoSize = true,
AutoSizeMode = GrowAndShrink`) so the list column reports its preferred
width to the parent; the runnerListBox (Dock=Fill) then widens with the
label, and the form resizes accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Kyome22 Kyome22 marked this pull request as ready for review May 21, 2026 19:25
@Kyome22 Kyome22 requested a review from Copilot May 21, 2026 19:25
Copy link
Copy Markdown

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

Refactors several subsystems (system-info fetching, startup toggle, custom runner UX, and localization/resources) as part of a broader post-merge cleanup/overhaul, including new UI controls and repository API adjustments.

Changes:

  • Refactors CPU/GPU/temperature/network fetching flow and availability handling; shifts several repositories away from “Get() triggers Update()”.
  • Overhauls the Custom Runner editor UI (drag/drop ordering, preview control, new slider UI) and updates related localized strings/resources.
  • Renames “Open Repository” → “Open Project Page” and updates context menu wiring + startup toggle API.

Reviewed changes

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

Show a summary per file
File Description
RunCat365/TemperatureRepository.cs Extracts performance counter management and refines temperature conversion/validation and exception handling.
RunCat365/StorageRepository.cs Changes Get() to stop implicitly calling Update().
RunCat365/Properties/Strings.zh-TW.resx Updates menu/custom runner strings to match new UI wording/keys.
RunCat365/Properties/Strings.zh-CN.resx Updates menu/custom runner strings and reorganizes entries.
RunCat365/Properties/Strings.resx Renames menu string and replaces several custom runner strings with new labels.
RunCat365/Properties/Strings.ja.resx Updates menu/custom runner strings to match new UI wording/keys.
RunCat365/Properties/Strings.fr.resx Updates menu/custom runner strings to match new UI wording/keys.
RunCat365/Properties/Strings.es.resx Updates menu/custom runner strings to match new UI wording/keys.
RunCat365/Properties/Strings.de.resx Updates menu/custom runner strings and improves German translations.
RunCat365/Properties/Strings.Designer.cs Syncs strongly-typed resource properties with renamed/removed keys.
RunCat365/Properties/Resources.resx Adds slider icon image resources (rabbit/turtle).
RunCat365/Properties/Resources.Designer.cs Syncs strongly-typed resource accessors for new images.
RunCat365/Program.cs Refactors fetch loop to async/background slice, adds custom-runner hooks to context menu, and renames “open project page”.
RunCat365/NetworkRepository.cs Makes network optional/nullable and removes implicit Update() from Get().
RunCat365/MemoryRepository.cs Removes implicit Update() from Get().
RunCat365/LaunchAtStartupManager.cs Changes API to “toggle based on current state” and updates implementation/wiring.
RunCat365/GPURepository.cs Extracts counter creation/cleanup and adjusts update/availability behavior.
RunCat365/FrameAnimationView.cs Adds a custom control to preview frame animations.
RunCat365/FPSMaxLimit.cs Renames parameter for consistency (fpsMaxLimit).
RunCat365/FlatTrackBar.cs Adds a custom flat slider control used by the custom runner preview speed UI.
RunCat365/EndlessGameForm.cs Fixes constant name typo (JUMP_THREDHOLDJUMP_THRESHOLD).
RunCat365/CustomRunnerRepository.cs Adds safer bitmap loading, refines save/delete behavior, introduces frame count constants.
RunCat365/CustomRunnerProfile.cs Adds file header/license block.
RunCat365/CustomRunnerForm.cs Major UI refactor: table layout, drag/drop frame reordering, new preview control + slider UI, updated button rendering.
RunCat365/CPURepository.cs Minor cleanup (comment removal) in counter priming.
RunCat365/ContextMenuManager.cs Adds custom runner thumbnails, custom icon recoloring, menu rename, and safer icon swapping.
RunCat365/BitmapExtension.cs Renames field for style consistency in BitmapLock.
.gitignore Adds .claude/ ignore entry.
Files not reviewed (2)
  • RunCat365/Properties/Resources.Designer.cs: Language not supported
  • RunCat365/Properties/Strings.Designer.cs: Language not supported

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

Comment thread RunCat365/Program.cs
Comment thread RunCat365/GPURepository.cs
Comment thread RunCat365/TemperatureRepository.cs
Comment thread RunCat365/CustomRunnerRepository.cs
Comment thread RunCat365/CustomRunnerForm.cs
Comment thread RunCat365/CustomRunnerForm.cs
Comment thread RunCat365/Program.cs
- Guard FetchTick against unhandled exceptions to keep the fetch loop alive
- Broaden GPU/Temperature counter Update() catch to cover Win32Exception and UnauthorizedAccessException
- Drop frame on empty area now appends to the true end of the list
- Open Project Page now points to the repo web URL instead of the .git clone URL

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Kyome22 Kyome22 merged commit d48e8b6 into main May 22, 2026
@Kyome22 Kyome22 deleted the refactor-post-merge-cleanup branch May 22, 2026 08:52
@Kyome22
Copy link
Copy Markdown
Collaborator Author

Kyome22 commented May 23, 2026

スクリーンショット 2026-05-23 152651 スクリーンショット 2026-05-23 152756 スクリーンショット 2026-05-23 153039 スクリーンショット 2026-05-23 153111

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.

2 participants