-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix scope switching to reflect changes without reload #9268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Added selectedProfileId to useCallback dependencies in handleConfigUpdate - This ensures the callback properly detects profile changes and triggers necessary UI updates - Fixes issue where switching profiles/orgs required manual reload to see changes fixes CON-5093 Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]> Co-authored-by: nate <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
Ticket analysis
Linked issue: CON-5093: Update scope switching to reflect changes without reload
| Status | Acceptance criteria | Notes |
|---|---|---|
| When switching between profiles/organizations, the UI immediately reflects changes without requiring a manual reload | Only dependency change present; no explicit UI update code or tests | |
| ✅ | Add selectedProfileId to the useCallback dependencies in ParallelListeners.handleConfigUpdate (fix missing dependency) | selectedProfileId was added to the dependency array |
| ✅ | Ensure the config-update callback uses the current selectedProfileId to detect profile changes and trigger UI updates | Dependency addition ensures callback is recreated with latest selectedProfileId |
| ❌ | Provide tests or verification steps that switching profiles/orgs updates the UI immediately | No tests or test files were added or modified in the diff |
| No manual reload required after switching scopes (UX requirement) | Change likely fixes reload need but no runtime verification included |
|
I've reviewed this PR for documentation updates. This is a bug fix that corrects React hook dependencies to ensure the UI properly updates when switching between profiles/organizations. No documentation changes are needed because:
The existing documentation in |
CI Test Failures AnalysisThe failing tests on macOS (Node 18 and 20) are not related to this PR. Here's why: Evidence:
Failing Tests:
These appear to be flaky UI tests in the CLI TUI that are timing-sensitive and fail intermittently on macOS. Conclusion:This PR is ready to merge. The GUI functionality change is sound and all relevant checks have passed. The CLI test failures are a separate issue that exists on main. |
Summary
This PR fixes an issue where switching between profiles/organizations didn't properly reflect changes in the UI without manually reloading the application.
Changes
Technical Details
The issue was caused by a missing dependency in the hook. When checking if the profile had changed (), the callback was using a potentially stale value of . By adding it to the dependency array, React will recreate the callback when changes, ensuring it always has the most up-to-date value.
Testing
When switching between profiles or organizations, the UI should now immediately reflect the changes without requiring a manual reload.
fixes CON-5093
This agent session was co-authored by nate and Continue.
Summary by cubic
Fixes scope switching so the UI updates immediately when changing profiles or organizations, without a manual reload. Addresses Linear CON-5093 by ensuring the config update callback uses the current selectedProfileId.
Written for commit e3d44fb. Summary will update automatically on new commits.