This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Conversation
Rename apiOrigin → relayOrigin for the Socket.IO relay connection and add a dedicated apiOrigin for the REST API used by challenge-exchange auth verification. These are different servers (relay.closedloop.ai vs api.closedloop.ai) and sharing a single setting caused 404s on the auth verify endpoint. - Rename DesktopSettings.apiOrigin → relayOrigin; add new apiOrigin - Add settings migration handling 4 scenarios: fresh install, pre-auth, intermediate build (with authApiOrigin), and already-migrated - Remove electron-store defaults to prevent migration key contamination - Rename normalizeAndValidateApiOrigin → normalizeAndValidateOrigin - Make webAppOrigin live via optional getter (CORS updates per-request) - Split settings UI into responsive Cloud Relay / Local Gateway columns - Add migration tests with sentinel URLs, auth wiring test, CORS test
Code Review SummaryStatus: Needs Attention Reviewers: Bug Hunter A, Bug Hunter B, Unified Auditor, Premise Reviewer, cloud-command-executor-specialist Findings
HIGH Issues (should fix)
MEDIUM Issues (consider)
Validation Stats
Recommendation: Address the HIGH issue — empty string inputs will block users from completing onboarding when relay/API origin fields are left blank. |
…aram - Add .trim() guard on relayOrigin/apiOrigin in onboarding handler so empty strings are treated as absent (keeps existing/default values) - Rename connect() parameter from apiOrigin to relayOrigin for consistency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename apiOrigin → relayOrigin for the Socket.IO relay connection and add a dedicated apiOrigin for the REST API used by challenge-exchange auth verification. These are different servers (relay.closedloop.ai vs api.closedloop.ai) and sharing a single setting caused 404s on the auth verify endpoint.