-
Notifications
You must be signed in to change notification settings - Fork 21
🐛 Fix delayed profile deletion by ensuring immediate UI updates #718
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
🐛 Fix delayed profile deletion by ensuring immediate UI updates #718
Conversation
- Fixed handleDeleteProfile to use dispatch() for immediate state updates - Removed duplicate message sending in handleMakeActive for consistency - Profile deletion now provides immediate visual feedback instead of delayed visibility Fixes konveyor#625 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Ian Bolton <[email protected]>
b9674ee
to
704dce2
Compare
Warning Rate limit exceeded@ibolton336 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 10 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe change updates ProfileManagerPage.tsx to handle delete and activate actions via local state dispatch instead of extension host messaging. handleDeleteProfile now dispatches DELETE_PROFILE with the profile id; handleMakeActive dispatches SET_ACTIVE_PROFILE with the id. Previously, both also posted messages to window.vscode. The add-and-duplicate flow still posts ADD_PROFILE to the host after dispatch. No exported/public interfaces were modified. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested reviewers
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (3)
webview-ui/src/components/ProfileManager/ProfileManagerPage.tsx (3)
42-57
: Typo: handleDupelicateProfile → handleDuplicateProfile (update usage).
Keeps naming consistent and avoids confusion.Apply this diff:
- const handleDupelicateProfile = (profile: AnalysisProfile) => { + const handleDuplicateProfile = (profile: AnalysisProfile) => { @@ - <ProfileList + <ProfileList @@ - onDuplicate={handleDupelicateProfile} + onDuplicate={handleDuplicateProfile}Also applies to: 107-107
59-77
: Create flow may not persist to host; align with duplicate path.
Duplicate posts ADD_PROFILE to host; create does not.If persistence isn’t handled elsewhere, add:
dispatch({ type: "ADD_PROFILE", payload: newProfile }); setSelectedProfileId(newProfile.id); // <- Keep this + window.vscode?.postMessage?.({ type: "ADD_PROFILE", payload: newProfile });
84-86
: Active profile change persistence — verify host sync.
Only dispatching may leave host state stale across reloads.If no middleware syncs this, add:
const handleMakeActive = (id: string) => { dispatch({ type: "SET_ACTIVE_PROFILE", payload: id }); + window.vscode?.postMessage?.({ type: "SET_ACTIVE_PROFILE", payload: id }); };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
webview-ui/src/components/ProfileManager/ProfileManagerPage.tsx
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: djzager
PR: konveyor/editor-extensions#645
File: vscode/src/webviewMessageHandler.ts:575-577
Timestamp: 2025-08-01T13:53:20.774Z
Learning: The TOGGLE_AGENT_MODE action handler in vscode/src/webviewMessageHandler.ts correctly calls toggleAgentMode() without parameters, as the toggleAgentMode function in vscode/src/utilities/configuration.ts has been updated to internally handle reading and toggling the agent mode configuration value.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build (windows)
🔇 Additional comments (1)
webview-ui/src/components/ProfileManager/ProfileManagerPage.tsx (1)
80-80
: Immediate dispatch for delete improves UX. Nice.
This aligns with the PR objective for instant visual feedback.
webview-ui/src/components/ProfileManager/ProfileManagerPage.tsx
Outdated
Show resolved
Hide resolved
…rofile Previously, deleting any profile would clear the selected profile, causing the editor to unexpectedly clear when deleting non-selected profiles. Now only clears selection when the deleted profile is currently selected. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Ian Bolton <[email protected]>
3fb55fb
to
e001548
Compare
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.
ACK
Fixes #625
Summary by CodeRabbit