fix(desktop): salvage AhmetArif0 desktop/dashboard fixes (#38289, #38291, #38294) - #39070
Merged
Conversation
…nfig apply The apply handler sent SIGTERM then fired a 150 ms setTimeout to reload the renderer. If the backend took longer to shut down the port was still bound when startHermes() ran after reload, causing an "address already in use" failure. Capture the process reference before resetHermesConnection() nulls it, then await the actual exit event. A 5 s SIGKILL fallback ensures the wait never hangs if the backend ignores SIGTERM.
POST /api/profiles returns model_set: false when the model assignment step fails (e.g. filesystem error) while the profile itself was created successfully. handleCreate discarded the response, so the user received a "Profile created" success toast with no indication that their chosen model was not persisted. Capture the response and show an error toast when a model was selected but model_set is explicitly false, directing the user to set it from the profile editor.
handleSaveDesc and handleAutoDescribe both set their loading flag in a try block but always cleared it unconditionally in finally. When a user opened profile A's description editor, clicked Save, then quickly switched to profile B's editor and saved, profile A's resolving request would clear descSaving/describing while profile B's request was still in-flight, making the "Saving…" indicator disappear prematurely. Track concurrent in-flight counts with descSavingCount and describingCount refs (mirrors the existing activeDescRequest guard pattern). The loading flag is cleared only when the counter reaches zero, i.e. all overlapping requests have settled.
Contributor
🔎 Lint report:
|
1 task
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.
Summary
Salvages three desktop/dashboard bug fixes from @AhmetArif0 onto current
main, with authorship preserved per-commit.Changes
apps/desktop/electron/main.cjs(fix(desktop): wait for backend exit before reloading on connection-config apply #38289):connection-config:applynow waits for the old backend process to actually exit (5s SIGKILL fallback) before reloading, instead of a blind 150ms timer that could reload while the port was still bound.web/src/pages/ProfilesPage.tsx(fix(dashboard): surface model-write failure when creating a profile #38291): profile creation now readsmodel_setfrom the API response and surfaces an error toast when the model write silently failed (previously a success toast hid the failure).web/src/pages/ProfilesPage.tsx(fix(dashboard): prevent stale saving indicator when desc requests overlap #38294):handleSaveDesc/handleAutoDescribeuse in-flight counters so overlapping requests don't clear the saving indicator early.Validation
node --check main.cjstsc --noEmitProfilesPageCherry-picked from PRs #38289, #38291, #38294. Closes those PRs with credit.
Infographic