Skip to content

fix(config,tray): review findings: profile seed, discard failures, phantom profiles, tray dialogs (#496) - #502

Merged
Maxaubert merged 4 commits into
mainfrom
fix/review-config-tray
Oct 16, 2026
Merged

Maxaubert merged 4 commits into
mainfrom
fix/review-config-tray

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #496. Fixes from the 2026-10-16 full code review (research/wind/2026-10-16-full-code-review.md), each finding adversarially verified, each diff reviewed by a second agent with follow-ups applied.

Commits:

Gates: build.bat check, build.bat test, Playwright and test:rules pass on this branch and on the combined test build (669 unit tests, 212 Playwright). Combined build deployed signed for owner testing.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH

Maxaubert and others added 4 commits October 16, 2026 03:46
…seed, report a failed discard (#496)

- ListProfileFiles keeps only long names ending in .ini; *.ini also matches 8.3 short names, so a
  backup like Work.ini_bak listed as a phantom profile.
- EnsureProfilesSeeded returns whether the profiles dir is in place. createProfile fails on a
  rolled-back seed instead of creating the dir (the latch) with no Default.ini.
- discardSession replies with discarded:false when the session could not be reset; Settings shows
  "Couldn't discard" and stops the switch, close or quit, so a following switch cannot mirror the
  unsaved session into the outgoing profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
…on failure and on Wind exit (#496)

- After the prompt, re-read under the lock: stop if the active profile changed meanwhile, and
  Discard re-reads the profile file instead of the pre-prompt snapshot.
- A TaskDialogIndirect failure stops Quit or the switch (logged, balloon) instead of dropping the
  session unasked.
- A timer callback cancels the prompt when the served Wind exits, so the stale tray releases its
  mutex and never saves into, or quits, a restarted Wind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
… the tray prompt rules (#496)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
…rror

EnsureProfilesSeeded treats CreateDirectoryW failing with ERROR_ALREADY_EXISTS
(another process created the profiles dir in the race) as success.
OnDiscardSession captures GetLastError() inside the locked block on each
failure branch and logs that value after the lock is released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
@Maxaubert
Maxaubert merged commit 9683744 into main Oct 16, 2026
1 check passed
@Maxaubert
Maxaubert deleted the fix/review-config-tray branch October 16, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(config,tray): review findings 9, 10, 21-24

1 participant