mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
refactor: prebuild additional main startup dependency bundles
This commit is contained in:
@@ -6,7 +6,7 @@ Read first. Keep concise.
|
||||
| ------------ | -------------- | ---------------------------------------------------- | --------- | ------------------------------------- | ---------------------- |
|
||||
| `codex-generate-minecard-image-20260220T112900Z-vsxr` | `codex-generate-minecard-image` | `Generate media fallbacks (GIF) from assets/minecard.webm and wire README/docs fallback markup` | `done` | `docs/subagents/agents/codex-generate-minecard-image-20260220T112900Z-vsxr.md` | `2026-02-20T11:35:30Z` |
|
||||
| `codex-main` | `planner-exec` | `Fix frequency/N+1 regression in plugin --start flow` | `in_progress` | `docs/subagents/agents/codex-main.md` | `2026-02-19T19:36:46Z` |
|
||||
| `codex-task85-20260219T233711Z-46hc` | `codex-task85` | `Resume TASK-85 maintainability refactor from latest handoff point` | `in_progress` | `docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md` | `2026-02-20T09:43:47Z` |
|
||||
| `codex-task85-20260219T233711Z-46hc` | `codex-task85` | `Resume TASK-85 maintainability refactor from latest handoff point` | `in_progress` | `docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md` | `2026-02-20T09:44:47Z` |
|
||||
| `codex-config-validation-20260219T172015Z-iiyf` | `codex-config-validation` | `Find root cause of config validation error for ~/.config/SubMiner/config.jsonc` | `completed` | `docs/subagents/agents/codex-config-validation-20260219T172015Z-iiyf.md` | `2026-02-19T17:26:17Z` |
|
||||
| `codex-task85-20260219T233711Z-46hc` | `codex-task85` | `Resume TASK-85 maintainability refactor from latest handoff point` | `in_progress` | `docs/subagents/agents/codex-task85-20260219T233711Z-46hc.md` | `2026-02-20T02:56:34Z` |
|
||||
| `codex-anilist-deeplink-20260219T233926Z` | `anilist-deeplink` | `Fix external subminer:// AniList callback handling from browser` | `done` | `docs/subagents/agents/codex-anilist-deeplink-20260219T233926Z.md` | `2026-02-19T23:59:21Z` |
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
## Current Work (newest first)
|
||||
|
||||
- [2026-02-20T09:44:47Z] progress: added another safe 5-block normalization in `src/main.ts` for early startup/runtime wiring by prebuilding finalized deps for `applyJellyfinMpvDefaults`, `getDefaultSocketPath`, `overlayContentMeasurementStore`, `subtitleProcessingController`, and config hot-reload message handler.
|
||||
- [2026-02-20T09:44:47Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + targeted suites pass for `mpv-jellyfin-defaults*`, `config-hot-reload-*`, and `subtitle-processing-controller` (18/18).
|
||||
- [2026-02-20T09:44:47Z] scope: this commit batch now includes 4 refactor slices (20 normalized `main.ts` handler construction sites) + subagent bookkeeping updates.
|
||||
- [2026-02-20T09:43:47Z] progress: completed larger safe batch in `src/main.ts` across 3 contiguous slices (15 normalized sites) by prebuilding finalized deps objects for AniList media-state handlers, AniList post-watch/retry handlers, and protocol/lifecycle/subtitle-position handlers.
|
||||
- [2026-02-20T09:43:47Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + targeted suites pass for `anilist-media-state*`, `anilist-media-guess*`, `anilist-post-watch*`, `subtitle-position*`, `protocol-url-handlers*`, `app-lifecycle-main-activate*`, `startup-config*` (39/39).
|
||||
- [2026-02-20T09:43:47Z] scope: staging only `src/main.ts` + subagent bookkeeping files for one large checkpoint commit; excluding unrelated `vendor/texthooker-ui`, backlog task draft, and other agent files.
|
||||
|
||||
17
src/main.ts
17
src/main.ts
@@ -628,8 +628,9 @@ const buildApplyJellyfinMpvDefaultsMainDepsHandler =
|
||||
sendMpvCommandRuntime: (client, command) => sendMpvCommandRuntime(client as never, command),
|
||||
jellyfinLangPref: JELLYFIN_LANG_PREF,
|
||||
});
|
||||
const applyJellyfinMpvDefaultsMainDeps = buildApplyJellyfinMpvDefaultsMainDepsHandler();
|
||||
const applyJellyfinMpvDefaultsHandler = createApplyJellyfinMpvDefaultsHandler(
|
||||
buildApplyJellyfinMpvDefaultsMainDepsHandler(),
|
||||
applyJellyfinMpvDefaultsMainDeps,
|
||||
);
|
||||
|
||||
function applyJellyfinMpvDefaults(client: MpvIpcClient): void {
|
||||
@@ -701,8 +702,9 @@ const appLogger = {
|
||||
const buildGetDefaultSocketPathMainDepsHandler = createBuildGetDefaultSocketPathMainDepsHandler({
|
||||
platform: process.platform,
|
||||
});
|
||||
const getDefaultSocketPathMainDeps = buildGetDefaultSocketPathMainDepsHandler();
|
||||
const getDefaultSocketPathHandler = createGetDefaultSocketPathHandler(
|
||||
buildGetDefaultSocketPathMainDepsHandler(),
|
||||
getDefaultSocketPathMainDeps,
|
||||
);
|
||||
|
||||
function getDefaultSocketPath(): string {
|
||||
@@ -731,8 +733,10 @@ const buildOverlayModalRuntimeMainDepsHandler = createBuildOverlayModalRuntimeMa
|
||||
getMainWindow: () => overlayManager.getMainWindow(),
|
||||
getInvisibleWindow: () => overlayManager.getInvisibleWindow(),
|
||||
});
|
||||
const overlayContentMeasurementStoreMainDeps =
|
||||
buildOverlayContentMeasurementStoreMainDepsHandler();
|
||||
const overlayContentMeasurementStore = createOverlayContentMeasurementStore(
|
||||
buildOverlayContentMeasurementStoreMainDepsHandler(),
|
||||
overlayContentMeasurementStoreMainDeps,
|
||||
);
|
||||
const overlayModalRuntime = createOverlayModalRuntimeService(buildOverlayModalRuntimeMainDepsHandler());
|
||||
const appState = createAppState({
|
||||
@@ -812,8 +816,10 @@ const buildSubtitleProcessingControllerMainDepsHandler =
|
||||
},
|
||||
now: () => Date.now(),
|
||||
});
|
||||
const subtitleProcessingControllerMainDeps =
|
||||
buildSubtitleProcessingControllerMainDepsHandler();
|
||||
const subtitleProcessingController = createSubtitleProcessingController(
|
||||
buildSubtitleProcessingControllerMainDepsHandler(),
|
||||
subtitleProcessingControllerMainDeps,
|
||||
);
|
||||
const overlayShortcutsRuntime = createOverlayShortcutsRuntimeService(
|
||||
createBuildOverlayShortcutsRuntimeMainDepsHandler({
|
||||
@@ -860,8 +866,9 @@ const buildConfigHotReloadMessageMainDepsHandler = createBuildConfigHotReloadMes
|
||||
showMpvOsd: (message) => showMpvOsd(message),
|
||||
showDesktopNotification: (title, options) => showDesktopNotification(title, options),
|
||||
});
|
||||
const configHotReloadMessageMainDeps = buildConfigHotReloadMessageMainDepsHandler();
|
||||
const notifyConfigHotReloadMessage = createConfigHotReloadMessageHandler(
|
||||
buildConfigHotReloadMessageMainDepsHandler(),
|
||||
configHotReloadMessageMainDeps,
|
||||
);
|
||||
const buildWatchConfigPathMainDepsHandler = createBuildWatchConfigPathMainDepsHandler({
|
||||
fileExists: (targetPath) => fs.existsSync(targetPath),
|
||||
|
||||
Reference in New Issue
Block a user