From aedbb88a8025851067be9f77ec406b29d65599a8 Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 28 Jul 2026 21:47:21 +0530 Subject: refactor: delete exports and knobs that nothing calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit isInternalUrl, SPECIAL_KEYS, andThen and mapErr had no callers in src or test. BrowserState.remoteBrowserId was parsed on restore and never written — the field that is actually read lives on DaemonStatus. IpcServer.disconnectClient and IpcServer.clients() were unreachable, as was EventRouter.allClients and a write-only lineCount counter. DAEMON_STALE_SOCKET_CLEANUP was a hardcoded true with an if around it, so the unlink now runs unconditionally. CdpBridge.isAlive and getSessionOwner look equally dead from src/ alone, but test/manual/bridge-test.ts drives both — they are the only seams that suite has, so they stay. Co-Authored-By: Claude Opus 5 (1M context) --- src/util/keycodes.ts | 2 -- src/util/result.ts | 6 ------ 2 files changed, 8 deletions(-) (limited to 'src/util') diff --git a/src/util/keycodes.ts b/src/util/keycodes.ts index 2445eaf..68be059 100644 --- a/src/util/keycodes.ts +++ b/src/util/keycodes.ts @@ -4,7 +4,5 @@ const VIRTUAL_KEY_CODES: Readonly> = { Home: 36, End: 35, PageUp: 33, PageDown: 34, }; -export const SPECIAL_KEYS: ReadonlyArray = Object.keys(VIRTUAL_KEY_CODES); - export const virtualKeyCode = (key: string): number => VIRTUAL_KEY_CODES[key] ?? (key.length === 1 ? key.charCodeAt(0) : 0); diff --git a/src/util/result.ts b/src/util/result.ts index ca57c2a..d57fea7 100644 --- a/src/util/result.ts +++ b/src/util/result.ts @@ -7,9 +7,3 @@ export const err = (error: E): Result => ({ success: false, error } export const map = (r: Result, f: (t: T) => U): Result => r.success ? ok(f(r.data)) : r; - -export const andThen = (r: Result, f: (t: T) => Result): Result => - r.success ? f(r.data) : r; - -export const mapErr = (r: Result, f: (e: E) => F): Result => - r.success ? r : err(f(r.error)); -- cgit v1.2.3