mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
refactor: prebuild more shortcut and overlay runtime deps
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:48:39Z` |
|
||||
| `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:51:02Z` |
|
||||
| `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:51:02Z] progress: completed 2 more safe slices (10 normalized sites) in `src/main.ts` by prebuilding finalized deps for numeric shortcut pending-session handlers and overlay-shortcuts/Anki action handler setup.
|
||||
- [2026-02-20T09:51:02Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + targeted suites pass for `numeric-shortcut-*`, `overlay-shortcuts-lifecycle*`, and `anki-actions` (17/17).
|
||||
- [2026-02-20T09:51:02Z] scope: commit includes only `src/main.ts` + subagent bookkeeping files; unrelated workspace deltas still excluded.
|
||||
- [2026-02-20T09:48:39Z] progress: completed another 2-slice safe batch in `src/main.ts` (10 normalized sites) by prebuilding finalized deps for Jellyfin CLI/session handlers and startup warmup/overlay-bounds handlers.
|
||||
- [2026-02-20T09:48:39Z] test: `bun run build` pass (expected macOS helper Swift cache fallback) + targeted suites pass for `jellyfin-cli-*`, `jellyfin-remote-session-lifecycle`, `startup-warmups*`, and `overlay-window-layout*` (29/29).
|
||||
- [2026-02-20T09:48:39Z] scope: commit will include `src/main.ts` and subagent bookkeeping only; unrelated tracked/untracked files remain untouched.
|
||||
|
||||
38
src/main.ts
38
src/main.ts
@@ -2672,8 +2672,9 @@ const buildNumericShortcutRuntimeMainDepsHandler = createBuildNumericShortcutRun
|
||||
setTimer: (handler, timeoutMs) => setTimeout(handler, timeoutMs),
|
||||
clearTimer: (timer) => clearTimeout(timer),
|
||||
});
|
||||
const numericShortcutRuntimeMainDeps = buildNumericShortcutRuntimeMainDepsHandler();
|
||||
const numericShortcutRuntime = createNumericShortcutRuntime(
|
||||
buildNumericShortcutRuntimeMainDepsHandler(),
|
||||
numericShortcutRuntimeMainDeps,
|
||||
);
|
||||
const multiCopySession = numericShortcutRuntime.createSession();
|
||||
const mineSentenceSession = numericShortcutRuntime.createSession();
|
||||
@@ -2681,8 +2682,10 @@ const buildCancelPendingMultiCopyMainDepsHandler =
|
||||
createBuildCancelNumericShortcutSessionMainDepsHandler({
|
||||
session: multiCopySession,
|
||||
});
|
||||
const cancelPendingMultiCopyMainDeps =
|
||||
buildCancelPendingMultiCopyMainDepsHandler();
|
||||
const cancelPendingMultiCopyHandler = createCancelNumericShortcutSessionHandler(
|
||||
buildCancelPendingMultiCopyMainDepsHandler(),
|
||||
cancelPendingMultiCopyMainDeps,
|
||||
);
|
||||
|
||||
const buildStartPendingMultiCopyMainDepsHandler =
|
||||
@@ -2695,16 +2698,20 @@ const buildStartPendingMultiCopyMainDepsHandler =
|
||||
cancelled: 'Cancelled',
|
||||
},
|
||||
});
|
||||
const startPendingMultiCopyMainDeps =
|
||||
buildStartPendingMultiCopyMainDepsHandler();
|
||||
const startPendingMultiCopyHandler = createStartNumericShortcutSessionHandler(
|
||||
buildStartPendingMultiCopyMainDepsHandler(),
|
||||
startPendingMultiCopyMainDeps,
|
||||
);
|
||||
|
||||
const buildCancelPendingMineSentenceMultipleMainDepsHandler =
|
||||
createBuildCancelNumericShortcutSessionMainDepsHandler({
|
||||
session: mineSentenceSession,
|
||||
});
|
||||
const cancelPendingMineSentenceMultipleMainDeps =
|
||||
buildCancelPendingMineSentenceMultipleMainDepsHandler();
|
||||
const cancelPendingMineSentenceMultipleHandler = createCancelNumericShortcutSessionHandler(
|
||||
buildCancelPendingMineSentenceMultipleMainDepsHandler(),
|
||||
cancelPendingMineSentenceMultipleMainDeps,
|
||||
);
|
||||
|
||||
const buildStartPendingMineSentenceMultipleMainDepsHandler =
|
||||
@@ -2717,39 +2724,48 @@ const buildStartPendingMineSentenceMultipleMainDepsHandler =
|
||||
cancelled: 'Cancelled',
|
||||
},
|
||||
});
|
||||
const startPendingMineSentenceMultipleMainDeps =
|
||||
buildStartPendingMineSentenceMultipleMainDepsHandler();
|
||||
const startPendingMineSentenceMultipleHandler = createStartNumericShortcutSessionHandler(
|
||||
buildStartPendingMineSentenceMultipleMainDepsHandler(),
|
||||
startPendingMineSentenceMultipleMainDeps,
|
||||
);
|
||||
|
||||
const buildRegisterOverlayShortcutsMainDepsHandler =
|
||||
createBuildRegisterOverlayShortcutsMainDepsHandler({
|
||||
overlayShortcutsRuntime,
|
||||
});
|
||||
const registerOverlayShortcutsMainDeps =
|
||||
buildRegisterOverlayShortcutsMainDepsHandler();
|
||||
const registerOverlayShortcutsHandler = createRegisterOverlayShortcutsHandler(
|
||||
buildRegisterOverlayShortcutsMainDepsHandler(),
|
||||
registerOverlayShortcutsMainDeps,
|
||||
);
|
||||
|
||||
const buildUnregisterOverlayShortcutsMainDepsHandler =
|
||||
createBuildUnregisterOverlayShortcutsMainDepsHandler({
|
||||
overlayShortcutsRuntime,
|
||||
});
|
||||
const unregisterOverlayShortcutsMainDeps =
|
||||
buildUnregisterOverlayShortcutsMainDepsHandler();
|
||||
const unregisterOverlayShortcutsHandler = createUnregisterOverlayShortcutsHandler(
|
||||
buildUnregisterOverlayShortcutsMainDepsHandler(),
|
||||
unregisterOverlayShortcutsMainDeps,
|
||||
);
|
||||
|
||||
const buildSyncOverlayShortcutsMainDepsHandler = createBuildSyncOverlayShortcutsMainDepsHandler({
|
||||
overlayShortcutsRuntime,
|
||||
});
|
||||
const syncOverlayShortcutsMainDeps = buildSyncOverlayShortcutsMainDepsHandler();
|
||||
const syncOverlayShortcutsHandler = createSyncOverlayShortcutsHandler(
|
||||
buildSyncOverlayShortcutsMainDepsHandler(),
|
||||
syncOverlayShortcutsMainDeps,
|
||||
);
|
||||
|
||||
const buildRefreshOverlayShortcutsMainDepsHandler =
|
||||
createBuildRefreshOverlayShortcutsMainDepsHandler({
|
||||
overlayShortcutsRuntime,
|
||||
});
|
||||
const refreshOverlayShortcutsMainDeps =
|
||||
buildRefreshOverlayShortcutsMainDepsHandler();
|
||||
const refreshOverlayShortcutsHandler = createRefreshOverlayShortcutsHandler(
|
||||
buildRefreshOverlayShortcutsMainDepsHandler(),
|
||||
refreshOverlayShortcutsMainDeps,
|
||||
);
|
||||
|
||||
async function triggerSubsyncFromConfig(): Promise<void> {
|
||||
@@ -2779,8 +2795,10 @@ const buildUpdateLastCardFromClipboardMainDepsHandler =
|
||||
showMpvOsd: (text) => showMpvOsd(text),
|
||||
updateLastCardFromClipboardCore,
|
||||
});
|
||||
const updateLastCardFromClipboardMainDeps =
|
||||
buildUpdateLastCardFromClipboardMainDepsHandler();
|
||||
const updateLastCardFromClipboardHandler = createUpdateLastCardFromClipboardHandler(
|
||||
buildUpdateLastCardFromClipboardMainDepsHandler(),
|
||||
updateLastCardFromClipboardMainDeps,
|
||||
);
|
||||
|
||||
const buildRefreshKnownWordCacheMainDepsHandler = createBuildRefreshKnownWordCacheMainDepsHandler({
|
||||
|
||||
Reference in New Issue
Block a user