This document tracks the staged modularization of docker.js while preserving Unraid selector/API compatibility.
scripts/docker.runtime.shared.jscreateRuntimeStateStore: single source of truth for runtime UI state.createAsyncActionBoundary: normalized async error handling and user-safe messaging.createContextMenuQuickStripAdapter: resilient context-menu enhancement for icon-only quick actions.createRuntimePerfTelemetry: structured action timing with snapshot support.createSafeUiActionRunner: in-flight dedupe for UI-triggered async actions.resolveRuntimePerformanceProfile: strict performance profile for large libraries.runtimeContracts: shared key/threshold contracts consumed by Docker and VMs.
scripts/docker.modules.js- view helpers (debug logger, perf tracker, row-centering tools).
docker.jskeeps orchestration and Unraid integration behavior.- Shared modules own reusable primitives so feature logic is testable without large-file rewrites.
- Store-backed state currently includes:
focusedFolderIdlockedFolderIdspinnedFolderIdsperformanceProfile
- New shared module is loaded in
folderview.plus.Docker.pagebeforedocker.modules.jsanddocker.js. - Context menu quick actions (Focus/Pin/Lock) are enhanced through the adapter rather than ad-hoc DOM logic.
- CSS layout constants use tokenized variables with hard-coded fallback values to preserve legacy contracts.
- Architecture contract tests:
tests/docker-runtime-shared-architecture.test.mjstests/docker-folder-row-quick-actions.test.mjstests/docker-mobile-name-alignment-guard.test.mjs
- Perf telemetry snapshot is exposed as:
window.getDockerRuntimePerfTelemetrySnapshot()window.getVmRuntimePerfTelemetrySnapshot()