fix(frontend): repair gateway integration drawers - #6382
Conversation
|
@Aman-goel-04 is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe integration drawer adds reconnect and removal actions for invalid single connections. The permission drawer stages changes locally, saves them with “Done”, and discards them when closed without saving. ChangesIntegration drawer updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The invalid-connection drawer can still offer Add alongside Reconnect, allowing users to start the wrong flow, while reported lint failures and overlapping reconnect/remove actions leave additional merge-readiness concerns. The PR should not merge until these issues are fixed or explicitly accepted. Sequence Diagram(s)sequenceDiagram
participant ConnectedRow
participant ReconnectButton
participant useReconnectToolConnection
participant modal
participant useToolConnectionActions
ConnectedRow->>ReconnectButton: render for invalid single connection
ReconnectButton->>useReconnectToolConnection: reconnect connection
ConnectedRow->>modal: confirm connection removal
modal->>useToolConnectionActions: delete connection
sequenceDiagram
actor User
participant DrawerBody
participant IntegrationPermissionDrawer
participant Parent
User->>DrawerBody: change tool permission
DrawerBody->>IntegrationPermissionDrawer: update draft permission
User->>IntegrationPermissionDrawer: click Done
IntegrationPermissionDrawer->>Parent: save draft permissions
IntegrationPermissionDrawer->>User: close drawer
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes address issue
✨ 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 |
ca58a14 to
1dc9715
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 2b9b32e9-c169-4507-b7e0-d0fa2db7a744
📒 Files selected for processing (2)
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/AgentIntegrationDrawer.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/IntegrationPermissionDrawer.tsx
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 47cf6769-e6df-4c11-9eee-736458f82e43
📒 Files selected for processing (1)
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/AgentIntegrationDrawer.tsx
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.
| <div className="flex shrink-0 items-center gap-1.5"> | ||
| {reconnectable ? <ReconnectButton connection={single} /> : null} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Hide Add for invalid connections.
When reconnectable is true, the action row still renders Add at Lines 177-181. Move Add into the non-reconnectable branch so invalid connections expose only Reconnect and Remove.
Summary
Closing an integration permission drawer with the X wrote permission changes into the agent draft, even though the X reads as cancel. The drawer now keeps permission edits locally and applies them only when the user clicks Done.
Invalid OAuth connections in Add integration were marked
needs reconnectbut only offered Add. They now expose Reconnect and Remove actions directly in that drawer.The reported All Apps count mismatch was investigated separately. The current catalog intentionally shows connected integrations in both sections so users can connect another account; the displayed count matches the rendered rows.
Fixes #6348
Testing
Verified locally
pnpm --filter @agenta/entity-ui lint.pnpm --filter @agenta/entity-ui build.pnpm --filter @agenta/entity-ui test:unit.Added or updated tests
N/A. The existing catalog unit tests already cover the intentional behavior of showing connected integrations in both Connected in your workspace and All Apps.
QA follow-up
N/A
Demo
Attach real-app captures from this branch:
Before #1.mp4: Closing the permission drawer with X persists the edited permission.Before.1.mp4
After #1.mp4: Closing the permission drawer with X discards the edited permission.After.1.mov
Before #2.mp4: An invalid connection in Add integration is markedneeds reconnectbut offers only Add.Before.2.mov
After #2.mp4: An invalid connection in Add integration now offers Reconnect and Remove.After.2.mov
3rows /ALL APPS 3) and GitHub (6rows /ALL APPS 6) count verification. No code change was needed for this reported behavior.Checklist