feat(control): add the Control Centre companion - #17
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughChangesControl contract and extension
Privileged installation and CLI exposure
Setup diagnostics and authorisation
App URL relay and lifecycle
Project wiring and feasibility evidence
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 63cbc002-c693-4b6f-a348-8a443ccc4b17
📒 Files selected for processing (57)
App/ClamshellApp/ClamshellApp.swiftApp/ClamshellApp/Control/ApplicationLaunchPolicy.swiftApp/ClamshellApp/Control/ControlActionApplicationDelegate.swiftApp/ClamshellApp/Control/ControlActionHandler.swiftApp/ClamshellApp/Info.plistApp/ClamshellApp/Setup/Diagnostics/CompanionDiagnosing.swiftApp/ClamshellApp/Setup/Diagnostics/CompanionDiagnostics.swiftApp/ClamshellApp/Setup/Diagnostics/CompanionPayloadInspecting.swiftApp/ClamshellApp/Setup/Diagnostics/FoundationCompanionPayloadInspector.swiftApp/ClamshellApp/Setup/Diagnostics/InstallationStatusReading.swiftApp/ClamshellApp/Setup/Privilege/AdministratorAuthorizationError.swiftApp/ClamshellApp/Setup/Privilege/AdministratorAuthorizing.swiftApp/ClamshellApp/Setup/Privilege/AdministratorRequest.swiftApp/ClamshellApp/Setup/Privilege/AppleScriptAdministratorAuthorizer.swiftApp/ClamshellApp/Setup/SetupComposition.swiftApp/ClamshellApp/Setup/SetupModel.swiftApp/ClamshellApp/Setup/SetupState.swiftApp/ClamshellApp/Setup/SetupView.swiftApp/ClamshellApp/Setup/SetupWindowController.swiftApp/ClamshellAppTests/AppleScriptAdministratorAuthorizerTests.swiftApp/ClamshellAppTests/ApplicationLaunchPolicyTests.swiftApp/ClamshellAppTests/CompanionDiagnosticsTests.swiftApp/ClamshellAppTests/ControlActionHandlerTests.swiftApp/ClamshellAppTests/SetupModelTests.swiftApp/ClamshellControl/BatteryClamshellControl.swiftApp/ClamshellControl/ClamshellControlBundle.swiftApp/ClamshellControl/Info.plistApp/ClamshellControl/Intent/ClamshellControlIntents.swiftApp/ClamshellControl/Intent/SetBatteryClamshellIntent.swiftApp/ClamshellControl/Intent/WorkspaceControlActionRequester.swiftApp/ClamshellControl/Model/ControlModel.swiftApp/ClamshellControlProtocol/ControlActionRequest.swiftApp/ClamshellControlTests/ControlActionRequestTests.swiftApp/ClamshellControlTests/ControlModelTests.swiftApp/ClamshellControlTests/SetBatteryClamshellIntentTests.swiftApp/ClamshellControlTests/WorkspaceControlActionRequesterTests.swiftPackage.swiftSources/ClamshellCLI/Commands/SetupCommand.swiftSources/ClamshellCLI/Commands/UninstallCommand.swiftSources/ClamshellCore/Errors/ClamshellError.swiftSources/ClamshellCore/Power/PowerSettingsClient.swiftSources/ClamshellCore/Power/PowerSettingsParser.swiftSources/ClamshellCore/Privilege/Installation/CompanionCommandInstallation.swiftSources/ClamshellCore/Privilege/Installation/FoundationInstallationFileSystem.swiftSources/ClamshellCore/Privilege/Installation/InstallationFileSystem.swiftSources/ClamshellCore/Privilege/Installation/InstallationStatus.swiftSources/ClamshellCore/Privilege/Installation/PrivilegedInstallation.swiftSources/ClamshellCore/Privilege/PrivilegedPaths.swiftTests/ClamshellCLITests/Commands/SetupCommandTests.swiftTests/ClamshellCoreTests/Power/PowerSettingsClientTests.swiftTests/ClamshellCoreTests/Power/PowerSettingsParserTests.swiftTests/ClamshellCoreTests/Privilege/Installation/PrivilegedInstallationCompanionTests.swiftTests/ClamshellCoreTests/Support/InstallationTestSupport.swiftdocs/control-centre-action-relay-design.mddocs/control-centre-action-relay-implementation-plan.mddocs/control-feasibility-test.mdproject.yml
8032520 to
5575bef
Compare
|
Out-of-scope check: the design, implementation plan, and feasibility record remain in this PR. Issue #5 includes an ad-hoc distributed app, a Control Centre extension, and a root helper boundary. These documents record the approved architecture, security constraints, and release gate for that work, so they are part of the issue scope. |
Summary
SleepDisabledvalue frompmset -g.Reason
An ad-hoc-signed main app cannot run the control intent through
linkd. The extension can run the intent, but it cannot run the privileged helper. This change keeps the intent in the extension and sends a validated custom URL to the background app. The app then uses the existing helper and reloads the control from the real system state.User impact
Users can install one ad-hoc-signed app from the GitHub release. They can add Battery Clamshell Mode to Control Centre. A control action does not show a window, Dock icon, or menu-bar item. The control colour follows the verified
pmsetstate.Verification
swift format lint --recursive --strict Package.swift Sources Tests Appswiftlint lint --strictscripts/check.shCloses #5