fix: address claude review action items

This commit is contained in:
2026-02-26 23:27:25 -08:00
parent d4805395fa
commit bc6f581ea5
4 changed files with 10 additions and 11 deletions

View File

@@ -170,7 +170,7 @@ export function applySubtitleDomainConfig(context: ResolveContext): void {
'subtitleStyle.hoverTokenBackgroundColor', 'subtitleStyle.hoverTokenBackgroundColor',
(src.subtitleStyle as { hoverTokenBackgroundColor?: unknown }).hoverTokenBackgroundColor, (src.subtitleStyle as { hoverTokenBackgroundColor?: unknown }).hoverTokenBackgroundColor,
resolved.subtitleStyle.hoverTokenBackgroundColor, resolved.subtitleStyle.hoverTokenBackgroundColor,
'Expected string.', 'Expected a CSS color value (hex, rgba/hsl/hsla, named color, or var()).',
); );
} }

View File

@@ -27,9 +27,7 @@ export function sendToVisibleOverlayRuntime<T extends string>(options: {
} }
}; };
const getURL = options.mainWindow.webContents.getURL; const currentURL = options.mainWindow.webContents.getURL();
const currentURL =
typeof getURL === 'function' ? getURL.call(options.mainWindow.webContents) : 'ready';
const isReady = const isReady =
!options.mainWindow.webContents.isLoading() && !options.mainWindow.webContents.isLoading() &&
currentURL !== '' && currentURL !== '' &&

View File

@@ -69,7 +69,8 @@ export function createOverlayModalRuntimeService(
if (window.webContents.isLoading()) { if (window.webContents.isLoading()) {
return false; return false;
} }
return window.webContents.getURL() !== '' && window.webContents.getURL() !== 'about:blank'; const currentURL = window.webContents.getURL();
return currentURL !== '' && currentURL !== 'about:blank';
}; };
const sendOrQueueForWindow = ( const sendOrQueueForWindow = (

View File

@@ -111,7 +111,7 @@ function applyInlineStyleDeclarations(
} }
const cssValue = String(value); const cssValue = String(value);
if (key.startsWith('-') || key.includes('-')) { if (key.includes('-')) {
target.style.setProperty(key, cssValue); target.style.setProperty(key, cssValue);
if (key === '--webkit-text-stroke') { if (key === '--webkit-text-stroke') {
target.style.setProperty('-webkit-text-stroke', cssValue); target.style.setProperty('-webkit-text-stroke', cssValue);