mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-21 05:01:26 -07:00
refactor: remove dead code and enable noUnusedLocals (#292)
* refactor: remove dead code and enable noUnusedLocals
- delete launcher/jimaku.ts and the launcher Args/config jimaku* fields
that only fed it (the SUBMINER_JIMAKU_* env vars had no effect)
- delete plugin/subminer/hover.lua; nothing has sent subminer-hover-token
since Overlay 2.0
- drop never-read anilist.characterDictionary.refreshTtlHours and
evictionPolicy (still hidden in the settings UI for old configs)
- drop unused root deps: eslint, @fontsource-variable/geist{,-mono}
(stats/ declares its own)
- delete the committed draft renderer-performance plan doc
- turn on noUnusedLocals for typecheck and remove what it surfaced,
including Windows focus-handoff values computed but never consumed
* docs(changes): add docs fragment and note retired hover messages
This commit is contained in:
1 parent
ea2b3a9507
commit
8fc20b2499
52 files changed
+20
-1683
No files matched your search
@@ -74,9 +74,6 @@ export function updateVisibleOverlayVisibility(args: {
|
||||
overlayInteractionActive?: boolean;
|
||||
mainWindow: BrowserWindow | null;
|
||||
windowTracker: BaseWindowTracker | null;
|
||||
lastKnownWindowsForegroundProcessName?: string | null;
|
||||
windowsOverlayProcessName?: string | null;
|
||||
windowsFocusHandoffGraceActive?: boolean;
|
||||
macOSForegroundProbeActive?: boolean;
|
||||
trackerNotReadyWarningShown: boolean;
|
||||
setTrackerNotReadyWarningShown: (shown: boolean) => void;
|
||||
@@ -168,26 +165,6 @@ export function updateVisibleOverlayVisibility(args: {
|
||||
const shouldUseMacOSMousePassthrough = args.isMacOSPlatform && !overlayInteractionActive;
|
||||
const shouldDefaultToPassthrough =
|
||||
args.isWindowsPlatform || forceMousePassthrough || shouldReleaseMacOSOverlayLevel;
|
||||
const windowsForegroundProcessName =
|
||||
args.lastKnownWindowsForegroundProcessName?.trim().toLowerCase() ?? null;
|
||||
const windowsOverlayProcessName = args.windowsOverlayProcessName?.trim().toLowerCase() ?? null;
|
||||
const hasWindowsForegroundProcessSignal =
|
||||
args.isWindowsPlatform && windowsForegroundProcessName !== null;
|
||||
const isTrackedWindowsTargetFocused = args.windowTracker?.isTargetWindowFocused?.() ?? true;
|
||||
const isTrackedWindowsTargetMinimized =
|
||||
args.isWindowsPlatform &&
|
||||
typeof args.windowTracker?.isTargetWindowMinimized === 'function' &&
|
||||
args.windowTracker.isTargetWindowMinimized();
|
||||
const shouldPreserveWindowsOverlayDuringFocusHandoff =
|
||||
args.isWindowsPlatform &&
|
||||
args.windowsFocusHandoffGraceActive === true &&
|
||||
!!args.windowTracker &&
|
||||
(!hasWindowsForegroundProcessSignal ||
|
||||
windowsForegroundProcessName === 'mpv' ||
|
||||
(windowsOverlayProcessName !== null &&
|
||||
windowsForegroundProcessName === windowsOverlayProcessName)) &&
|
||||
!isTrackedWindowsTargetMinimized &&
|
||||
(args.windowTracker.isTracking() || args.windowTracker.getGeometry() !== null);
|
||||
const shouldForcePassiveReshow = args.isWindowsPlatform && !wasVisible;
|
||||
const isNonNativeOverlay = !args.isWindowsPlatform && !args.isMacOSPlatform;
|
||||
const isNonNativePassiveOverlay = isNonNativeOverlay && !overlayInteractionActive;
|
||||
@@ -208,13 +185,6 @@ export function updateVisibleOverlayVisibility(args: {
|
||||
(isNonNativePassiveOverlay && !hasNonNativeInputRegion) ||
|
||||
(shouldDefaultToPassthrough && (!isVisibleOverlayFocused || shouldForcePassiveReshow));
|
||||
const shouldBindTrackedWindowsOverlay = args.isWindowsPlatform && !!args.windowTracker;
|
||||
const shouldKeepTrackedWindowsOverlayTopmost =
|
||||
!args.isWindowsPlatform ||
|
||||
!args.windowTracker ||
|
||||
isVisibleOverlayFocused ||
|
||||
isTrackedWindowsTargetFocused ||
|
||||
shouldPreserveWindowsOverlayDuringFocusHandoff ||
|
||||
(hasWindowsForegroundProcessSignal && windowsForegroundProcessName === 'mpv');
|
||||
if (shouldIgnoreMouseEvents) {
|
||||
applyOverlayClickThrough(mainWindow, args.isWindowsPlatform);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user