Improve URL/realm handling for ESPProvisionProvider#32
Conversation
…ESPProvisionProvider
…call, it's the only place it's used.
… for provisioning
|
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
This PR centralizes ESP provisioning URL and realm resolution so device provisioning can use the active console realm/API URL instead of the previous hardcoded /api/master default.
Changes:
- Adds
ESPProvisionURLResolverwith tests for deriving realm and API URL from current, target, base, and stored values. - Passes
apiURLandrealmthrough the ESP provisioning flow to backend registration and device config. - Updates mocks, provider tests, and Xcode project references for the new resolver/signatures.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
ORLib/ConsoleProviders/ESPProvision/ESPProvisionURLResolver.swift |
Adds URL/realm derivation logic for ESP provisioning. |
ORLib/UI/ORViewController.swift |
Resolves API URL/realm at provision time and reports API URL resolution failures. |
ORLib/ConsoleProviders/ESPProvision/ESPProvisionProvider.swift |
Changes provisioning entry point to accept explicit API URL and realm. |
ORLib/ConsoleProviders/ESPProvision/DeviceProvision.swift |
Propagates API URL/realm into REST provisioning and device config. |
ORLib/ConsoleProviders/ESPProvision/DeviceProvisionAPI.swift |
Accepts API URL per provisioning request instead of storing it. |
ORLib/ConsoleProviders/ESPProvision/DeviceConnection.swift |
Forwards realm into OpenRemote config messages. |
Tests/ESPProvisionURLResolverTest.swift |
Adds resolver coverage for realm precedence, API URL construction, and encoding. |
Tests/ESPProvisionProviderTest.swift |
Updates provider tests for explicit API URL/realm propagation. |
Tests/DeviceProvisionAPIMock.swift |
Records the API URL passed to provisioning. |
ORLib.xcodeproj/project.pbxproj |
Registers the new resolver and test files in Xcode targets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



No description provided.