[Bug] With two Genie windows open, saving a new profile in one removes the profiles saved in the other
Maintainers usually reply within 5 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start with ProfileStore.Save and the Profiles.Load call in the MainWindowViewModel constructor, then trace the SaveProfiles() callers in the Connect dialog and the layout commands. Reproduce the steps with two windows and check Config/profiles.json after each save. Done when a profile saved in one window survives a save from another window, and the deletion and rename paths still behave correctly.
Written by the indexing model from the issue text.
Description
What happened
I run one Genie window per character, all from the same install, so they share one profile list (Config/profiles.json).
Each window reads that file once, when it starts, and writes its whole list back whenever it saves a profile. A window that was already open when another window added a profile does not have that profile in its list, so its next save removes it from the file. The saved password and the startup layout go with it. Nothing is printed; the profile is just missing the next time Genie starts.
The Connect dialog is not the only thing that saves the list. Setting a startup layout does too (#layout default <name> on a profile layout, or Set as Default in Manage Layouts), so a window that has been open for days can remove another character's profile without the Connect dialog being opened.
What you expected
A profile saved in one window to still be there after another window saves. The file is shared, so a save should put this window's change on top of what the file holds now, not replace the file with what this window read when it started.
Steps to reproduce
- Start Genie and leave it open. This is window A.
- Start Genie a second time. This is window B.
- In B, open File > Connect.... Enter the name
Second window, set Mode to Lich proxy (local) so no account is needed, and press Save. Close the dialog. Config/profiles.jsonnow holdsSecond window.- In A, open File > Connect.... The Profile list does not have
Second window. Enter the nameFirst window, set Mode to Lich proxy (local), and press Save. Config/profiles.jsonnow holds onlyFirst window.Second windowis gone.
Environment
- OS + version: Ubuntu 26.04
- Genie 5 version: 5.0.0
- Install type: AppImage
- Connection mode: not connected (the steps need no connection)
Logs / session capture
The profile names in Config/profiles.json:
after step 3: Second window
after step 5: First window
Anything else
Cause, as far as I can read it:
MainWindowViewModelcallsProfiles.Load(_profilesPath)once, in its constructor.ProfileStore.Saveserialises the list it has in memory and replaces the file with it. It does not read the file first.SaveProfiles()runs from the Connect dialog (Save and Delete), from Manage Layouts (Set as Default, and deleting or renaming the layout that is the profile's default), from#layout default <name>on a profile layout, and from#layout deletewhen the deleted layout was the profile's default.
The same is true of main as of 0a9b441.
Workaround: close every other window before doing anything that saves a profile, or keep a copy of profiles.json.
I have a fix with tests (Save reads the file again and puts only this window's own changes on top of it) and can open a pull request if that is welcome.
- Dominant language
- C#
- Stars
- 2
- Forks
- 5
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenieClient/Genie5
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
GenieClient/Genie5#496 ·
Maintainers usually reply within 5 days
-
enhancement g4-regression
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GenieClient/Genie5#494 ·
Maintainers usually reply within 5 days
-
area:ui-dock enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GenieClient/Genie5#462 ·
Maintainers usually reply within 5 days
-
area:mapper bug est:<1d P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
GenieClient/Genie5#449 · 1 comment ·
Maintainers usually reply within 5 days
-
[Bug] Maps ▸ Update from Official Repo / Repair Maps give no notification of success or failurePossibly taken A pull request linked to this issue is open or already merged. Openarea:mapper area:updater bug est:<1d P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GenieClient/Genie5#423 · 1 assignee ·
Maintainers usually reply within 5 days
All issues in GenieClient/Genie5
Similar issues
-
documentation good first issue kind:task level:starter size:s
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Arggon/ArggonStores#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Tool] MockAPIOpenhas-image has-license has-readme new-tool ready-to-approve repo-verified
Difficulty 1/5 Under an hour Newbie friendliness 72/100
shanselman/TinyToolTown#956 ·
Maintainers usually reply within 2 days
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Native build script prints a traceback when Git is missing from PATHPossibly taken @Jaisuryan-web claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KnifeLemon/Filee#1953 ·
Maintainers usually reply within 1 day