feat(cli): request Composio backend for integration connect#130
feat(cli): request Composio backend for integration connect#130khaliqgant merged 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughAdds a validated ChangesBackend Selection Feature
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmd/relayfile-cli/main.go`:
- Around line 1039-1047: ensureCloudIntegration currently skips the ready
fast-path whenever requestedBackend is non-empty because only ConnectionID is
stored; fix by persisting and checking the stored backend too. Change
loadSavedConnectionID to return both savedConnectionID and savedBackend (or add
a new loadSavedConnection function), update ensureCloudIntegration to only use
the fast-path when savedConnectionID != "" AND (requestedBackend == "" OR
requestedBackend == savedBackend), and ensure connectCloudIntegration writes the
chosen backend alongside the ConnectionID when the connection succeeds so
subsequent runs can compare backends.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ba76c235-d499-42f8-95a8-38be3db5adb2
📒 Files selected for processing (4)
cmd/relayfile-cli/catalog_test.gocmd/relayfile-cli/main.gocmd/relayfile-cli/main_test.gocmd/relayfile-cli/setup_e2e_test.go
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cmd/relayfile-cli/main.go (1)
4410-4413: ⚡ Quick winRemove unused
loadSavedConnectionIDfunction.The static analysis correctly identifies this function as unused. After refactoring to use
loadSavedConnectiondirectly (which returns the full state includingBackend), this wrapper is no longer called anywhere in the codebase.♻️ Suggested fix
-func loadSavedConnectionID(localDir, provider string) string { - state := loadSavedConnection(localDir, provider) - return strings.TrimSpace(state.ConnectionID) -}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cmd/relayfile-cli/main.go` around lines 4410 - 4413, Delete the unused helper function loadSavedConnectionID: remove its definition (the function that calls loadSavedConnection and returns strings.TrimSpace(state.ConnectionID)) since callers now use loadSavedConnection directly; ensure no remaining references to loadSavedConnectionID exist and run tests/static analysis to confirm removal is safe.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@cmd/relayfile-cli/main.go`:
- Around line 4410-4413: Delete the unused helper function
loadSavedConnectionID: remove its definition (the function that calls
loadSavedConnection and returns strings.TrimSpace(state.ConnectionID)) since
callers now use loadSavedConnection directly; ensure no remaining references to
loadSavedConnectionID exist and run tests/static analysis to confirm removal is
safe.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2660ab59-2ad1-46c4-b45b-1d4330dca76a
📒 Files selected for processing (3)
cmd/relayfile-cli/main.gocmd/relayfile-cli/main_test.gocmd/relayfile-cli/setup_e2e_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- cmd/relayfile-cli/main_test.go
Summary
--backendtorelayfile setupandrelayfile integration connectrequestedBackendto Cloud connect-session requestsTest
go test ./cmd/relayfile-cliCompanion Cloud PR follows to implement the Composio backend session path.