fix: luminance-aware chrome theming for light themes; serialized settings writes; buffered log flush
- Derive tab-bar/chrome palette by background luminance: light themes keep a near-background bar with black-tinted tab overlays instead of a muddy gray strip; dark themes unchanged - Theme dockview tabs via the group-scoped --dv-*-tab-* vars its own rules consume (they outspecify our .dv-tab rules and leaked abyss navy onto light tabs); bump inactive-tab hover specificity to match - Convert settings dialog + highlight editor hardcoded white text/border tints to color-mix over --chrome-fg so panes stay readable on light themes - commands.ts: per-file log write buffer with a single drain loop per file (burst output coalesces into one appendFile per IO tick, chain no longer grows per logWrite); stop-tail rides the same buffer - settingsStore: serialize all writers through mutateSettings() queue that re-reads latest state per mutation (tray close-action vs settings UI full saves no longer clobber each other) - tests: burst ordering + stop-tail case for the log buffer
This commit is contained in:
1 parent
9e453e272c
commit
b3744b4705
9 files changed
+218
-99
No files matched your search
+7
-4
@@ -1,6 +1,6 @@
|
||||
import { app, BrowserWindow, dialog, Menu, nativeImage, Tray } from 'electron'
|
||||
import type { SystemSettings } from '@shared/settings'
|
||||
import { loadSettings, saveSettings } from './settingsStore'
|
||||
import { loadSettings, mutateSettings } from './settingsStore'
|
||||
import trayIconPath from './assets/tray.png?asset'
|
||||
|
||||
export type CloseAction = NonNullable<SystemSettings['closeAction']>
|
||||
@@ -15,9 +15,12 @@ export function markQuitting(): void {
|
||||
}
|
||||
|
||||
function persistCloseAction(action: CloseAction): void {
|
||||
const next = loadSettings()
|
||||
next.system.closeAction = action
|
||||
saveSettings(next)
|
||||
// Serialized read-modify-write on the latest state: must not stomp (or be
|
||||
// stomped by) a concurrent full-snapshot save from the settings UI.
|
||||
void mutateSettings((current) => {
|
||||
current.system.closeAction = action
|
||||
return current
|
||||
})
|
||||
}
|
||||
|
||||
function showMainWindow(showOrCreate: () => void): void {
|
||||
|
||||
Reference in new issue
Block a user