Skip to content

Fix build errors: Clean up duplicate code from merge#1337

Closed
GopherTheCoder wants to merge 1 commit intoValkirie:mainfrom
GopherTheCoder:main
Closed

Fix build errors: Clean up duplicate code from merge#1337
GopherTheCoder wants to merge 1 commit intoValkirie:mainfrom
GopherTheCoder:main

Conversation

@GopherTheCoder
Copy link
Contributor

@GopherTheCoder GopherTheCoder commented Dec 9, 2025

There seem to be few unintentional mistakes during the merge. You're good to merge it if it passes the workflow. Thank you.

Summary by CodeRabbit

  • Refactor
    • Removed duplicate property and enum declarations across device management, profile views, and library components.
    • Eliminated redundant UI attributes and unnecessary exception handlers.
    • Streamlined internal class structures to reduce code complexity and improve overall maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Walkthrough

This pull request removes duplicated code and redundant declarations across multiple files, including duplicate class members, enum definitions, exception handlers, and XML attributes. The changes eliminate code duplication without altering functionality.

Changes

Cohort / File(s) Change Summary
Duplicate class members removed
HandheldCompanion/Devices/IDevice.cs
Removed protected DeviceOpen field, public virtual IsOpen property, P/Invoke GetPhysicallyInstalledSystemMemory declaration, protected physicalInstalledRamGB field, and duplicate public Dictionary<Type, Hotkey> DeviceHotkeys declaration.
Duplicate enum definition removed
HandheldCompanion/Managers/LibraryManager.cs
Removed duplicate [Flags] public enum ErrorType declaration.
Redundant exception handler removed
HandheldCompanion/Managers/OSDManager.cs
Removed empty duplicate catch (NotImplementedException) block from Draw(int processId) method.
Duplicate property removed
HandheldCompanion/ViewModels/ProfileViewModel.cs
Removed second occurrence of duplicate public GamePlatform PlatformType property.
Duplicate XML attribute removed
HandheldCompanion/Views/SplashScreen.xaml
Removed duplicate Foreground="White" attribute from ProgressRing element.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify that removing DeviceOpen and IsOpen from IDevice does not break derived class implementations or external callers.
  • Confirm that removing physicalInstalledRamGB field is not referenced elsewhere in the codebase.
  • Ensure duplicate removal of DeviceHotkeys dictionary doesn't affect initialization logic.

Poem

🐰 Duplicates were nesting like rabbits in spring,
So we hopped through and cleaned up each thing,
No logic was lost, just clutter gone,
Code is now crisp—let's march on!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main purpose of the PR—removing duplicate code introduced during a merge to fix build errors.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@GopherTheCoder GopherTheCoder changed the title Fix build errors Fix build errors: Clean up duplicate code from merge Dec 9, 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.

1 participant