fix: Consolidate Agentic CLI connection loading into host adapter#31123
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Why no E2E tests are needed:
No performance impact: These changes only affect how a loading notification is dispatched during SDK connection establishment - no rendering, list, or startup changes. Performance Test Selection: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #31123 +/- ##
=======================================
Coverage 82.92% 82.92%
=======================================
Files 5611 5610 -1
Lines 144694 144692 -2
Branches 33629 33630 +1
=======================================
+ Hits 119981 119982 +1
+ Misses 16632 16631 -1
+ Partials 8081 8079 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Agentic CLI connection loading duplicated the same notification logic already implemented in the SDK Connect V2 host application adapter (
agenticCliLoading.tsdispatchedshowSimpleNotification/hideNotificationByIddirectly).This PR removes that duplicate module and routes Agentic CLI loading through
deps.hostapp.showConnectionLoading/hideConnectionLoading, keeping a single code path for connection-loading UI.showConnectionLoadingnow accepts optionalShowConnectionLoadingOptionswithautodismissMs. The default remains 10s for standard SDK Connect flows; Agentic CLI passes 15s viaAGENTIC_CLI_CONNECTION_LOADING_AUTODISMISS_MSto accommodate the longer MWP → OTP → dashboard connect sequence.Changelog
CHANGELOG entry: null
Related issues
Fixes: #30911 (comment)
Manual testing steps
Screenshots/Recordings
Before
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
UI notification plumbing refactor with no auth or data-path changes; default 10s autodismiss behavior is preserved for non–Agentic CLI callers.
Overview
Removes the Agentic CLI–specific loading helpers in
agenticCliLoading.tsand routes connection loading through the shared SDK Connect V2 host application adapter instead.showConnectionLoading/hideConnectionLoadingonIHostApplicationAdapternow accept optionalShowConnectionLoadingOptionswithautodismissMs(default 10s; Agentic CLI uses exported 15s for longer MWP → OTP → dashboard flows).AgenticCliMwpConnectionServicecallsdeps.hostapp.showConnectionLoading/hideConnectionLoadingwith that timeout rather than dispatching notifications directly. Tests were updated accordingly and adapter coverage was added for custom autodismiss.Reviewed by Cursor Bugbot for commit aa778c8. Bugbot is set up for automated code reviews on this repo. Configure here.