Update App.jsx#483
Open
aditisb1212-lab wants to merge 1 commit into
Open
Conversation
|
@aditisb1212-lab is attempting to deploy a commit to the Darshan's projects Team on Vercel. A member of the Team first needs to authorize it. |
imDarshanGK
requested changes
Jun 30, 2026
imDarshanGK
left a comment
Owner
There was a problem hiding this comment.
@aditisb1212-lab issue number?
Author
|
Update App.jsx #483 is issue number |
Author
|
Hello @imDarshanGK can you tell me mistake of there is present or please merge this as tag of completion |
imDarshanGK
requested changes
Jul 2, 2026
imDarshanGK
left a comment
Owner
There was a problem hiding this comment.
@aditisb1212-lab issue number?
Author
Owner
|
@aditisb1212-lab add video demo |
Author
|
Okk |
Author
|
Check @imDarshanGK #950 pull request added demo video |
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR fixes a startup initialization issue in
App.jsxwhere the saved default model from settings could be overwritten during application bootstrap.What changed?
Promise.allSettled()calls inbootstrap().api.getSettings()to the end of the promise array.setSettings,setModel, andsetLanguage) are applied after all other initialization state updates.Before
The application processed settings before the Ollama status update, which could cause the saved
default_modelto be overwritten during initialization.if (mRes.status === "fulfilled") setModels(mRes.value.models || []);
if (sRes.status === "fulfilled") setSessions((sRes.value || []).map(s => ({ ...s, color: getSessionColor(s.id) })));
if (settRes.status === "fulfilled") {
setSettings(settRes.value);
if (settRes.value.default_model) setModel(settRes.value.default_model);
if (settRes.value.default_language) setLanguage(settRes.value.default_language);
}
if (stRes.status === "fulfilled") {
setOllamaOk(stRes.value.ollama_running);
} else {
setOllamaOk(false);
}
✅ CORRECTED CODE
if (mRes.status === "fulfilled") setModels(mRes.value.models || []);
if (sRes.status === "fulfilled") setSessions((sRes.value || []).map(s => ({ ...s, color: getSessionColor(s.id) })));
if (stRes.status === "fulfilled") {
setOllamaOk(stRes.value.ollama_running);
} else {
setOllamaOk(false);
}
// ✅ Settings applied LAST to ensure defaults override initial state
if (settRes.status === "fulfilled") {
setSettings(settRes.value);
if (settRes.value.default_model) setModel(settRes.value.default_model);
if (settRes.value.default_language) setLanguage(settRes.value.default_language);
}