Conversation
There was a problem hiding this comment.
Pull Request Overview
This is a major refactoring pull request that restructures the Mos application's architecture, focusing on modernizing the preferences UI, improving internationalization, and enhancing the button binding and scrolling features.
Key Changes:
- Refactored preferences panel from "Advanced" to "Scrolling" and "Application" views, consolidating scroll settings
- Removed legacy string files and replaced i18n references with NSLocalizedString for better localization
- Introduced new button binding system with
ButtonBinding,RecordedEvent, andSystemShortcutinfrastructure - Enhanced scroll simulation with trackpad phase support and improved momentum handling
Reviewed Changes
Copilot reviewed 123 out of 170 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Multiple .lproj/Main.strings |
Deleted legacy localization files (full file removal) |
PreferencesScrollingViewController.swift |
New consolidated scrolling preferences view with enhanced UI controls |
PreferencesApplicationViewController.swift |
Renamed from Exception view, manages per-application settings |
Application.swift |
Renamed from ExceptionalApplication, updated data model |
SystemShortcut.swift |
New system shortcut definitions and management |
ShortcutManager.swift / ShortcutExecutor.swift |
New shortcut handling infrastructure |
ButtonTableCellView.swift |
New UI component for button binding configuration |
ScrollPoster.swift |
Enhanced with trackpad phase simulation and momentum tracking |
WelcomeViewController.swift / IntroductionViewController.swift |
Updated to use NSLocalizedString |
Constants.swift |
Major refactoring of options structure, removing MODIFIER_KEY structs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public init(withData targetData: Data, matchKey targetDictionaryKey: String = "identity", forObserver observerHandler: @escaping ()->Void = {()}) throws { | ||
| let decoder = JSONDecoder() | ||
| let targetArray = try! decoder.decode([T].self, from: targetData) as [T] | ||
| let targetArray = try decoder.decode([T].self, from: targetData) |
There was a problem hiding this comment.
The initializer signature changed from force-try (try!) to throwing, which is a breaking API change. Any existing code calling this initializer without try/catch will fail to compile. Consider documenting this breaking change or providing a migration path.
| private let scrollDurationLockedDescription = NSLocalizedString( | ||
| "scrollDurationLockedMessage", | ||
| comment: "Message shown when simulate trackpad locks the duration setting" | ||
| ) |
There was a problem hiding this comment.
The localization key 'scrollDurationLockedMessage' should be documented in all localization files. Ensure this key exists in all .lproj directories, otherwise users will see the raw key name.
| static func == (l: OPTIONS_SCROLL_DEFAULT, r: OPTIONS_SCROLL_DEFAULT) -> Bool { | ||
| return ( | ||
| l.smooth == r.smooth && | ||
| l.reverse == r.smooth && |
There was a problem hiding this comment.
Comparison logic error: comparing l.reverse with r.smooth instead of r.reverse. This will cause incorrect equality checks for OPTIONS_SCROLL_DEFAULT instances.
No description provided.