fix: hide OneDrive if not OSS#1830
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe hook ChangesConnector Visibility Filtering by Deployment Context
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 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)
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: 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 `@frontend/app/api/queries/useGetConnectorsQuery.ts`:
- Around line 280-288: The optimistic update fails because useGetConnectorsQuery
includes isCloudBrand and isIbmAuthMode in the query key and filters connectors
with isConnectorTypeVisible, but useUpdateConnectorAccessMutation still writes
to CONNECTOR_USER_ACCESS_KEY without those context values and caches the raw
server response; update useUpdateConnectorAccessMutation to derive the same
deployment context (isCloudBrand, isIbmAuthMode) used in useGetConnectorsQuery,
use that full key when calling setQueryData, and apply isConnectorTypeVisible to
the server response before writing to the cache so the optimistic update targets
the correct cache entry and remains filtered by deployment context.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0f89ba1a-c28c-46e7-a450-a6b9d3a950bc
📒 Files selected for processing (2)
frontend/app/api/queries/useGetConnectorsQuery.tsfrontend/lib/brand.ts
useUpdateConnectorAccessMutation wrote unfiltered results to CONNECTOR_USER_ACCESS_KEY while the query caches under brand/auth context. Share connectorUserAccessQueryKey and filterConnectorAccessItems with useGetConnectorAccessQuery so saves update the correct entry.
Hide OneDrive in the frontend if not in OSS
Summary by CodeRabbit