You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7969a8c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(tui): ask the OS for appearance on the direct-run fallback too
Addresses the open review findings on this PR.
`fallbackMode` fed `resolveInitialMode` only COLORFGBG and the OSC
reply, so the direct-run renderer did not actually agree with the
startup path it shares that function with. On a light Apple Terminal —
no COLORFGBG, no OSC 11 answer — a failed palette query still resolved
to "dark" and repainted a light terminal dark, which is the #809
symptom this branch exists to remove. It now consults
`detectSystemAppearance()`, but only when both cheap signals came back
empty, so the `defaults` spawn stays off the common path.
`footer.ts` keeps the last known-good theme when a runtime palette
refresh fails, and detected that by comparing against
`RUN_THEME_FALLBACK`. Once the fallback became per-mode, a light
terminal produced a different instance, the identity check missed, and
the footer replaced a good theme with the fallback. `isRunThemeFallback`
tests membership in the memo map instead.
`detectSystemAppearance` had a `clean` clause resolving "light" for an
error with no `code` that was not killed. execFile never produces that
shape — it sets `code` to the errno string on spawn failure and to the
exit status otherwise — and had it fired it would have reported light
for an unknown failure, which the comment directly above it forbids.
Unknown now stays null so the caller can keep looking.
The palette-failure test pinned the dark instance by identity, which
re-encoded the behaviour being fixed and fails on a light-mode runner.
It now asserts that a failed lookup yields *a* fallback, with a separate
case keeping the dark instance pinned for an explicit dark signal.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018fJ3X7pcGT4R9yzjsJnqsV
0 commit comments