Skip to content

feat(theme): apply a theme saved by any process - #103

Merged
mrcsin merged 1 commit into
masterfrom
live-theme
Oct 1, 2026
Merged

mrcsin merged 1 commit into
masterfrom
live-theme

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 1, 2026

Copy link
Copy Markdown
Member

Problem

An operator runs several windows, one process each, over one configuration directory. A saved theme took effect only at the next start, and only in the process that saved it.

What changed

Group D (Task 8) of docs/plans/20260929-window-per-process.md.

  • Every process watches app/. A change is loaded once per quiet burst, and a changed theme is applied on the UI thread: a theme saved by any window switches all of them within about 2 s. The watch also loads once at start, so a save made while a process was still starting reaches it.
  • A buffer overflow reloads. Any other watcher error, or a refused or missing folder, is reported once, and the folder is opened again every 5 s. A failed load reaches the window's message panel and keeps the current theme.
  • A theme-only save shows no restart notice. A save that also changes another key says the theme is already applied. An open settings dialog follows the theme its window applied.
  • Section files are read, copied and probed with FileShare.ReadWrite | Delete, so one process reading or saving never blocks another process's File.Replace. The lost update between two simultaneous saves is recorded in docs/plans/backlog.md.

The plan stays in docs/plans/; Groups E-G follow. #90 stays open: it is wider than this group.

Verification

  • dotnet test SemiPlot.slnx: 1547 unit and 136 integration tests pass. The affected test classes also pass on Linux (mcr.microsoft.com/dotnet/sdk:10.0, non-root): 154 tests. Every review regression has a test that failed before its fix.
  • Watcher behaviour was measured on Windows 11 / .NET 10: a deleted folder raises Error, a recreated one raises nothing, and a folder renamed away is followed. File.Replace succeeds against the new share modes and fails against the old ones.
  • Manual stand walk: two windows switch theme together with no notice, the open dialog follows the theme, a language save shows the notice and "Restart now", and a window opened by New window outlives the stand. Passed.
Per-task commits before collapse
9d4ac4f docs(theme): record the notice fit and the orphan window's watch
e950dd8 fix(theme): address external review findings
20cbdf8 docs(plans): record the live theme exec run
021f802 fix(theme): report a watcher that stopped
abb1047 docs(comments): cut restated theme test comments
da66d72 fix(theme): address smells findings
d08383f fix(theme): address review findings
99fc145 feat(theme): apply a theme saved by any process

https://claude.ai/code/session_01PfZJa7neMMKPzycFR6iuhD

An operator runs several windows, one process each, over one
configuration directory. The theme is shared by every window, but a
saved theme took effect only at the next start, and only in the
process that saved it.

Every process now watches the app/ section folder. A change is loaded
once per quiet burst on the data scheduler and a changed theme is
applied on the UI thread, so a theme saved by any window switches all
of them within about two seconds. The watch also loads once when it
starts, so a save made while a process was still starting reaches it.
A buffer overflow reloads; any other watcher error, a refused or
missing folder, is reported once and the folder is opened again every
5 s. A failed load reaches the window's message panel and keeps the
theme. A theme-only save shows no restart notice, a save that also
changes another key says the theme is already applied, and an open
settings dialog follows the theme its window applied.

Section files are read and copied with FileShare.ReadWrite | Delete,
and the save probe shares the same way, so one process reading or
saving never blocks another process's File.Replace. The lost update
between two simultaneous saves is recorded in the backlog.

Claude-Session: https://claude.ai/code/session_01PfZJa7neMMKPzycFR6iuhD
@mrcsin
mrcsin marked this pull request as ready for review October 1, 2026 14:27
@mrcsin
mrcsin merged commit 3633631 into master Oct 1, 2026
2 checks passed
@mrcsin
mrcsin deleted the live-theme branch October 1, 2026 14:30
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.

1 participant