A theme name that does not resolve produces no message anywhere. The terminal
comes up on the compile-time colours and nothing says why.
Seen with theme = Catppuccin Mocha on Windows: the terminal rendered
#282C34 rather than the theme, with no diagnostic in the log, no notice in
the UI, and no indication in the settings window.
Why nothing surfaces
themepkg.open appends "failed to load theme from the path X" to
self._diagnostics (src/config/Config.zig). loadTheme then goes through
the overlay, which builds a fresh config with cloneEmpty, copies the replay
steps onto it, and swaps: self.deinit() frees the old diagnostics list and
self.* = new_config installs one that started empty. The message is written
and then thrown away a few lines later.
Upstream has the same shape, so this is worth fixing there rather than only
here. What makes it more visible in this fork is that there are now two paths
through that swap.
Also worth settling
Whether the bundled themes are reachable on the Windows search path at all.
Location.resources joins resourcesDir().app() with themes, and if that
directory is not present in a Windows build then every bundled theme name
fails to resolve and this bug is what hides it. That is a separate question
from the diagnostics being dropped, but the two together are why a valid
theme name silently does nothing.
Suggested shape
Carry _diagnostics across the swap the way the replay steps are carried, or
re-emit after it. Then confirm a bad theme name reaches the log and the
settings window's diagnostics list.
A theme name that does not resolve produces no message anywhere. The terminal
comes up on the compile-time colours and nothing says why.
Seen with
theme = Catppuccin Mochaon Windows: the terminal rendered#282C34rather than the theme, with no diagnostic in the log, no notice inthe UI, and no indication in the settings window.
Why nothing surfaces
themepkg.openappends "failed to load theme from the path X" toself._diagnostics(src/config/Config.zig).loadThemethen goes throughthe overlay, which builds a fresh config with
cloneEmpty, copies the replaysteps onto it, and swaps:
self.deinit()frees the old diagnostics list andself.* = new_configinstalls one that started empty. The message is writtenand then thrown away a few lines later.
Upstream has the same shape, so this is worth fixing there rather than only
here. What makes it more visible in this fork is that there are now two paths
through that swap.
Also worth settling
Whether the bundled themes are reachable on the Windows search path at all.
Location.resourcesjoinsresourcesDir().app()withthemes, and if thatdirectory is not present in a Windows build then every bundled theme name
fails to resolve and this bug is what hides it. That is a separate question
from the diagnostics being dropped, but the two together are why a valid
theme name silently does nothing.
Suggested shape
Carry
_diagnosticsacross the swap the way the replay steps are carried, orre-emit after it. Then confirm a bad theme name reaches the log and the
settings window's diagnostics list.