From c002a6d9024617b418401ba03a537aa6f2f94461 Mon Sep 17 00:00:00 2001 From: nokeo08 Date: Fri, 14 Aug 2026 13:39:15 -0500 Subject: [PATCH] Fix stale comments to match current code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audited comments project-wide against the current implementation: - scripts/install.sh, scripts/uninstall.sh: header curl URLs pointed at a root-level install.sh/uninstall.sh, but the files live under scripts/ — the documented command 404'd. Corrected to the scripts/ path (matching the README and the actual file location). - src/move.ts: header said it ties "four logic modules" and omitted editor.ts; the --edit terminal action was also missing from the order of operations. Both corrected. - src/config.ts: numeric Config fields are all milliseconds now; dropped the stale "pixels" unit left over from stepCount/stepSize. Comments-only (plus two script header lines); tsc clean, 64 tests pass. --- scripts/install.sh | 2 +- scripts/uninstall.sh | 2 +- src/config.ts | 2 +- src/move.ts | 14 +++++++++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index a4eea54..47a51cd 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,7 +4,7 @@ # # Curl-pipe ready: # -# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/install.sh | sh +# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/scripts/install.sh | sh # # What it does: # 1. Detect platform; bail on anything @nut-tree-fork/nut-js doesn't ship. diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index c250c9b..2cbcaff 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -4,7 +4,7 @@ # # Curl-pipe ready: # -# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/uninstall.sh | sh +# curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/scripts/uninstall.sh | sh # # Removes the `move` wrapper from $XDG_BIN_HOME and the install tree from # $XDG_DATA_HOME/move. Does NOT remove Bun — that's your runtime, not ours. diff --git a/src/config.ts b/src/config.ts index fe4d5c5..9951285 100644 --- a/src/config.ts +++ b/src/config.ts @@ -10,7 +10,7 @@ * `resolveConfig` rather than mutating the defaults, so the defaults stay * genuinely constant and the resolved config stays structurally typed. * - * All numeric `Config` fields are in their internal units (ms, pixels). + * All numeric `Config` fields are in their internal units (milliseconds). * The CLI and config file expose the time-valued fields in seconds for * ergonomics; `resolveConfig` performs the seconds->ms conversion at the * boundary so downstream code never has to think about it. diff --git a/src/move.ts b/src/move.ts index 55335bc..ba44615 100755 --- a/src/move.ts +++ b/src/move.ts @@ -4,23 +4,27 @@ * ------- * Entry point for the `move` CLI. * - * Thin shim that ties the four logic modules together: + * Thin shim that ties the logic modules together: * - `cli.ts` parses and validates `process.argv`. * - `configFile.ts` loads and validates the JSON config file. * - `config.ts` holds defaults and the layered `resolveConfig` overlay. - * - `keeper.ts` owns the synthetic-activity sweep and idle-watch loop. + * - `editor.ts` backs `--edit` (open the config file in `$EDITOR`). + * - `keeper.ts` owns the idle-watch loop and drives the movement + * machinery (device / strategy / executor). * * Order of operations: * 1. Parse CLI args. Bad input -> stderr + usage hint, exit 2. * 2. `--help` / `--version` short-circuit before any I/O, config load, or * mouse work. `keeper.ts` is also lazy-imported (see below) so these * flags don't pay the cost of loading the nut.js native binary. - * 3. Load + validate the config file (default XDG path, or `--config + * 3. `--edit` opens the resolved config file in `$EDITOR` and is a + * terminal action (propagates the editor's exit code). + * 4. Load + validate the config file (default XDG path, or `--config * ` if supplied). Validation failures share the exit-2 path. - * 4. Resolve the full `Config` (CLI > file > DEFAULT_CONFIG) — verbose + * 5. Resolve the full `Config` (CLI > file > DEFAULT_CONFIG) — verbose * lives inside `Config` and is layered with the same precedence as * the numeric fields. - * 5. Lazy-import `keeper.ts` (dynamic import keeps nut.js out of the + * 6. Lazy-import `keeper.ts` (dynamic import keeps nut.js out of the * `--help` / `--version` startup path) and run it. Any unhandled * rejection — from the import itself or from the loop — exits 1. *