chore(desktop): zero eslint/typecheck debt + prettier pass (#39100)

- eslint --fix across src/ and electron/ (unused imports, import/prop sort, padding)
- flatten empty catch blocks in electron CJS; drop unused applyUpdatesPosixInApp arg
- add setMutableRef helper for imperative ref writes (react-compiler clean)
- move sidebar cookie persistence into an effect; extract scrollElementToBottom helper
This commit is contained in:
brooklyn!
2026-06-04 14:10:38 +00:00
committed by GitHub
parent 3858cf4307
commit e003c53b06
58 changed files with 685 additions and 427 deletions
+8 -8
View File
@@ -145,14 +145,14 @@ const TAILWIND_BY_COLOR: Record<AnsiColor, string> = {
// Tuned for legibility against the muted bg-(--ui-bg-tertiary) surface used
// in tool cards. We don't paint pure ANSI colors (#000, #fff) because they
// disappear into the surface.
'black': 'text-zinc-700 dark:text-zinc-300',
'red': 'text-red-700 dark:text-red-300',
'green': 'text-emerald-700 dark:text-emerald-300',
'yellow': 'text-amber-700 dark:text-amber-300',
'blue': 'text-blue-700 dark:text-blue-300',
'magenta': 'text-fuchsia-700 dark:text-fuchsia-300',
'cyan': 'text-cyan-700 dark:text-cyan-300',
'white': 'text-zinc-600 dark:text-zinc-200',
black: 'text-zinc-700 dark:text-zinc-300',
red: 'text-red-700 dark:text-red-300',
green: 'text-emerald-700 dark:text-emerald-300',
yellow: 'text-amber-700 dark:text-amber-300',
blue: 'text-blue-700 dark:text-blue-300',
magenta: 'text-fuchsia-700 dark:text-fuchsia-300',
cyan: 'text-cyan-700 dark:text-cyan-300',
white: 'text-zinc-600 dark:text-zinc-200',
'bright-black': 'text-zinc-500 dark:text-zinc-400',
'bright-red': 'text-rose-600 dark:text-rose-300',
'bright-green': 'text-emerald-600 dark:text-emerald-200',
+6
View File
@@ -0,0 +1,6 @@
import type { MutableRefObject } from 'react'
/** Imperative ref write — extracted so react-compiler doesn't flag hook-arg refs. */
export function setMutableRef<T>(ref: MutableRefObject<T>, value: T) {
ref.current = value
}
+1 -4
View File
@@ -1,9 +1,6 @@
import { setYoloActive } from '@/store/session'
export type GatewayRequester = <T = unknown>(
method: string,
params?: Record<string, unknown>
) => Promise<T>
export type GatewayRequester = <T = unknown>(method: string, params?: Record<string, unknown>) => Promise<T>
/**
* Toggle per-session YOLO (approval bypass) via gateway `config.set` — the same