-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix input box revert issue and configuration loss during profile switch #955 #979
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
Conversation
|
a492a36 to
977c133
Compare
a6da37b to
02e1d9d
Compare
|
Awesome - this looks way cleaner! Do you mind explaining which issues were fixed for you from each part of these changes? I confess that all of this code has gotten very complicated and I don't understand all of it. |
|
nice mate! |
Fixed |
02e1d9d to
952b2dc
Compare
code updated, see Description for details of the changes |
Thanks! 😄 |
952b2dc to
49ef7ba
Compare
|
After testing, the issue with editing fields in the settings panel has been resolved, but the same issue still occurs during the API response process. This may be due to the rapid updates to Fixing this issue would require a large-scale change to separate the state of different components. It is recommended to mark the settings as read-only during the API response process to bypass this problem. |
| } | ||
| } | ||
| break | ||
| case "upsertApiConfiguration": |
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.
@mrubens @System233 i have an idea that remove upsertApiConfiguration and replace it with saveApiConfiguration,
we will have a little bit more change, on handleSubmit we will add 1 more loadApiConfiguration to that section, so we will decouple save & load api
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.
@System233 @mrubens like this System233#1 ?
49ef7ba to
94f14a8
Compare
|
So my fix might still be worth working on... I started working on a local
storage save for the webview UI and adding a queue system for it.
…On Fri, 14 Feb 2025, 10:45 System233, ***@***.***> wrote:
After testing, the issue with editing fields in the settings panel has
been resolved, but the same issue still persists during the API response
process. This might be due to the rapid updates of ExtensionStateContext
during the conversation.
Fixing this issue would require widespread changes, so it is recommended
to mark the settings as read-only during the API response process.
—
Reply to this email directly, view it on GitHub
<#979 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUTT3L3OSEPQDG2ILU52RD2PXCN3AVCNFSM6AAAAABXCDUWNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJYHE2TOOJWGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: System233]*System233* left a comment (RooCodeInc/Roo-Code#979)
<#979 (comment)>
After testing, the issue with editing fields in the settings panel has
been resolved, but the same issue still persists during the API response
process. This might be due to the rapid updates of ExtensionStateContext
during the conversation.
Fixing this issue would require widespread changes, so it is recommended
to mark the settings as read-only during the API response process.
—
Reply to this email directly, view it on GitHub
<#979 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUTT3L3OSEPQDG2ILU52RD2PXCN3AVCNFSM6AAAAABXCDUWNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJYHE2TOOJWGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
To achieve this, the simplest solution is to cut off the connection of the settings panel to the ExtensionStateContext. @mrubens Could you please continue to review this PR? Thanks. |
Sorry for the delay - I’m on vacation this weekend and don’t have much time at the laptop. I can try tonight though. @samhvw8 wrote a lot of the original code so I’m curious for his thoughts as well. Thank you! |
|
Since the issue was raised, I’ve been unable to use the settings panel properly for several consecutive days. The configuration items I enter through the keyboard are often automatically deleted, and switching profiles can corrupt the correct profile, displaying a hybrid profile made up of fields from multiple profiles. This leads to issues like #1017 and #990 (which I’ve encountered firsthand), so I’m eager to fix this issue as soon as possible. @samhvw8, your suggestion is exactly what I initially thought. In the first version of this PR(5c10e96), the functionality of Currently, many patches related to Finally, to resolve the issue of the settings panel rendering with old values when the state is updated, I had to revert the changes made in #889 and restore |
94f14a8 to
4fdee94
Compare
|
Thank you for driving this forward, and sorry I haven’t been that available while on vacation! I’m going to review this as soon as I can. |
|
It’s okay. At the moment, I’ve found an bug with the |
|
I just poked around a bit and it seems to work well! Nice that you were able to bring back the onInput without the typing in the boxes being laggy. As for the vscrui - one option would be for us to use a Roo fork of it? I don't know how actively maintained it is. Let me know if you want me to create a fork within Roo, or if it's not too much trouble going back to the VS Code dropdown that's fine with me too. |
src/core/webview/ClineProvider.ts
Outdated
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.
Maybe we should cut this?
src/core/webview/ClineProvider.ts
Outdated
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.
Great catch here
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.
Reminder to remove this before merging
|
I'm game to try to release this tonight or tomorrow if you get it to a place where you're happy with it. Thanks again so much for digging into this 🙌 |
src/core/config/ConfigManager.ts
Outdated
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.
this cool
|
One bad news is that However, there’s good news too— |
4fdee94 to
9b8b4aa
Compare
9b8b4aa to
7e68f48
Compare
7e68f48 to
7316f82
Compare
mrubens
left a comment
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.
🚀
|
Awesome, feel free to merge whenever you feel good about it! |
|
@System233 can you please shoot me a message on discord? hrudolph is my user id. |
Thanks. I’m working on resolving the issue where unsaved configurations in the settings panel are lost once the API response is completed, which behaves the same as the upstream
Sorry about that, I don't have a Discord account. |
|
Since
@mrubens |
|
Someone in discord noticed that there are still issues with renaming profiles (check out around 2:00 into this video). Any ideas what could be going on there? Thank you! Code_9DwSQCj3cN.mp4 |
I’ve checked the issue, and it’s caused by the settings not being saved. Currently, the configuration is only saved after clicking the Done button or switching profiles, but renaming doesn’t trigger the save functionality. There’s still a synchronization issue here. I can solve it by encapsulating the save and load operations into the rename event handler. |
|
patch almost ready, create a PR to fix the issue later |
All of the above fixed in #1051 |


Fixes #955
Description
This PR made the following changes:
Added a saveApiConfiguration operation to provide a configuration save function without forced UI updates.
handleInputChange uses saveApiConfiguration to save to avoid overwriting user input when quickly switching input boxes
Merge a large number of async calls in updateApiConfiguration to reduce the time consumption of upsertApiConfiguration events (reduce the impact of the disorder of asynchronous tasks. Before RPC and transactions are implemented, the apiConfiguration merging phenomenon that occurs when switching profiles at high speed will not be completely solved)
Improved model loading requests. Users can get model list feedback in time when entering URLs, avoiding redundant interval updates
2025-02-13.20-48-53.mp4
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Fixes input box revert and configuration loss during profile switch, improves performance and loading logic in
ClineProvider.ts,ApiOptions.tsx, andExtensionStateContext.tsx.onBlurtoonInputinApiOptions.tsx.updateGlobalStateandstoreSecretcalls are wrapped inPromise.allinClineProvider.ts.Promise.allinClineProvider.ts.useIntervalwithsetTimeoutinApiOptions.tsx.ClineProvider.ts.softUpdatelogic fromhandleInputChangeinExtensionStateContext.tsxto ensure immediate synchronization.This description was created by
for 5c10e96b68f1660532706f8a1857073f0d8e6508. It will automatically update as commits are pushed.