mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
* fix(windows): advertise terminal background to TUI apps * refactor(windows): keep the background hint out of config.json The daemon needs to know whether the window is light or dark when it spawns a Windows pane, because ConPTY drops the child's OSC 11 query before tty7's emulator can answer it. It was reading that from `Config::theme` — a field nothing had written since it went dead — which meant the GUI had to rewrite the user's `config.json` every time the effective preset changed sides. Move the hint to `appearance.json`, beside `machine.json` in the data dir, and leave `Config::theme` exactly as it was. It is derived state: written by the process that paints the window, read by the process that has to describe it, and of no interest to the user. A file of its own rather than a field on `Machine`, because the machine tree is owned by the daemon and flushed on a timer, so a second writer would clobber the workspaces and panes it had not seen. Absent, unreadable, and unparsable all read as light — what the default preset is — so a daemon that starts before the GUI has ever applied a theme describes the default window instead of guessing. Also silence the `unused variable` warning the hint parameter raised on every non-Windows build, where the `COLORFGBG` block it feeds is compiled out. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>